Histórico de Curtidas
-
Knightmare Projects deu reputação a luangop em Bau De Quest Anti McQuando o player pegar o item, já vai ficar impossibilitado de pegar denovo no mesmo dia, então nem precisa registrar storage, logo eliminando a necessidade de limpar a storage depois =)
-
Knightmare Projects deu reputação a luangop em Bau De Quest Anti McSe fosse eu, faria a tag do globalevent assim:
<globalevent name="CleanIpList" time="23:00" event="script" value="CLEANIPLIST.lua"/> Pois da forma que você fez, vai verificar durante o dia todo, a cada 30 segundos. E dessa forma o script só roda no momento especificado.
-
Knightmare Projects deu reputação a luangop em Primeira vez que matar X monstro, storage X vai se tornar 1data/creaturescripts/scripts crie um arquivo killmission.lua
local config = { message = "Congrulations. Now you can proceed your quest.", -- Mensagem que aparece quando matar o boss monsterName = "demon", -- Nome do monstro sto = 9898 -- storage do sistema } function onKill(cid, target, lastHit) if isMonster(target) then registerCreatureEvent(target, "killmission") local position = getCreaturePosition(target) if (getCreatureName(target):lower() == string.lower(config.monsterName)) and getPlayerStorageValue(cid, config.sto) <= 0 then doCreatureSay(target, config.message, TALKTYPE_ORANGE_1) setPlayerStorageValue(cid, config.sto, 1) doSendMagicEffect(position,10) end return true end end data/creaturescripts creaturescripts.xml
<event type="kill" name="killmission" script="killmission.lua"/> Em data/creaturescripts/scripts login.lua
Adicione a linha:
registerCreatureEvent(cid, "killmission")
-
Knightmare Projects deu reputação a luangop em Bau De Quest Anti McSó faltou um then no arquivo CLEANIPLIST.lua
function verifyTime(interval) if getWorldTime() > 2259 and getWorldTime() < 2301 then doBroadcastMessage("Lista de IPs Resetada! Bau liberado!") file = io.open('data/actions/scripts/iplist.txt', 'w') file:write("") file:close() return true end end
-
Knightmare Projects recebeu reputação de Igorzerah em Bau De Quest Anti Mcdata/actions/scripts/NOMEDOSCRIPT.lua
function onUse(cid, item, frompos, item2, topos) queststorage = 9881 queststatus = getPlayerStorageValue(cid,queststorage) if queststatus == -1 then questipdone = 0 playerip = getPlayerIp(cid) file = io.open('data/actions/scripts/iplist.txt', 'r') while true do local line = file:read("*l") if line == nil then break end if line == tostring(playerip) then questipdone = 1 end end ile:close() if questipdone == 0 then doCreatureSay(cid, "Voce abriu o bau e recebeu a recompensa!", TALKTYPE_ORANGE_1) doPlayerAddItem(cid,ITEMID,QUANTIA) setPlayerStorageValue(cid,queststorage,1) doSendMagicEffect(getPlayerPosition(cid), 30) file = io.open('data/actions/scripts/iplist.txt','a') file:write("" .. playerip .. "\n") file:close() else doCreatureSay(cid, "Apenas um jogador por IP pode adquirir a recompensa!", TALKTYPE_ORANGE_1) doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) end else doCreatureSay(cid, "Vazio!", TALKTYPE_ORANGE_1) doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) end end Crie também junto o arquivo iplist.txt que vai armazenar a lista de IPs
data/actions/actions.xml
<action actionid="ACTIONID" script="NOMEDOSCRIPT.lua"/>
agora em data/globalevents/scripts/CLEANIPLIST.lua
function verifyTime(interval) if getWorldTime() > 2259 and getWorldTime() < 2301 doBroadcastMessage("Lista de IPs Resetada! Bau liberado!") file = io.open('data/actions/scripts/iplist.txt', 'w') file:write("") file:close() return true end end data/globalevents/globalevent.xml
<globalevent name="CleanIPList" interval="30000" event="script" value="CLEANIPLIST.lua"/> <!-- Verifica a cada 30 Segundos se é hora ou não, se for ele vai limpar --> Eu não testei ele porque to com nenhum ot aqui baixado. @igorcano1
-
Knightmare Projects recebeu reputação de luangop em Bau De Quest Anti Mcdata/actions/scripts/NOMEDOSCRIPT.lua
function onUse(cid, item, frompos, item2, topos) queststorage = 9881 queststatus = getPlayerStorageValue(cid,queststorage) if queststatus == -1 then questipdone = 0 playerip = getPlayerIp(cid) file = io.open('data/actions/scripts/iplist.txt', 'r') while true do local line = file:read("*l") if line == nil then break end if line == tostring(playerip) then questipdone = 1 end end ile:close() if questipdone == 0 then doCreatureSay(cid, "Voce abriu o bau e recebeu a recompensa!", TALKTYPE_ORANGE_1) doPlayerAddItem(cid,ITEMID,QUANTIA) setPlayerStorageValue(cid,queststorage,1) doSendMagicEffect(getPlayerPosition(cid), 30) file = io.open('data/actions/scripts/iplist.txt','a') file:write("" .. playerip .. "\n") file:close() else doCreatureSay(cid, "Apenas um jogador por IP pode adquirir a recompensa!", TALKTYPE_ORANGE_1) doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) end else doCreatureSay(cid, "Vazio!", TALKTYPE_ORANGE_1) doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) end end Crie também junto o arquivo iplist.txt que vai armazenar a lista de IPs
data/actions/actions.xml
<action actionid="ACTIONID" script="NOMEDOSCRIPT.lua"/>
agora em data/globalevents/scripts/CLEANIPLIST.lua
function verifyTime(interval) if getWorldTime() > 2259 and getWorldTime() < 2301 doBroadcastMessage("Lista de IPs Resetada! Bau liberado!") file = io.open('data/actions/scripts/iplist.txt', 'w') file:write("") file:close() return true end end data/globalevents/globalevent.xml
<globalevent name="CleanIPList" interval="30000" event="script" value="CLEANIPLIST.lua"/> <!-- Verifica a cada 30 Segundos se é hora ou não, se for ele vai limpar --> Eu não testei ele porque to com nenhum ot aqui baixado. @igorcano1