ziggy46802
Active Member
- Joined
- Aug 19, 2012
- Messages
- 418
- Reaction score
- 27
LUA:
local pos = {x=615, y=1241, z=7}
local legs = {x=563, y=1213, z=6}
function onUse(cid, item, frompos, item2, topos)
doSendMagicEffect(pos, 10)
doPlayerAddItem(cid, 2407, 1) --backpack of holding
doPlayerSetStorageValue(cid, 1020, 2)
doPlayerAddExp(cid, 30000)
doCreatureSay(cid, "You chose the brightsword!", TALKTYPE_ORANGE_1)
doTeleportThing(cid, legs)
else
doCreatureSay(cid, "You have already gotten a reward.", TALKTYPE_ORANGE_1)
return true
end
The chest simply does nothing, the unique id is set on the map, and it is set in actions.xml as well, what's wrong with the script?