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

Full hota lever

skrm

New Member
Joined
Mar 15, 2008
Messages
67
Reaction score
0
Code:
--Full Ancient Helmet Quest by Evil Hero--

function onUse(cid, item, frompos, item2, topos)
oldhelmetpos = {x=138, y=396, z=6, stackpos=1}
newhelmetpos = {x=139, y=396, z=6, stackpos=1}
rubypos = {x=137, y=396, z=6, stackpos=1}
getoldhelmet = getThingfromPos(oldhelmetpos)
getnewhelmet = getThingfromPos(newhelmetpos)
getruby = getThingfromPos(rubypos)




if item.uid == 5033 and item.itemid == 1945 and getoldhelmet.itemid == 2342 and getruby.itemid == 2156 then
 doRemoveItem(getoldhelmet.uid,1)
doSendMagicEffect(oldhelmetpos,23)
 doRemoveItem(getruby.uid,1)
doSendMagicEffect(rubypos,23)
 doCreateItem(2343,1,newhelmetpos)
doSendMagicEffect(getnewhelmet,23)
 else
doPlayerSendTextMessage(cid,22,"You need a Big Ruby to incrase your Helmet!")
end
return 1
end


whats wrong with this script? its for tfs and whenever i use the lever it tells me that i need a bigger ruby, when ive got the right ruby there.
 
Last edited:
here is the fix
PHP:
function onUse(cid, item, frompos, item2, topos)
oldhelmetpos = {x=138, y=396, z=6, stackpos=1}
newhelmetpos = {x=139, y=396, z=6, stackpos=1}
rubypos = {x=137, y=396, z=6, stackpos=1}
getoldhelmet = getThingfromPos(oldhelmetpos)
getnewhelmet = getThingfromPos(newhelmetpos)
getruby = getThingfromPos(rubypos)

if item.uid == 5033 and item.itemid == 1945 and getoldhelmet.itemid == 2342 and getruby.itemid == 2156 then
 doRemoveItem(getoldhelmet.uid,1)
doSendMagicEffect(oldhelmetpos,23)
 doRemoveItem(2156,1)
doSendMagicEffect(rubypos,23)
 doCreateItem(2343,1,newhelmetpos)
doSendMagicEffect(getnewhelmet,23)
 else
doPlayerSendTextMessage(cid,22,"You need a Big Ruby to incrase your Helmet!")
end
return 1
end
 
Back
Top