• New Horizons on Maelstrom
    Maelstrom New Horizons


    Visit our website www.piratehorizons.com to quickly find download links for the newest versions of our New Horizons mods Beyond New Horizons and Maelstrom New Horizons!

Coding Help!

Also, I manage to create a quest at random, any shipyard you enter, the npchar appear there so they can talk to the player for the quest. I would like to be able to teleport the pchar back to the pier next to the row boat in town but the problem is that I don't know where the player will trigger the quest. Is it possible to do a check to see in witch town the pchar is, so it can be teleport at the pier?

I manage to fix this one with this coding:
Code:
pchar.location.town = GetCurrentTown() + "_town";
DoReloadCharacterToLocation(pchar.location.town, "reload", "reload1_back");
bDisableFastReload = true;

I guess it will work for now, I wanted to force the player to leave town, that's the reason why I want to reload him at the cabin. I Manage to disable the fastreload, so the player doesn't teleport back to that area but he still can walk to the place. I know there's a command that close all the doors for the store, shipyard, tavern, usurer ect... But I don't remember witch one it is, you guys know this code?


Cheers, :cheers
 
Indeed reloading from shore to cabin would be trickier than reloading from sea to cabin.
Might be possible to reload to sea first and then reload to cabin. This works in PotC to reload to sea:
Code:
			QuestToSeaLogin_PrepareLoc("Redmond", "reload", "reload_fort1", true);
QuestToSeaLogin_Launch();
And maybe it's one of these functions you need?
Code:
			DisableFastTravel(true);
DisableMenuLaunch(true);
It's probably the first, but I don't think that disables any reloads.
If you do want to disable reloads, you probably have to do it for each one seperately:
Code:
locations[FindLocation("Quest_Falaise_de_fleur_location_03")].reload.l1.disable = 1;
You then have to remember to enable them again afterwards.
 
The code I was looking for to lock the door of the Store, Shipyard, Tavern, Church, Brothel, MoneyLender and the Residence was:

Code:
chrDisableReloadToLocation = true;

Edit: Well it didn't work the way I though it will be, with this code I lock the pier as well, so the player ain't able to get back to the ship. I will have to lock them all manually as you said Pieter.

Cheers, :cheers
 
Any of you know the location_type for the Port Control or Port Office?

I found those for the;

Store = Shop
Shipyard = Shipyard
Usurer = Usurer
Brothel = Brothel
Tavern = Tavern
PortOffice or PortControl = ???

I need to make a quest in there and need to do a win.condition but I require the location_type for the PortOffice, so any of you knows?

P.S: I try PortOffice, Port_Office, PortControl, Port_Control and Port.

Cheers, :cheers
 
Any of you know the location_type for the Port Control or Port Office?

If you've your mod_on_off activate go to the port office, press F11 to call interface and then click on F3, so you get the current location ID with all you need, even x, y, z coordonates to do new locators(I did make one at seashore temple). If you click on "install" and "test de locators"(french in the text) you'll see locators.

Edit: I did it for you:

http://s445.photobucket.com/albums/qq176/Philippe_album/?action=view&current=Corsairs3_0001.jpg

So it appears PortOffice is good, you just have too add the name of the town you want.
 
Well it's not quite what I was looking for. I'm trying to make a win.condition, the town ain't important since with the "location_type" regardless in witch town you are the win.conditon will work. See below:

Code:
pchar.Quest.PChar_Returning_To_Ship.win_condition.l1 			= "Location_Type";
pchar.Quest.PChar_Returning_To_Ship.win_condition.l1.location_type 	= "shipyard";
pchar.Quest.PChar_Returning_To_Ship.function 				= "PChar_Returning_To_Ship";

In the case above, when the pchar enter any shipyard the function "PChar_Returning_To_Ship" will execute. I want to do the same for the port office but I don't know what location_type they use for it. As I mention earlier I try PortOffice, Port_Office, PortControl, Port_Control and Port. None of them work. Any ideas?

Cheers, :cheers
 
Code:
 	//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// ÏÎÐÒÎÂÛÉ ÎÔÈÑ
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
locations[n].id = "SentJons_PortOffice";
locations[n].id.label = "PortOffice";
locations[n].image = "loading\inside\portoffice.tga";
//Town sack
locations[n].townsack = "SentJons";
locations[n].lockWeather = "Inside";
//Sound
locations[n].type = "house";
Unfortunately for you, it seems they use the type "house". :facepalm
 
Is it possible to avoid a player to go to the world map?

Also,
is it possible to enable the fighting in the shop?

Cheers, :cheers
 
Thx Pieter, do you know if it's possible to disable the mooring as well. I don't want the player to be able to moor for a while?

Cheers, :cheers
 
This is what we did for it in PotC. Might work in CoAS as well,
but you need to check the exact island IDs, which you can find in Program\islands\Islands_init.c:
Code:
				Island_SetReloadEnableGlobal("Cuba", false);
Island_SetReloadEnableGlobal("Oxbay", false);
Island_SetReloadEnableGlobal("Redmond", false);
Island_SetReloadEnableGlobal("FalaiseDeFleur", false);
Island_SetReloadEnableGlobal("IslaMuelle", false);
Island_SetReloadEnableGlobal("Douwesen", false);
Island_SetReloadEnableGlobal("Eleuthera", false);
Island_SetReloadEnableGlobal("Aruba", false);
Island_SetReloadEnableGlobal("BattleRocks", false);
Island_SetReloadEnableGlobal("Curacao", false);
Island_SetReloadEnableGlobal("Guadeloupe", false);
Island_SetReloadEnableGlobal("KhaelRoa", false);
Island_SetReloadEnableGlobal("SaintMartin", false);
Island_SetReloadEnableGlobal("Hispaniola", false);
Island_SetReloadEnableGlobal("Antigua", false);
Island_SetReloadEnableGlobal("Cayman", false);
 
Back
Top