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

[Request] setItemAttribute getItemAttribute

andu

Sold 649 scripts, 25 maps and 9 events!
Joined
Aug 7, 2009
Messages
969
Solutions
17
Reaction score
355
GitHub
olrios
Twitch
olrios
I seen functions like setItemAttack, setItemDefence.

But setItemAttribute and getItemAttribute will be very useful!
Code:
setItemAttribute(cid, attribute, value)
getItemAttribute(cid, attribute)
These two functions allows you to make alot of diffrent items, without editing tibia.dat

Eg:
Code:
setItemAttribute(cid, absorbPercentFire, math.random(1,10))    -- looks nice ye?
setItemAttribute(cid, maxHealthPoints, (math.random(100, 500))

Anyone can help?
 
See Chojrak's post?

satItemAttribute (in tfs 0.3.6) works only for these options:
actionid, armor, attack, defence, extraatk, extradef, description etc.

BUT NOT FOR "absorbpercentELEMENTS" etc.!!!!!!!!!!!!!
not work for cap, max health points etc...



ehh... -.-
 
satItemAttribute (in tfs 0.3.6) works only for these options:
actionid, armor, attack, defence, extraatk, extradef, description etc.

BUT NOT FOR "absorbpercentELEMENTS" etc.!!!!!!!!!!!!!
not work for cap, max health points etc...



ehh... -.-

It works on all attributes + custom.
 
Ofc, gz intelligence, cid in setItemAttribute lol :p

Code:
doItemSetAttribute(uid, "type", value)
as "type" you can write:
Code:
armor, attack, aid, uid, defense, speed, hitchance (ETC)
example.
Code:
local asas = getItemIdByName("Magic Sword")
local item = doPlayerAddItem(cid, asas, 1)
doItemSetAttribute(item, "attack", getItemInfo(asas).attack * 2)

Rep uncle Hermes.

@Chójrak
Zrujnowałeś mi dzieciństwo tym postem :/
 
Back
Top