• 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!

Help please...

superdurnius

Corsair
Coordinator
3D Artist
Storm Modeller
Hy all... I have question:

I created dialog and like to make couple options... But I want, that those options have level req... egzample:

Do you want buy some relics?
- Option 1 (Yes, show me some of your items) ---> Link.l1.go = "shop1";
- Option 2 (Yes, show me some of your "better" Items) ---> Link.l2.go = "shop2";

and Option2 I want to make something like this:

If caracter lvl < 20,
then --> "Sorry, you are not ready for them...",
else --> Open shop... blah blah... blah...

Question is: I don't know how to use <b>IF</b> function (I'm new at this), Could someone write how should look If function in dialog.c file when need to check players lvl...


P.S. Sorry for my REALY bad English
 
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->if(pchar.rank < 20)
{
    Sorry, you are not ready for them..."
}
else
{
    Open shop... blah blah... blah...
}<!--c2--></div><!--ec2-->
 
<!--quoteo(post=246634:date=Mar 22 2008, 09:20 PM:name=Pieter Boelen)--><div class='quotetop'>QUOTE (Pieter Boelen @ Mar 22 2008, 09:20 PM) <a href="index.php?act=findpost&pid=246634"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec--><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->if(pchar.rank < 20)
{
    Sorry, you are not ready for them..."
}
else
{
    Open shop... blah blah... blah...
}<!--c2--></div><!--ec2--><!--QuoteEnd--></div><!--QuoteEEnd-->

TY... those {][}... This isn't programing from my school <img src="style_emoticons/<#EMO_DIR#>/biggrin.gif" style="vertical-align:middle" emoid=":D" border="0" alt="biggrin.gif" />
 
It's "C" or something similar at least. Just have a look through the various code files and see what you can figure out. <img src="style_emoticons/<#EMO_DIR#>/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" />
 
<!--quoteo(post=246657:date=Mar 23 2008, 12:44 PM:name=Pieter Boelen)--><div class='quotetop'>QUOTE (Pieter Boelen @ Mar 23 2008, 12:44 PM) <a href="index.php?act=findpost&pid=246657"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->It's "C" or something similar at least. Just have a look through the various code files and see what you can figure out. <img src="style_emoticons/<#EMO_DIR#>/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /><!--QuoteEnd--></div><!--QuoteEEnd-->

could someone link me to some tutor? I meen where will be all those (or some) commands like "pchar.rank" with meenings...
 
Be sure to have a look in the game's <i>buildinfo</i> subfolder. Keywords.c might be useful. And have a look at the various tutorials found <a href="http://forum.piratesahoy.net//index.php?showtopic=11380" target="_blank">here</a>. Also useful is to add the game's folder to your Windows search index. Then you can search for texts <i>in</i> the code files.
 
OK, Now I have other problem... In that place where : Open shop... blah blah... blah...
I copied code from Item Trader_dialog.c that he opens trade window, but when I check It's just simple shop with simple stuff (potions and ect...). I want that shop sell my created unique Items (with rare 0.00)... I tried to add command "TakeNItems(Npchar,"ItemID", Rand(10)+1);" (I found it in POTCwiki) and in game it says "I can't load dialog file....."
Could someone write code for me again in the "Open shop... blah blah... blah..." place to sell only couple specific Items...
 
Have a look <a href="http://forum.piratesahoy.net//index.php?showtopic=11720" target="_blank">here</a>. Estharos is working on something similar. <img src="style_emoticons/<#EMO_DIR#>/doff.gif" style="vertical-align:middle" emoid=":doff" border="0" alt="doff.gif" />
 
<!--quoteo(post=246631:date=Mar 22 2008, 09:11 PM:name=Estharos)--><div class='quotetop'>QUOTE (Estharos @ Mar 22 2008, 09:11 PM) <a href="index.php?act=findpost&pid=246631"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec--><!--quoteo(post=246611:date=Mar 22 2008, 06:01 AM:name=Pieter Boelen)--><div class='quotetop'>QUOTE (Pieter Boelen @ Mar 22 2008, 06:01 AM) <a href="index.php?act=findpost&pid=246611"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->I think that is for Catalina the Pirate's unreleased and never-finished Sneaky Trader mod. You would encounter him at random and he would sell you the weirdest things.<!--QuoteEnd--></div><!--QuoteEEnd-->

Ok! Gonna try to see what she had in mind.

By the way I manage to make the Merchant work, he first sell normal stuff like everyone else, then after completing the mission he start to sell the stuff I gave him.

I'll explain later how to do it, it's quite tricky.


<b>Cheers,</b> <img src="style_emoticons/<#EMO_DIR#>/par-ty.gif" style="vertical-align:middle" emoid=":cheers" border="0" alt="par-ty.gif" />
<!--QuoteEnd--></div><!--QuoteEEnd-->

