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

Issue with Exp Item script (doesn't remove item).

FenX

Advanced OT User
Joined
Jul 8, 2019
Messages
360
Solutions
1
Reaction score
159
Hello everyone,

Found this recently:

Lua:
function onUse(cid, item, frompos, item2, topos)
doPlayerAddExp(cid, 30000)
doCreatureSay(cid, "You open the book and start to read...suddenly you feel smarter.", TALKTYPE_ORANGE_1)
doRemoveItem(cid, item.uid, 1)
return true
end

Issue with the script is that when the item is used it's not removed. I'm not a scripter so I'd appreciate some insight lol.

Thanks!
 
Solution
Lua:
function onUse(cid, item, frompos, item2, topos)
doPlayerAddExp(cid, 30000)
doCreatureSay(cid, "You open the book and start to read...suddenly you feel smarter.", TALKTYPE_ORANGE_1)
doRemoveItem(item.uid, 1)
return true
end
Lua:
function onUse(cid, item, frompos, item2, topos)
doPlayerAddExp(cid, 30000)
doCreatureSay(cid, "You open the book and start to read...suddenly you feel smarter.", TALKTYPE_ORANGE_1)
doRemoveItem(item.uid, 1)
return true
end
 
Solution
Lua:
function onUse(cid, item, frompos, item2, topos)
doPlayerAddExp(cid, 30000)
doCreatureSay(cid, "You open the book and start to read...suddenly you feel smarter.", TALKTYPE_ORANGE_1)
doRemoveItem(item.uid, 1)
return true
end

I see you removed "cid" - reason? (so I know for the future :'D)
& thanks! <3
 
Back
Top