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

Lever that takes tokens

froie

Expert Mapper
Joined
May 27, 2013
Messages
196
Reaction score
4
Location
Canada
So I was wondering if someone could help me out with a script, I was trying and cant seem to figure it out..
I wanted to have a lever that gives you a random monster outfit but only if you have 3 tokens, but i cant seem to figure it out it always takes the 3 tokens but you can use it without tokens
 
You can try this, Don't rep me for I only changed it to make it work for you. Whoever made the original script gets all the credit!

Code:
local itemid = 9020 --- Token Id here
local duration = 180000 ---How long the outfit lasts on character
local monsters = {"Hero", "Bear", "Witch", "Spider", "Ice Golem", "Cyclops", "cyclops smith"} ---Name of the outfits you want offered.


function onUse(cid, item, fromPosition, itemEx, toPosition)
if getPlayerMoney (cid) then
doPlayerRemoveItem(cid, itemid, 1)
doSetMonsterOutfit(cid,monsters[math.random(#monsters)],duration*1000)
doPlayerSendTextMessage(cid, 20, 'You got a random outfit for (amount of tokens)!') ---Insert how much the outfits are---
else
doPlayerSendTextMessage(cid, 20, 'You don\'t have the correct token for this!')
end
return true
end
 
Back
Top