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

More Descriptions! (maybe on TFS 0.3)

Virgel

New Member
Joined
Jun 14, 2007
Messages
150
Reaction score
2
Greetings...
would it be posible to give an item more descriptions as only 1?
(like a maximum of 10)
I know it must be coded in c++ so its not posible in Lua or any other file.

---------------------------------------------------------------------------------
You see a medal of honour.
It weighs 1.00 oz.
This medal was given to PLAYER. (special description (not shown when not set with doSetItemSpecialDescription inGame))
Absorbs 10% poison damage (1 normal description)
+ 10% Health (2 normal description)
+ 2 sword skill (3 normal description)

---------------------------------------------------------------------------------
and so on

The item can look like:
Code:
<item id="5785" article="a" name="medal of honour">
	<attribute key="description1" value="Absorbs 10% pysical damage."/>
	<attribute key="description2" value="+ 10% Health."/>
	<attribute key="description3" value="+ 2 Sword Skill."/>
	<attribute key="weight" value="100"/>
	<attribute key="slotType" value="necklace"/>
	<attribute key="absorbPercentPhysical" value="100"/>
	<attribute key="maxHitPointsPercent" value="10"/>
	<attribute key="skillSword" value="2"/>
</item>

Actually a specialDescription you set inGame with "doSetItemSpecialDescription" will overwrite the normal Description youve set on an item.

What do you think about to create this cool feature? (its not tibia, but better!)

Baba
Virgel
 
Good idea you got there, it kinda gave me another idea.

Like having an item and if you look on it the first time it says something and the second time it says something diffrent, well if you could do this like 20 times you could set up new unique quests :eek:!
 
Good idea you got there, it kinda gave me another idea.

Like having an item and if you look on it the first time it says something and the second time it says something diffrent, well if you could do this like 20 times you could set up new unique quests :eek:!

Hehe this is another idea :)
It could be like:
doSetItemSpecialDescription1
doSetItemSpecialDescription2
doSetItemSpecialDescription3
so you can overwrite the ItemDescription on a special position. If you like to have the SpecialDescription on Description4 just use "doSetItemSpecialDescription4" or better "doSetItemSpecialDescription(item,line,text)".
The cool thing is you can make a better overview on descriptions if you have more as 1 (every description in 1 line)

Baba
Virgel
 
in 0.3 there is onLook event. So you can do really much with this ^^, so Silverstone proposition is easy to do here.

With multi descriptions. Its also possible but you need write "\n" to do new line.
 
in 0.3 there is onLook event. So you can do really much with this ^^, so Silverstone proposition is easy to do here.

With multi descriptions. Its also possible but you need write "\n" to do new line.

onLook(cid, position) is for creaturescripts not for items! How will you use it on items and add a specialDescription?

baba
Virgel
 
in 0.3 there is onLook event. So you can do really much with this ^^, so Silverstone proposition is easy to do here.

With multi descriptions. Its also possible but you need write "\n" to do new line.

But if I got one description, I can't ADD to this description some more text, cuz it will rewrite my first description... It will be nice to have something like GetItemSpecialDescription, and then doSetItemSpecialDescription(uid, GetItemSpecialDescription + "new text")
 
But if I got one description, I can't ADD to this description some more text, cuz it will rewrite my first description... It will be nice to have something like GetItemSpecialDescription, and then doSetItemSpecialDescription(uid, GetItemSpecialDescription + "new text")

Right! Specialy i like to have more options to add descriptions so ot creators can add a special description for a quest (example: "Found by ...")
and in anonther way you can write down some informations about this item.

If its posible it should give no limit for descriptions.
I think on this way we can create a lot of items and players will have just click "look at" and will see all Informations in different rows!

Its not only the thing to add new text on a description you allready can see. Its the way to add a description at items.xml (or more) and if you like to add a new description inGame you can easy do this on a new empty field.

Baba
Virgel
 
onLook works for all >.<

And as you said, getItemSpecialDescription its best way do to id, and this function must be added.
 
okay ive never worked with onLook...
The Thing is it would be much easier to add some information about an weapon/armor in item.xml like:
Code:
<item id="5785" article="a" name="medal of honour">
	<attribute key="description1" value="Absorbs 10% pysical damage."/>
	<attribute key="description2" value="+ 10% Health."/>
	<attribute key="description3" value="+ 2 Sword Skill."/>
	<attribute key="weight" value="100"/>
	<attribute key="slotType" value="necklace"/>
	<attribute key="absorbPercentPhysical" value="100"/>
	<attribute key="maxHitPointsPercent" value="10"/>
	<attribute key="skillSword" value="2"/>
</item>
To add more text to an description you already have, will just make more work... so there should be an easier way to add more as only one description.

Thats all
 
Main problem with this is that you can at max send a 255 character description to the client, if this limit hasn't been lifted since 7.6~.
 
for simple description it is 100% but if you would like to give better descriptions its just to less and a stupid system /thx Cip\ also.
 
Isn't max string length 65535? Well if Cip's client screws around you can always use YATC :) :)

* shameless plug
 
Maybe it is. But what'll be packetsize with so many bytes :p? 255 is enough. Really ;]
 
And if you set a new discription with an lua script it will bug, how? Put the item on the ground and in your packpack again voila discription gone!
 
Back
Top