Lava Titan
Developer
Hello folks!
I'm trying to fix this script but nothing keeps happening.
This script is based on a Weapon Upgrader.
When i use the item 8310 on a weapon:
But nothing happens =/
Could anyone help me fixing it?
Thanks,
Lava Titan
Using TFS: 0.3.6 pl1
I'm trying to fix this script but nothing keeps happening.
This script is based on a Weapon Upgrader.
When i use the item 8310 on a weapon:
This weapon should get 500 attack and 500 defense added on it.local id = {11299, 11302, 11301}
But nothing happens =/
LUA:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local id = {11299, 11302, 11301}
local item1 = getItemAttack(itemEx.uid)
for _,v in pairs(id) do
if(v == itemEx.itemid)then
if item1 <= 45000 then
setItemAttack(itemEx.uid, getItemAttack(itemEx.uid)+ 500)
setItemDefense(itemEx.uid, getItemDefense(itemEx.uid)+500)
doPlayerSendTextMessage(cid, 22, "You successfully upgraded item!")
break
else
doPlayerSendTextMessage(cid, 22, "You already used to many rich upgraders on this weapon!")
end
else
doPlayerSendTextMessage(cid, 19, "You can only upgrade Upgraded Rich Axe, Upgraded Rich Club, Upgraded Rich Sword!")
end
end
Could anyone help me fixing it?
Thanks,
Lava Titan
Last edited: