Aqui está
<talkaction words="!newhealth;!superhealth;!supermana;!especialhealth;!especialmana" script="buyhealth.lua"/>
function onSay(cid, words, param)
if(isPlayerPzLocked(cid) ~= true) then
if(words == "!newhealth") then
if(getPlayerStorageValue(cid, 25001) <= 0) then
if(doPlayerRemoveMoney(cid, 20000) == true)
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)+20000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)+20000)
doPlayerSetStorageValue(cid, 25001, 1)
doCreatureAddHealth(cid, getCreatureMaxHealth(cid))
doCreatureAddMana(cid, getCreatureMaxMana(cid))
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não tem 20000 gps.")
end
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você já comprou.")
end
elseif(words == "!superhealth") then
if(getPlayerStorageValue(cid, 25002) <= 0) then
if(doPlayerRemoveMoney(cid, 2500000) == true)
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)+250000)
doPlayerSetStorageValue(cid, 25002, 1)
doCreatureAddHealth(cid, getCreatureMaxHealth(cid))
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não tem 2500000 gps.")
end
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você já comprou.")
end
elseif(words == "!supermana") then
if(getPlayerStorageValue(cid, 25003) <= 0) then
if(doPlayerRemoveMoney(cid, 2500000) == true)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)+250000)
doPlayerSetStorageValue(cid, 25003, 1)
doCreatureAddMana(cid, getCreatureMaxMana(cid))
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não tem 2500000 gps.")
end
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você já comprou.")
end
elseif(words == "!especialhealth") then
if(getPlayerStorageValue(cid, 25004) <= 0) then
if(doPlayerRemoveMoney(cid, 5000000) == true)
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)+500000)
doPlayerSetStorageValue(cid, 25004, 1)
doCreatureAddHealth(cid, getCreatureMaxHealth(cid))
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não tem 5000000 gps.")
end
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você já comprou.")
end
elseif(words == "!especialmana") then
if(getPlayerStorageValue(cid, 25005) <= 0) then
if(doPlayerRemoveMoney(cid, 5000000) == true)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)+500000)
doPlayerSetStorageValue(cid, 25005, 1)
doCreatureAddMana(cid, getCreatureMaxMana(cid))
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não tem 5000000 gps.")
end
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você já comprou.")
end
end
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não pode comprar quando estiver com battle.")
end
return true
end
Espero que goste =]