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

doItemSetAttribute

ConAn Edujawa

Member
Joined
Feb 23, 2015
Messages
457
Reaction score
17
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
 
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.
 
Back
Top