• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Solved onLook new attibute for itens.

Vesgo

Member
Joined
Dec 4, 2009
Messages
356
Solutions
1
Reaction score
15
Location
Brasil
Hello friends, i would like to know if theres any way to implement a new attribute inside items.xml for TFS 0.3.6 pl1, that works like the "description"? When i look to the item, it shows the new attribute and it would be a "price" attribute.

Like <attribute key="price" value="Price: $ 10,00 gp" />.

But it needs to work like the "weigth" attribute, i mean, if i look to 1 (for ex.) ham it shows :
00:20 You see ham. Price: $ 10,00 gp
It weighs 3.00 oz.

00:21 You see 99 hams. Price: $ 990,00 gp
They weigh 297.00 oz.

Thank you very much for you help!
 
yes, is possible, laborious too. You have to edit: Items::loadFromXml() to get the value from xml, add a new value in items.h ... Then you have to edit all "Game::playerLook" you find to add the new attribute...

or you can do it in easier way using an onLook event with a table of items who need to be checked, of course with its price
 
yes, is possible, laborious too. You have to edit: Items::loadFromXml() to get the value from xml, add a new value in items.h ... Then you have to edit all "Game::playerLook" you find to add the new attribute...

or you can do it in easier way using an onLook event with a table of items who need to be checked, of course with its price

Thank you Joe, but that didnt help me, im sorry, i tried to follow your lead, but could not.
Is there any example of script that you know of?
 
Come on guys, please help!! I cant configure this creatureevent script! It must have a table with the itens and prices, and a onlook function to check if the item is in that table, check its quantity and set special description to the item saying "PRICE: $ xxx,xx gp"
I have the idea, but i dont have the knowledge, im really trying to do it myself, but im failling!
 
Back
Top