Hi all.
What I wanted was simple for those who understand. I would certainly remove the line that makes storing this action, allowing it to be performed as many times as the player wants.
Currently I use the server YurOTS 0.9.4d 7.6.
Action:
Ty.
What I wanted was simple for those who understand. I would certainly remove the line that makes storing this action, allowing it to be performed as many times as the player wants.
Currently I use the server YurOTS 0.9.4d 7.6.
Action:
Lua:
function onUse(cid, item, frompos, item2, topos)
if item.uid == 3158 then
if item.itemid == 1945 then
player1pos = {x=164, y=148, z=5, stackpos=253}
player1 = getThingfromPos(player1pos)
doSendMagicEffect(frompos, 13)
if player1.itemid > 0 then
player1level = getPlayerLevel(player1.uid)
questlevel = 300
if player1level >= questlevel then
queststatus1 = getPlayerStorageValue(player1.uid,3158)
if queststatus1 == -1 then
nplayer1pos = {x=35, y=75, z=7}
doSendMagicEffect(player1pos,2)
doTeleportThing(player1.uid,nplayer1pos)
doSendMagicEffect(nplayer1pos,14)
else
doPlayerSendCancel(cid,"Somebody in your team has already done this quest.")
end
else
doPlayerSendCancel(cid,"All players must have level 300 to enter.")
end
else
doPlayerSendCancel(cid,"You need 1 players in your team.")
end
elseif item.itemid == 1946 then
if getPlayerAccess(cid) > 0 then
doTransformItem(item.uid,item.itemid-1)
else
doPlayerSendCancel(cid,"Sorry, not possible.")
end
end
end
return 1
end
Ty.