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

How Do I edit this script to not spam my server?

mikkas70

Owner and Developer of omegaservers.org
Joined
Jan 6, 2009
Messages
42
Reaction score
8
I have this script which on use, broadcasts a message, it has an exhaust time, but if the player logs out and logs in again, he will be able to use the script again.

doll.lua:
Code:
local waittime = 15 -- Tempo para se transformar novamente (em minutos)
local exhaust = createConditionObject(CONDITION_EXHAUST)
local CustomOutfits = {lookType = 2}

setConditionParam(exhaust, CONDITION_PARAM_TICKS, (60 * 1000 * waittime))

function onUse(cid, item, fromPosition, itemEx, toPosition)

if hasCondition(cid, CONDITION_EXHAUST) == TRUE then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "You can only transform each "..waittime.." minutes")
return TRUE
end


if hasCondition(cid, CONDITION_EXHAUST) == FALSE then
doSetCreatureOutfit(cid, CustomOutfits, waittime * 60 * 1000)
doSendMagicEffect(getCreaturePosition(cid), 30)
doBroadcastMessage("Player "..getCreatureName(cid).." is a true warlord, and he is ready to kill more, fear him.", 22)
doAddCondition(cid, exhaust)
end
return TRUE
end
 

Similar threads

Back
Top