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

Can someone fix this for me????

f@bio

Fudera Otserver
Joined
Jul 10, 2007
Messages
213
Reaction score
0
Location
Brasil
Hello friends, I created a script that does the following function:

- You kill a butterfly and use a itemid 4865 on her body, and this item transform to item 5079, but nothing is happening, I have make this script based on the quest of the entrance to the city of yalahar the global ...

- Here is the script:
--- Made by F@bio ---

function onUse(cid, item, frompos, item2, topos)

if item2.itemid == 4292 then
if getPlayerSoul(cid) > 5 then
if getPlayerMana(cid) > 100 then
doPlayerAddMana(cid,-100)
doPlayerAddSoul(cid,-5)
doPlayerRemoveItem(cid,4865,1)
doPlayerAddItem(cid,5089,1)
doSendMagicEffect(topos,6)
doTransformItem(item2.uid,4313)
doSendAnimatedText(topos,"Heheeee",35)
else
doCreatureSay(cid, "Você precisa de 100 de mana para usar esse item.", 19)
end
else
doCreatureSay(cid, "Você precisa de 5 soul para usar esse item.", 19)
end
end
return 1
end

- Here is the item in ACTIONS:

<action itemid="4865" script="Butterfly Container.lua"/>

---`Plx someone help to solve this error, i'm need this to make my yalahar complete... many thx for all....
 
PHP:
function onUse(cid, item, frompos, item2, topos)

if item2.itemid == 4292 then
if getPlayerSoul(cid) > 5 then
if getPlayerMana(cid) > 100 then
doPlayerAddMana(cid,-100) 
doPlayerAddSoul(cid,-5)
doPlayerRemoveItem(cid,4865,1)
doPlayerAddItem(cid,5089,1)
doSendMagicEffect(topos,6)
doTransformItem(item2.uid,4313)
doSendAnimatedText(topos,"Heheeee",35)
else
doPlayerSendCancel(cid, "Você precisa de 100 de mana para usar esse item.", 19)
end 
else
doPlayerSendCancel(cid, "Você precisa de 5 soul para usar esse item.", 19)
end 
end
return 1
end
 
Nothing happens, i'm use TFS 0.2-23 and when im use the item on a corpse, my actions dont work but dont send error message on console...
 

Similar threads

Back
Top