jhonatanp 26 Postado Agosto 20, 2012 Share Postado Agosto 20, 2012 o Script é function onUse(cid, item, frompos, item2, topos) local level = getPlayerLevel(cid) local mlevel = getPlayerMagLevel(cid) local exhausted_seconds = 1 local exhausted_storagevalue = 7480 local mana_minimum = 40000 local mana_maximum =40000 local mana_add = math.random(mana_minimum, mana_maximum) if(item.type >= 1) then if(os.time() > getPlayerStorageValue(cid, exhausted_storagevalue)) then if(isPlayer(cid) == 1) thendoSendMagicEffect(topos,12) doPlayerAddMana(cid, mana_add) doPlayerAddHealth(cid, mana_add)doPlayerSay(cid,"I feel the best",1) setPlayerStorageValue(cid, exhausted_storagevalue, os.time() + exhausted_seconds) doChangeTypeItem(item.uid, item.type - 1) else doSendMagicEffect(frompos, CONST_ME_POFF) doPlayerSendCancel(cid, "You are exchausted.") end else doSendMagicEffect(frompos, CONST_ME_POFF) doPlayerSendCancel(cid, "You are exhausted.") end else if(os.time() < getPlayerStorageValue(cid, exhausted_storagevalue)) then doSendMagicEffect(frompos, CONST_ME_POFF) doPlayerSendCancel(cid, "You are exhausted.") else if(isPlayer(cid) == 1) thendoSendMagicEffect(topos,12) doPlayerAddMana(cid, mana_add) doPlayerAddHealth(cid, mana_add*1.5)doPlayerSay(cid,"I feel the best",1) setPlayerStorageValue(cid, exhausted_storagevalue, os.time() + exhausted_seconds) doRemoveItem(item.uid, 1) else doSendMagicEffect(frompos, CONST_ME_POFF) doPlayerSendCancel(cid, "You are exchausted.") end end end return 1end [/poiler] Link para o comentário https://xtibia.com/forum/topic/192327-como-deixo-senzu-infinito/ Compartilhar em outros sites More sharing options...
0 notle2012 233 Postado Agosto 20, 2012 Share Postado Agosto 20, 2012 ver assim function onUse(cid, item, frompos, item2, topos) local level = getPlayerLevel(cid) local mlevel = getPlayerMagLevel(cid) local exhausted_seconds = 1 local exhausted_storagevalue = 7480 local mana_minimum = 40000 local mana_maximum =40000 local mana_add = math.random(mana_minimum, mana_maximum) if(item.type >= 1) then if(os.time() > getPlayerStorageValue(cid, exhausted_storagevalue)) then if(isPlayer(cid) == 1) then doSendMagicEffect(topos,12) doPlayerAddMana(cid, mana_add) doPlayerAddHealth(cid, mana_add) doPlayerSay(cid,"I feel the best",1) setPlayerStorageValue(cid, exhausted_storagevalue, os.time() + exhausted_seconds) doChangeTypeItem(item.uid, item.type - 1) else doSendMagicEffect(frompos, CONST_ME_POFF) doPlayerSendCancel(cid, "You are exchausted.") end else doSendMagicEffect(frompos, CONST_ME_POFF) doPlayerSendCancel(cid, "You are exhausted.") end else if(os.time() < getPlayerStorageValue(cid, exhausted_storagevalue)) then doSendMagicEffect(frompos, CONST_ME_POFF) doPlayerSendCancel(cid, "You are exhausted.") else if(isPlayer(cid) == 1) then doSendMagicEffect(topos,12) doPlayerAddMana(cid, mana_add) doPlayerAddHealth(cid, mana_add*1.5) doPlayerSay(cid,"I feel the best",1) setPlayerStorageValue(cid, exhausted_storagevalue, os.time() + exhausted_seconds) else doSendMagicEffect(frompos, CONST_ME_POFF) doPlayerSendCancel(cid, "You are exchausted.") end end end return 1 end Link para o comentário https://xtibia.com/forum/topic/192327-como-deixo-senzu-infinito/#findComment-1320529 Compartilhar em outros sites More sharing options...
0 jhonatanp 26 Postado Agosto 20, 2012 Autor Share Postado Agosto 20, 2012 Não funcionou ! Link para o comentário https://xtibia.com/forum/topic/192327-como-deixo-senzu-infinito/#findComment-1320588 Compartilhar em outros sites More sharing options...
0 LuckOake 400 Postado Agosto 20, 2012 Share Postado Agosto 20, 2012 (editado) Vê se assim resolve: function onUse(cid, item, frompos, item2, topos) local level = getPlayerLevel(cid) local mlevel = getPlayerMagLevel(cid) local exhausted_seconds = 1 local exhausted_storagevalue = 7480 local mana_minimum = 40000 local mana_maximum = 40000 local mana_add = math.random(mana_minimum, mana_maximum) if(item.type >= 1) then if(os.time() > getPlayerStorageValue(cid, exhausted_storagevalue)) then if(isPlayer(cid) == 1) then doSendMagicEffect(topos,12) doPlayerAddMana(cid, mana_add) doPlayerAddHealth(cid, mana_add) doPlayerSay(cid,"I feel the best",1) setPlayerStorageValue(cid, exhausted_storagevalue, os.time() + exhausted_seconds) else doSendMagicEffect(frompos, CONST_ME_POFF) doPlayerSendCancel(cid, "You are exchausted.") end else doSendMagicEffect(frompos, CONST_ME_POFF) doPlayerSendCancel(cid, "You are exhausted.") end else if(os.time() < getPlayerStorageValue(cid, exhausted_storagevalue)) then doSendMagicEffect(frompos, CONST_ME_POFF) doPlayerSendCancel(cid, "You are exhausted.") else if(isPlayer(cid) == 1) then doSendMagicEffect(topos,12) doPlayerAddMana(cid, mana_add) doPlayerAddHealth(cid, mana_add*1.5) doPlayerSay(cid,"I feel the best",1) setPlayerStorageValue(cid, exhausted_storagevalue, os.time() + exhausted_seconds) else doSendMagicEffect(frompos, CONST_ME_POFF) doPlayerSendCancel(cid, "You are exhausted.") end end end return true end Editado Agosto 20, 2012 por LuckOake Link para o comentário https://xtibia.com/forum/topic/192327-como-deixo-senzu-infinito/#findComment-1321015 Compartilhar em outros sites More sharing options...
Pergunta
jhonatanp 26
o Script é
function onUse(cid, item, frompos, item2, topos)
local level = getPlayerLevel(cid)
local mlevel = getPlayerMagLevel(cid)
local exhausted_seconds = 1
local exhausted_storagevalue = 7480
local mana_minimum = 40000
local mana_maximum =40000
local mana_add = math.random(mana_minimum, mana_maximum)
if(item.type >= 1) then
if(os.time() > getPlayerStorageValue(cid, exhausted_storagevalue)) then
if(isPlayer(cid) == 1) then
doSendMagicEffect(topos,12)
doPlayerAddMana(cid, mana_add)
doPlayerAddHealth(cid, mana_add)
doPlayerSay(cid,"I feel the best",1)
setPlayerStorageValue(cid, exhausted_storagevalue, os.time() + exhausted_seconds)
doChangeTypeItem(item.uid, item.type - 1)
else
doSendMagicEffect(frompos, CONST_ME_POFF)
doPlayerSendCancel(cid, "You are exchausted.")
end
else
doSendMagicEffect(frompos, CONST_ME_POFF)
doPlayerSendCancel(cid, "You are exhausted.")
end
else
if(os.time() < getPlayerStorageValue(cid, exhausted_storagevalue)) then
doSendMagicEffect(frompos, CONST_ME_POFF)
doPlayerSendCancel(cid, "You are exhausted.")
else
if(isPlayer(cid) == 1) then
doSendMagicEffect(topos,12)
doPlayerAddMana(cid, mana_add)
doPlayerAddHealth(cid, mana_add*1.5)
doPlayerSay(cid,"I feel the best",1)
setPlayerStorageValue(cid, exhausted_storagevalue, os.time() + exhausted_seconds)
doRemoveItem(item.uid, 1)
else
doSendMagicEffect(frompos, CONST_ME_POFF)
doPlayerSendCancel(cid, "You are exchausted.")
end
end
end
return 1
end
[/poiler]
Link para o comentário
https://xtibia.com/forum/topic/192327-como-deixo-senzu-infinito/Compartilhar em outros sites
3 respostass a esta questão
Posts Recomendados