Postado Dezembro 25, 2014 10 anos Oi este meu primeiro pedido , simples gostaria apenas de um script que deslg o player apos X tempo em uma tile , n precisa rsponder n precisa fazer nada apenas kick ele apos x tempo com batle ou sem SIMPLES obg aguardo Respostas
Postado Dezembro 25, 2014 10 anos idletile.lua (data/creaturescripts/scripts): function onThink(cid, interval) local kicktime = 10 local tileactionid = 54321 local idletime = getPlayerIdleTime(cid) + interval if getTileThingByPos(getCreaturePosition(cid)).actionid == tileactionid then if getPlayerCustomFlagValue(cid, PLAYERCUSTOMFLAG_ALLOWIDLE) then return true end doPlayerSetIdleTime(cid, idletime) if idletime > kicktime * 60 * 1000 then doRemoveCreature(cid) end end return true end Tag - creaturescripts.xml (data/creaturescripts): <event type="think" name="IdleTile" event="script" value="idletile.lua"/> Registre o creature event em login.lua (data/creaturescripts/scripts): registerCreatureEvent(cid, "IdleTile") Adicione o action ID (declarado na variável local tileactionid do script, que como exemplo foi 54321) ao tile que você deseja.
Postado Dezembro 29, 2014 10 anos Autor desde ja vou dar o rep+ pela tentativa , porem vou testar e dou a resposta obg. =D Em 25/12/2014 em 22:49, Suicide disse: idletile.lua (data/creaturescripts/scripts): function onThink(cid, interval) local kicktime = 10 local tileactionid = 54321 local idletime = getPlayerIdleTime(cid) + interval if getTileThingByPos(getCreaturePosition(cid)).actionid == tileactionid then if getPlayerCustomFlagValue(cid, PLAYERCUSTOMFLAG_ALLOWIDLE) then return true end doPlayerSetIdleTime(cid, idletime) if idletime > kicktime * 60 * 1000 then doRemoveCreature(cid) end end return true end Tag - creaturescripts.xml (data/creaturescripts): <event type="think" name="IdleTile" event="script" value="idletile.lua"/> Registre o creature event em login.lua (data/creaturescripts/scripts): registerCreatureEvent(cid, "IdleTile") Adicione o action ID (declarado na variável local tileactionid do script, que como exemplo foi 54321) ao tile que você deseja. CARA OTIMO SCRIPT MAIS N FUNFO , PRECISO APENAS DE UM SCRIPT Q AO PISAR EM X TILE ESTANDO LA COM BATLE OU N APOS 1 MIN E KIKADO SO ISSO , TENTEI ESTE E N DEU CERTO , TEM Q KIKAR ELE MESMO Q ESTEJA COM BATLE Editado Dezembro 29, 2014 10 anos por wandersonnc (veja o histórico de edições)
Postado Dezembro 29, 2014 10 anos movement kick_time = 60 -- tempo que precisa ficar no tile para ser deslogado function kick_time_by_pos(cid, ml, kicktime, postile) if not isCreature(cid) then return true end if ml == kicktime then return doRemoveCreature(cid) end if getThingPos(cid).x ~= postile.x or getThingPos(cid).y ~= postile.y or getThingPos(cid).z ~= postile.z then return true end addEvent(kick_time_by_pos, 1, cid, ml+1, kicktime, postile) end function function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor) return kick_time_by_pos(cid, 0, kick_time * 10000, position) end <movevent type="StepIn" actionid="" event="script" value=".lua"/>
Postado Dezembro 29, 2014 10 anos Autor Em 29/12/2014 em 02:23, Gantz disse: movement kick_time = 60 -- tempo que precisa ficar no tile para ser deslogado function kick_time_by_pos(cid, ml, kicktime, postile) if not isCreature(cid) then return true end if ml == kicktime then return doRemoveCreature(cid) end if getThingPos(cid).x ~= postile.x or getThingPos(cid).y ~= postile.y or getThingPos(cid).z ~= postile.z then return true end addEvent(kick_time_by_pos, 1, cid, ml+1, kicktime, postile) end function function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor) return kick_time_by_pos(cid, 0, kick_time * 10000, position) end <movevent type="StepIn" actionid="" event="script" value=".lua"/> Me explica um pouco a mais do script tipo onde fica o id q vou por na tile , e este 60 representa 1 min ?
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.