Postado Junho 20, 2020 4 anos Olá a todos, Gostaria de colocar uma contagem nessa parte do script ou seja, aparecer no default em laranja a cada mob que for morto. Script: (Creaturescript) if(isMonster(target) == TRUE) then if getCreatureName(target) == "Renegade" then if(getPlayerStorageValue(cid,19100) <= 0) then setPlayerStorageValue(cid, 19100, 1) else setPlayerStorageValue(cid, 19100, getPlayerStorageValue(cid,19100)+1) end end Essa parte fica no final do script: if(getPlayerStorageValue(cid,19100) >= 75) then setPlayerStorageValue(cid, 9100, 1) Essa aqui e onde fica no npc: elseif (isFocused(cid) and msg == "c rank") and getPlayerStorageValue(cid,9001) == 2 then selfSay("Mission {C-2}: Kill 75 Renegades then back and say {mission}.", cid) elseif (isFocused(cid) and msg == "mission") and getPlayerStorageValue(cid,9001) == 2 and getPlayerStorageValue(cid,9100) == 1 then doPlayerAddExp(cid,75000) doPlayerAddItem(cid,2160,3) setPlayerStorageValue(cid,9001,3) selfSay("Well, ".. getCreatureName(cid) ..". mission C-2 Success!", cid)
Postado Junho 21, 2020 4 anos Em 20/06/2020 em 13:53, leozincorsair disse: Script: (Creaturescript) if(isMonster(target) == true) then if getCreatureName(target) == "Renegade" then if(getPlayerStorageValue(cid,19100) <= 0) then setPlayerStorageValue(cid, 19100, 1) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "1/75 Renegades mortos.") else setPlayerStorageValue(cid, 19100, getPlayerStorageValue(cid,19100) + 1) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, getPlayerStorageValue(cid,19100) .. "/75 monstros Renegades mortos.") end end Editado Junho 21, 2020 4 anos por luanluciano93 (veja o histórico de edições) STYLLER OT 2022
Postado Junho 22, 2020 4 anos Autor 5 horas atrás, luanluciano93 disse: if(isMonster(target) == true) then if getCreatureName(target) == "Renegade" then if(getPlayerStorageValue(cid,19100) <= 0) then setPlayerStorageValue(cid, 19100, 1) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "1/75 Renegades mortos.") else setPlayerStorageValue(cid, 19100, getPlayerStorageValue(cid,19100) + 1) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, getPlayerStorageValue(cid,19100) .. "/75 monstros Renegades mortos.") end end Obrigado , me ajudou mttt 5 horas atrás, luanluciano93 disse: if(isMonster(target) == true) then if getCreatureName(target) == "Renegade" then if(getPlayerStorageValue(cid,19100) <= 0) then setPlayerStorageValue(cid, 19100, 1) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "1/75 Renegades mortos.") else setPlayerStorageValue(cid, 19100, getPlayerStorageValue(cid,19100) + 1) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, getPlayerStorageValue(cid,19100) .. "/75 monstros Renegades mortos.") end end Só tem um probleminha, quando termina de matar os 75 a contagem continua mesmo eu entregando a missão pro npc.
Postado Junho 22, 2020 4 anos @leozincorsair if isMonster(target) == true and getCreatureName(target) == "Renegade" then local amount = getPlayerStorageValue(cid,19100) <= 0 and 0 or getPlayerStorageValue(cid, 19100) if amount < 75 then setPlayerStorageValue(cid, 19100, amount+1) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Você matou "..getPlayerStorageValue(cid, 19100).."/75 Renegades.") end end [*Ninguém será digno do sucesso se não usar suas derrotas para conquistá-lo.*] DISCORD: vodkart#6090
Postado Junho 22, 2020 4 anos Autor 2 horas atrás, Vodkart disse: @leozincorsair if isMonster(target) == true and getCreatureName(target) == "Renegade" then local amount = getPlayerStorageValue(cid,19100) <= 0 and 0 or getPlayerStorageValue(cid, 19100) if amount < 75 then setPlayerStorageValue(cid, 19100, amount+1) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Você matou "..getPlayerStorageValue(cid, 19100).."/75 Renegades.") end end deu esse error
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.