Postado Março 11, 2017 8 anos Olá, alguém poderia corrigir esse script? Para que quando não tiver nem red skull ou black skull, apareca a mensagem "Você precisa estar red skull ou black skull." Pois quando utilizado o comando sem a skull, ainda sim, sai a mensagem de que a "skull foi removida", de fora so isso, porque ele é funcional. --- skull remover by kakilo - quinto script function onSay(cid, words, param, channel) if (getCreatureSkullType(cid) == SKULL_BLACK) then if doPlayerRemoveMoney(cid, 5000000) then doCreatureSetSkullType(cid, SKULL_NONE) doPlayerSendTextMessage(cid, 22, "Black Skull Retirada.") else doPlayerSendTextMessage(cid, 22, "Voce precisa de 5kk para remover a sua black skull") end end if (getCreatureSkullType(cid) == SKULL_RED) then if doPlayerRemoveMoney(cid, 3000000) then doCreatureSetSkullType(cid, SKULL_NONE) doPlayerSendTextMessage(cid, 22, "Red Skull Retirada.") else doPlayerSendTextMessage(cid, 22, "Voce precisa de 3kk para remover a sua red skull") end end if (getCreatureSkullType(cid) == SKULL_NONE) then doPlayerSendTextMessage(cid, 22, "Sua skull foi retirada com sucesso!") end return TRUE end (1º) | [8.60] - Galaxy Server - Download (2º) | [8.60] - Glorious Server - Download (3º) | [8.60] - Epic Server - Download
Postado Março 11, 2017 8 anos --- skull remover by kakilo - quinto script function onSay(cid, words, param, channel) if (getCreatureSkullType(cid) == SKULL_BLACK) then if doPlayerRemoveMoney(cid, 5000000) then doCreatureSetSkullType(cid, SKULL_NONE) doPlayerSendTextMessage(cid, 22, "Black Skull Retirada.") else doPlayerSendTextMessage(cid, 22, "Voce precisa de 5kk para remover a sua black skull") end end if (getCreatureSkullType(cid) == SKULL_RED) then if doPlayerRemoveMoney(cid, 3000000) then doCreatureSetSkullType(cid, SKULL_NONE) doPlayerSendTextMessage(cid, 22, "Red Skull Retirada.") else doPlayerSendTextMessage(cid, 22, "Voce precisa de 3kk para remover a sua red skull") end end if (getCreatureSkullType(cid) == SKULL_NONE) then doPlayerSendTextMessage(cid, 22, "Você precisa estar red skull ou black skull!") end return TRUE end Life is so meaningless, there is nothing worth a smile So goodbye, I'll miss you sugestões?
Postado Março 11, 2017 8 anos --- skull remover by kakilo - quinto script function onSay(cid, words, param, channel) if (getCreatureSkullType(cid) == SKULL_BLACK) then if doPlayerRemoveMoney(cid, 5000000) then doCreatureSetSkullType(cid, SKULL_NONE) doPlayerSendTextMessage(cid, 22, "Black Skull Retirada.") else doPlayerSendTextMessage(cid, 22, "Voce precisa de 5kk para remover a sua black skull") end end if (getCreatureSkullType(cid) == SKULL_RED) then if doPlayerRemoveMoney(cid, 3000000) then doCreatureSetSkullType(cid, SKULL_NONE) doPlayerSendTextMessage(cid, 22, "Red Skull Retirada.") else doPlayerSendTextMessage(cid, 22, "Voce precisa de 3kk para remover a sua red skull") end end if (getCreatureSkullType(cid) == SKULL_NONE) then doPlayerSendCancel(cid, "Voce precisa ser Red ou Black Skull para usar.") doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF) end return TRUE end GitHub: https://github.com/s3kk Conteúdo: [SERVER] Heromassa[GESIOR] Gesior 2012 modificado por Sekk[GESIOR] Shop Addons & Mounts - TFS 1.x[GESIOR] Outfitter para Characters e Rank[SISTEMA] Castle 24h[TALKACTION] Multi Element Wand[ACTION] Multi Elemental Arrow & Shield[PROGRAMAÇÃO] Compilar TFS 0.4 no Linux[PROGRAMAÇÃO] Compilando TFS 0.4 no MSVC(x64 e x32) [INFRAESTRUTURA] Configuração COMPLETA Google VM + Tibia 11.x
Postado Março 11, 2017 8 anos Na verdade assim evita duas possíveis mensagens: --- skull remover by kakilo - quinto script function onSay(cid, words, param, channel) if (getCreatureSkullType(cid) == SKULL_NONE) then doPlayerSendTextMessage(cid, 22, "Você precisa estar red skull ou black skull!") end if (getCreatureSkullType(cid) == SKULL_BLACK) then if doPlayerRemoveMoney(cid, 5000000) then doCreatureSetSkullType(cid, SKULL_NONE) doPlayerSendTextMessage(cid, 22, "Black Skull Retirada.") else doPlayerSendTextMessage(cid, 22, "Voce precisa de 5kk para remover a sua black skull") end end if (getCreatureSkullType(cid) == SKULL_RED) then if doPlayerRemoveMoney(cid, 3000000) then doCreatureSetSkullType(cid, SKULL_NONE) doPlayerSendTextMessage(cid, 22, "Red Skull Retirada.") else doPlayerSendTextMessage(cid, 22, "Voce precisa de 3kk para remover a sua red skull") end end return TRUE end Life is so meaningless, there is nothing worth a smile So goodbye, I'll miss you sugestões?
Postado Março 11, 2017 8 anos Autor Obrigado aos 2, ambos reputado (1º) | [8.60] - Galaxy Server - Download (2º) | [8.60] - Glorious Server - Download (3º) | [8.60] - Epic Server - Download
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.