Forum
Stranded II General what are the scripting codes for trading.what are the scripting codes for trading.
5 replies 1
about your problem:
http://www.stranded.unrealsoftware.de/s2_commands.php?list=all
the command references dont say the same in english as those german ones. in the german commend references the is a command "dialogue" and there is also some text about it which is unfortunately missing in the english ones.
so here is a little translation of the trading-script:
trade=start - creates a new trading option
sell=ItemTyp,Number - typ/number of items you wanna sell (standard is 1)
buy=ItemTyp,Number - typ/number of items you wanna buy (standard is 1)
trade=end - finishes the definition of the new trading option
use "on:use" and put the script into a native to try wether it works.
1. first you need to create a text document in the game files. make one in the maps files (mods/sranded II/maps).
2. place this in the text file:
on:start {
ai_stay "self";
}
//~chieftainscript
on:use {
fademusic 10000;
dialogue "start","maps\sales.txt","chieftaindialogue";
}
//~chieftaindialogue
page=start
title=chieftain
text=start
Yo!
Welcome to the gun store, Want to buy some hunting gear? I would be interested in doing business with you!
text=end
button=sell,Yeah, I have something to sell!
button=buy,Show me your goods!
button=nothing,I have no treasures.
button=action:close,I don't want anything!
page=nothing
title=chieftain
text=start
What? No treasures? I take Gold coins,... and I love fried fish by the way! So find something for me!
text=end
button=sell,Maybe I got something.
button=buy,What is your offer?
button=action:close,Bye.
page=sell
title=Trade with chieftain
# fried fish -> Gold
trade=start
sell=90,1
buy=5,1
trade=end
button=buy,I want to buy something.
button=action:close,Bye.
page=buy
title=Trade with chieftain
# Gold -> Bullet
trade=start
sell=5,1
buy=29,10
trade=end
# Gold -> Shotgun
trade=start
sell=5,30
buy=110,1
trade=end
# Gold -> Pistol
trade=start
sell=5,25
buy=58,1
trade=end
button=sell,I have something to sell.
button=action:close,Bye.
3. after you have put this script in the text document; Start up the game and click on editor.
4. just use a small map that you can see at first; Now, click on Units and scroll down to chieftain (40). Click on the chieftain and place him on the island.
5.Click on the chieftain thats on the island, now, click on script, then click on import script and search for the sales.txt that you made in maps.(mods/stranded II/maps). Click on the sales.txt and click the green ok check. Click ok again and the click ok once more.
6. now save and name yor map. You should be able to play this map in single maps section.
*** I hope this helps anyone out that doen't have a clear understanding of the trade script. From this script you can make different varities of trade scripts.
edited 3×, last 20.03.09 01:39:31 am
1