Hello!
I made a script, which should do such things:
when someone clicks on an item (stone), then it checks one's storage if it is not 8888.
Then it should summon monsters on pos1-pos4, set player's storage to 8888 (so one couldn't do this action again), and give him a plate armor.
BUT when I click on a stone, then nothing happens :/ (there's not 'Sorry not possible' too)
Could anyone tell me what's wrong with it?
I made a script, which should do such things:
when someone clicks on an item (stone), then it checks one's storage if it is not 8888.
Then it should summon monsters on pos1-pos4, set player's storage to 8888 (so one couldn't do this action again), and give him a plate armor.
BUT when I click on a stone, then nothing happens :/ (there's not 'Sorry not possible' too)
Could anyone tell me what's wrong with it?
Code:
function onUse(cid, item, frompos, item2, topos)
if(getPlayerStorageValue ~= 8888) then
pos1 = {x=1100, y=924, z=8}
pos2 = {x=1113, y=925, z=8}
pos3 = {x=1100, y=925, z=8}
pos4 = {x=1113, y=925, z=8}
if item.itemuid == 8888 then
setPlayerStorageValue(cid, 8888)
doSummonCreature("rotworm", pos1)
doSummonCreature("rotworm", pos2)
doSummonCreature("carrion worm", pos3)
doSummonCreature("carrion worm", pos4)
doCreatureSay(cid, "Oh, why did I touch this stone?!")
doPlayerAddItem(cid, 2647, 1)
end
return 1
else
return 0
end
end
Last edited: