xLosT
Member
i need add interval 2 seconds in my script
i pay 3 USD for paypal
all script
i pay 3 USD for paypal
PHP:
function onThink(interval)
all script
PHP:
<event type="think" name="ctff" event="script"><![CDATA[
domodlib('CTF')
domodlib('CTF-lib')
local bl = BLUE_FLAG
local re = RED_FLAG
function onThink(interval)
if getGlobalStorageValue(Event_Start) > 0 and getGlobalStorageValue(Event_timeend) > 0 then
if redStolen() < 0 then
doSendAnimatedText(re,"FLAG!",TEXTCOLOR_DARKRED)
doSendMagicEffect(re, CONST_ME_SOUND_RED)
end
if blueStolen() < 0 then
doSendAnimatedText(bl,"FLAG!",TEXTCOLOR_GREEN)
doSendMagicEffect(bl, CONST_ME_SOUND_GREEN)
end
for _, cid in ipairs(getPlayersOnline()) do
if flagOwner(cid) then
if isTeamOne(cid) or isTeamTwo(cid) then
if hasCondition(cid,CONDITION_HASTE) then
doRemoveCondition(cid,CONDITION_HASTE)
end
end
pl = getThingPos(cid)
if isTeamTwo(cid) then
if getPlayerStorageValue(cid,103) < os.time() then
releaseBF(cid)
for _,cid in ipairs(getPlayersOnline()) do
if isTeamOne(cid) or isTeamTwo(cid) then
doPlayerSendTextMessage(cid,22,getCreatureName(cid) .. " wasted 5 minutes with FLAG."..TEAM2_NAME.." flag is again on spawn!")
end
end
else
doSendAnimatedText(pl,"FLAG!",TEXTCOLOR_GREEN)
doSendMagicEffect(pl, CONST_ME_SOUND_GREEN)
end
elseif isTeamOne(cid) then
if getPlayerStorageValue(cid,103) < os.time() then
releaseRF(cid)
for _,cid in ipairs(getPlayersOnline()) do
if isTeamOne(cid) or isTeamTwo(cid) then
doPlayerSendTextMessage(cid,22,getCreatureName(cid) .. " wasted 5 minutes with FLAG."..TEAM1_NAME.." flag is again on spawn!")
end
end
else
doSendAnimatedText(pl,"FLAG!",COLOR_RED)
doSendMagicEffect(pl, CONST_ME_SOUND_RED)
end
end
end
end
end
return true