Postado Julho 20, 2018 6 anos Boa tarde Galerinha do TK Estou com um problema em 2 scripts de talkactions eles funciona para adicionar 1000 de life e 1000 de mana ao player.! mas se o player estiver level muito alto ele adiciona mais de 1000.! ja tentei corrigir os scripts mas nao Consegui!!!!....... alguem pode me ajuda??? script de life local storage = 3420060 function onSay(cid, words, param) local limit = isInArray({4,8,12}, getPlayerVocation(cid)) and 250 or isInArray({3, 7, 1, 2, 5, 6,9,10,11}, getPlayerVocation(cid)) and 125 or 0 local amount = getPlayerStorageValue(cid, storage) <= 0 and 0 or getPlayerStorageValue(cid, storage) if limit <= 0 or amount == limit then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "voce nao pode usar ou atingiu o limite maximo de "..limit.." Life Scroll por character.") return true end if doPlayerRemoveItem(cid,11213,1) and getCreatureMaxHealth(cid) <= 1900000 then setPlayerStorageValue(cid, storage) setCreatureMaxHealth(cid,getCreatureMaxHealth(cid) + 1000) doSendMagicEffect(getPlayerPosition(cid), CONST_ME_MORTAREA) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "voce recebeu 1000 de Life.") else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Voce nao tem life scroll ou ja atingiu o LIFE Maximo de life permitido digite !myhp.") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_FLAMEAREA) end return true end Scripit de Mana local storage = 3420050 function onSay(cid, words, param) local limit = isInArray({1,2, 5, 6,9,10}, getPlayerVocation(cid)) and 250 or isInArray({3, 7,11}, getPlayerVocation(cid)) and 125 or 0 local amount = getPlayerStorageValue(cid, storage) <= 0 and 0 or getPlayerStorageValue(cid, storage) if limit <= 0 or amount == limit then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "voce nao pode usar ou atingiu o limite maximo de "..limit.." Mana Scroll por character.") return true end if doPlayerRemoveItem(cid,9020,1) and getCreatureMaxMana(cid) <= 1900000 then setPlayerStorageValue(cid, storage) setCreatureMaxMana(cid,getCreatureMaxMana(cid) + 1000) doSendMagicEffect(getPlayerPosition(cid), CONST_ME_MORTAREA) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "voce recebeu 1000 de Mana.") else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Voce nao tem Mana scroll ou ja atingiu o Mana Maximo de mana permitido digite !mymp.") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_FLAMEAREA) end return true end obrigado +Rep
Postado Julho 21, 2018 6 anos @mullino Por que não usa o SQL? Aumenta a life e mana do player por lá.. Tambem pode mudar a hp do player pelo comando /attr maxhealth X Editado Julho 21, 2018 6 anos por King Laker (veja o histórico de edições) Olá, que tal dar uma olhada no meu projeto? https://discord.gg/bsNkbsyJ3W
Postado Julho 21, 2018 6 anos Autor 2 horas atrás, King Laker disse: @mullino Por que não usa o SQL? Aumenta a life e mana do player por lá.. Tambem pode mudar a hp do player pelo comando /attr maxhealth X esse é um item amigo que o player faz quest ae ele ganha o item que add mana ou hp nele ! nao sou eu que edito
Postado Julho 21, 2018 6 anos Autor 17 minutos atrás, victor4312 disse: se interessar, e uma action. vou testar
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.