Making a simple BBS sale tutorial (Page 2 of 5)
Written by Roguey,Language file
Hopefully if you followed my earlier guiide (Making a simple BBS message tutorial), you should already have a working language file called 440009.xml in your X3/t folder. Now open up the file with your text editor and add id's 10, 11 and 12, your language file should look something like this:
<?xml version="1.0" encoding="utf-8" ?>
<language id="44">
<page id="999880" title="News reports" descr="0">
<t id="1">[author]Roguey[/author][title]Important news[/title]\nHello the x galaxy! im a new scripter posting here using the language files! Please be nice</t>
<t id="10">[author]%s[/author][title]Salvage Insurance for sale[/title]\nHave you ever wondered through space without a care in the world? Have you ever thought might happen if suddenly a Khaak jumped out on you and started to wiping your shields out faster than a Teladi can pick up some loose change? well.. maybe you should get some Salvage Insurance and be safe!\n\n[center]We have a sale:\n[b]%s[/b] x Salvage Insurance for just %s credits!\n\n[select value="1"]I want to be safe![/Select]\n[/center]</t>
<t id="11">[author]%s[/author][title]Salvage Insurance for sale[/title]\nI am sorry to report that you dont have enough money to be safe. Please come back when you have enough money!\n</t>
<t id="12">[author]%s[/author][title]Salvage Insurance for sale[/title]\nThank-you very much, we have transfed the [b]Salvage Insurance[/b]'s to you.\n\nHave a good day.</t>
</page>
</language>
<language id="44">
<page id="999880" title="News reports" descr="0">
<t id="1">[author]Roguey[/author][title]Important news[/title]\nHello the x galaxy! im a new scripter posting here using the language files! Please be nice</t>
<t id="10">[author]%s[/author][title]Salvage Insurance for sale[/title]\nHave you ever wondered through space without a care in the world? Have you ever thought might happen if suddenly a Khaak jumped out on you and started to wiping your shields out faster than a Teladi can pick up some loose change? well.. maybe you should get some Salvage Insurance and be safe!\n\n[center]We have a sale:\n[b]%s[/b] x Salvage Insurance for just %s credits!\n\n[select value="1"]I want to be safe![/Select]\n[/center]</t>
<t id="11">[author]%s[/author][title]Salvage Insurance for sale[/title]\nI am sorry to report that you dont have enough money to be safe. Please come back when you have enough money!\n</t>
<t id="12">[author]%s[/author][title]Salvage Insurance for sale[/title]\nThank-you very much, we have transfed the [b]Salvage Insurance[/b]'s to you.\n\nHave a good day.</t>
</page>
</language>
I pasted the whole of 440009.xml here encase you jumped my previous guide, or not. Id 1 wont be used in this example.
Once you have copy and pasted the above, we need to write a script to offer Salvage Insurance for sale and then make the trade if the player has enough money (of-course).
<< Previous Page - Next Page >>