Postado Agosto 19, 2019 5 anos Gostaria de adicionar ao sistema de Hold Position um tempo máximo até o efeito parar. Dessa forma, os jogadores não conseguem abusar do bug de dar follow no pokemon parado e upar a Bike. Gostaria que o pokemon voltasse ao normal após 10s. Meu servidor é KPDO, seguem os scripts relacionados ao hold position:ARQUIVO ORDER.LUA local spd = getCreatureSpeed(summons) local bspd = getCreatureBaseSpeed(summons) local viadao = getCreatureSummons(cid)[1] if getPlayerStorageValue(viadao, 9951) >= 1 then doCreatureSay(cid, ""..mon..", hold position!", TALKTYPE_SAY) setPlayerStorageValue(viadao, 1869, 0) setPlayerStorageValue(viadao, 2997, 0) setPlayerStorageValue(viadao, 9951, 0) elseif spd >= 1 then doChangeSpeed(summons, -spd) doCreatureSay(cid, ""..mon..", hold position!", TALKTYPE_SAY) elseif spd == 0 then doChangeSpeed(summons, bspd) doCreatureSay(cid, ""..mon..", stop holding!", TALKTYPE_SAY) end return true end ARQUIVO Hold Pos (talkactions) function onSay(cid, words, param) if #getCreatureSummons(cid) == 0 then return doPlayerSendCancel(cid, "You don't have any pokemon!") end if exhaustion.get(cid, 2) then return doPlayerSendCancel(cid, "Wait a few seconds before using this command again.") end local summons = getCreatureSummons(cid)[1] local mon = getCreatureName(summons) local spd = getCreatureSpeed(summons) local bspd = getCreatureBaseSpeed(summons) if spd >= 1 then doChangeSpeed(summons, -spd) doCreatureSay(cid, ""..mon..", hold position!", TALKTYPE_SAY) else doChangeSpeed(summons, bspd) doCreatureSay(cid, ""..mon..", stop holding!", TALKTYPE_SAY) exhaustion.set(cid, 2, 2) end return 0 end
Postado Agosto 19, 2019 5 anos function onSay(cid, words, param) if #getCreatureSummons(cid) == 0 then return doPlayerSendCancel(cid, "You don't have any pokemon!") end if exhaustion.get(cid, 2) then return doPlayerSendCancel(cid, "Wait a few seconds before using this command again.") end local tempoHold = 10000 local summons = getCreatureSummons(cid)[1] local mon = getCreatureName(summons) local spd = getCreatureSpeed(summons) local bspd = getCreatureBaseSpeed(summons) if spd >= 1 then doChangeSpeed(summons, -spd) doCreatureSay(cid, ""..mon..", hold position!", TALKTYPE_MONSTER) addEvent(doCreatureExecuteTalkAction, tempoHold, cid, '.h', true) else doChangeSpeed(summons, bspd) doCreatureSay(cid, ""..mon..", stop holding!", TALKTYPE_MONSTER) exhaustion.set(cid, 2, 2) end return 0 end Opa amigo está ai o código, assim quando o jogador utilizar o .h, após 10 segundos (10000 milissegundos no script) ele vai automaticamente utilizar o .h novamente após 10 segundos fazendo com que o hold pos desative. Editado Agosto 19, 2019 5 anos por Rafaelk36 (veja o histórico de edições)
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.