Did he explained it?????
 
Need more help...

<!--quoteo(post=246634:date=Mar 22 2008, 10:20 PM:name=Pieter Boelen)--><div class='quotetop'>QUOTE (Pieter Boelen @ Mar 22 2008, 10:20 PM) <a href="index.php?act=findpost&pid=246634"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec--><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->if(pchar.rank < 20)
{
    Sorry, you are not ready for them..."
}
else
{
    Open shop... blah blah... blah...
}<!--c2--></div><!--ec2--><!--QuoteEnd--></div><!--QuoteEEnd-->

Same as this, but req is not lvl... It's specific Item... Lets say blade1...

If <b>(pchar has blade1 in inventory = false ??????????)</b>
{
Sorry, you are not ready for them..."
}
else
{
Open shop... blah blah... blah...
}

Thanks in advance... (Hope someone understood what I wanted)
 
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->if(CheckCharacterItem(Pchar,"blade1"))<!--c2--></div><!--ec2-->Of course you'll get some slight problems with different qualities of the item, so you might have to make it:<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->if(CheckCharacterItem(Pchar,"blade1-2") || CheckCharacterItem(Pchar,"blade1-1") || CheckCharacterItem(Pchar,"blade1") || CheckCharacterItem(Pchar,"blade1+1") || CheckCharacterItem(Pchar,"blade1+2") || CheckCharacterItem(Pchar,"blade1+3"))<!--c2--></div><!--ec2-->
 
Thanks Pieter for fast repl.

<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->if(CheckCharacterItem(Pchar,"blade1-2") || CheckCharacterItem(Pchar,"blade1-1") || CheckCharacterItem(Pchar,"blade1") || CheckCharacterItem(Pchar,"blade1+1") || CheckCharacterItem(Pchar,"blade1+2") || CheckCharacterItem(Pchar,"blade1+3"))<!--c2--></div><!--ec2-->
You meen This code will take effect with all these blades (from -2 to +3) or I have to put
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->if(CheckCharacterItem(Pchar,"blade1-2") (...) else (if(CheckCharacterItem(Pchar,"blade1-1") ......<!--c2--></div><!--ec2-->

ps. blade1 I take only like egz... but you got my attention <img src="style_emoticons/<#EMO_DIR#>/biggrin.gif" style="vertical-align:middle" emoid=":D" border="0" alt="biggrin.gif" />
 
<!--quoteo(post=248235:date=Mar 31 2008, 09:47 PM:name=SuperDurnius)--><div class='quotetop'>QUOTE (SuperDurnius @ Mar 31 2008, 09:47 PM) <a href="index.php?act=findpost&pid=248235"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->You meen This code will take effect with all these blades (from -2 to +3)<!--QuoteEnd--></div><!--QuoteEEnd-->Yes. You *could* also do it as you propose, but that just makes things a lot more complicated. "||" means "or" and "&&" means "and". You need to do it with the long statement if you check for possession of a weapon, but for ordinary items a single statement will do because they're not qualitized. I hope that makes sense to you. <img src="style_emoticons/<#EMO_DIR#>/doff.gif" style="vertical-align:middle" emoid=":doff" border="0" alt="doff.gif" />
 
Yes... I understood... It's just becouse I don't realy know "c" (most used "pascal" in school) so all those "||" and "&&" is new to me... <img src="style_emoticons/<#EMO_DIR#>/wacko.gif" style="vertical-align:middle" emoid=":wacko:" border="0" alt="wacko.gif" /> Thanks <img src="style_emoticons/<#EMO_DIR#>/bow.gif" style="vertical-align:middle" emoid=":bow" border="0" alt="bow.gif" />
 
Pieter, could you help once more??? What command in dialog ads reputation??

d.Text = "Hick... Ohh??? Finaly... Hick... I already got drunk waiting for you... Hick...";
Link.l1 = "Ehm... Ok... I'm here... What do you want from me???";
<b>Reputation -1</b>
Link.l1.go = "primus";
Link.l2 = "Hey... You are drunk. I'm not the man you are waiting for!!!";
<b>Reputation +1</b>
Link.l2.go = "primus";
 
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->LAi_ChangeReputation(PChar, 1);<!--c2--></div><!--ec2-->or<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->LAi_ChangeReputation(PChar, -1);<!--c2--></div><!--ec2-->
 
What Dialog commands gives and removes items from Player? Something like take <b>unknown language page</b> and give <b>translate page</b>
 
GiveItem2Character(pchar,"itemID");
and
TakeItemFromCharacter(pchar,"itemID");
if I recall correctly. <img src="style_emoticons/<#EMO_DIR#>/unsure.gif" style="vertical-align:middle" emoid=":?" border="0" alt="unsure.gif" />
 
Back
Top