doItemSetAttribute

ConAn Edujawa

Member
Joined
Feb 23, 2015
Messages
302
Best answers
0
Reaction score
4
hello guys how i can make script add random attributes
like doItemSetAttribute(itemEx.uid, "magiclevelpercent", 2)
i need change magiclevelpercent for random
skillsword skillaxe skillclub skilldist skillfish skillshield skillfist maxhealthpoints maxmanapoints managain manaticks healthgain healthticks maxhealthpercent maxmanapercent

tfs 0.4
 

Xikini

I whore myself out for likes
Premium User
Joined
Nov 17, 2010
Messages
4,131
Best answers
164
Reaction score
2,201
Lua:
local attributes = {"skillsword", "skillaxe", "skillclub", "skilldist", "skillfish", "skillshield", "skillfist", "maxhealthpoints", "maxmanapoints", "managain", "manaticks", "healthgain", "healthticks", "maxhealthpercent", "maxmanapercent", "magiclevelpercent"}

local rand = math.random(#attributes)
print(attributes[rand])
--doItemSetAttribute(itemEx.uid, attributes[rand], 2)
Note, only existing attributes in your source can be used.
The above code is just to show you how it can be done.
 
Top