Por Canibow, 24 de jan. de 2009 em Archived
info
Grupo: Campones
Registrado: 02/03/08
Posts: 2
Reputação: 0
ae galera eh o seguinte eu queria que nesse script a mana fluid seja usada pelo hotkey, com um exaust bom e que não seja infinita...
ajudem ae
flws
function onUse(cid, item, frompos, item2, topos)
if (exhaust(cid, 600, 1) > 0) then ----------------- storage = 1000 exausted time = 1 segundo
if item2.itemid == 1 then
if item.type == 0 then
doPlayerSendCancel(cid, "It is empty.")
else
if item2.uid == cid then
if item.type == 7 then
new_mana = math.random(80, 160)
doPlayerAddMana(cid, new_mana)
doSendMagicEffect(topos, 12)
doPlayerSay(cid, "Aaaah...", 1)
elseif item.type == 10 then
new_life = math.random(40, 80)
doPlayerAddHealth(cid, new_life)
doPlayerSay(cid, "Gulp.", 1)
end
splash = doCreateItem(2025, item.type, topos)
doDecayItem(splash)
elseif item2.itemid >= 490 and item2.itemid <= 517
or item2.itemid >= 618 and item2.itemid <= 629
or item2.itemid == 1368 or item2.itemid == 1369
or item2.itemid >= 4820 and item2.itemid <= 4825
or item2.itemid >= 4828 and item2.itemid <= 4831
or item2.itemid >= 4608 and item2.itemid <= 4666 then
doChangeTypeItem(item.uid, 1)
elseif item2.itemid == 103 then
doChangeTypeItem(item.uid, 19)
elseif item2.itemid >= 598 and item2.itemid < 601
or item2.itemid == 1509
or item2.itemid >= 518 and item2.itemid <= 529 then
doChangeTypeItem(item.uid, 26)
elseif item2.itemid >= 351 and item2.itemid <= 355 then
elseif item2.itemid >= 602 and item2.itemid <= 605
or item2.itemid >= 4691 and item2.itemid <= 4755
or item2.itemid == 4758 then
doChangeTypeItem(item.uid, 28)
elseif item2.itemid == 1771 then
elseif item2.itemid == 1772 then
doChangeTypeItem(item.uid, 3)
elseif item2.itemid == 1773 then
doChangeTypeItem(item.uid, 15)
elseif item2.itemid > 2806 and item2.itemid < 3132
or item2.itemid >= 4251 and item2.itemid <= 4327 then
doChangeTypeItem(item.uid, 2)
elseif item2.itemid == 5513 or item2.itemid == 5514 then
doChangeTypeItem(item.uid, 27)
doPlayerSendCancel(cid, "You're exausted.")
doChangeTypeItem(item.uid, 0)
return 1
Editado Janeiro 24 por Cbw
Grupo: Conde
Registrado: 18/12/05
Posts: 912
Reputação: +86
Gênero: Masculino
Char no Tibia: Kohzete
se arruma hotkey nas sources
e todos os novos tem esse recurso...
se arruma hotkey nas sources e todos os novos tem esse recurso...
mais em qual arquivo ?
obs: minha versão eh 7.8
info
Grupo: Campones
Registrado: 02/03/08
Posts: 2
Reputação: 0
ae galera eh o seguinte eu queria que nesse script a mana fluid seja usada pelo hotkey, com um exaust bom e que não seja infinita...
ajudem ae
flws
function onUse(cid, item, frompos, item2, topos)
if (exhaust(cid, 600, 1) > 0) then ----------------- storage = 1000 exausted time = 1 segundo
if item2.itemid == 1 then
if item.type == 0 then
doPlayerSendCancel(cid, "It is empty.")
else
if item2.uid == cid then
if item.type == 7 then
new_mana = math.random(80, 160)
doPlayerAddMana(cid, new_mana)
doSendMagicEffect(topos, 12)
doPlayerSay(cid, "Aaaah...", 1)
elseif item.type == 10 then
new_life = math.random(40, 80)
doPlayerAddHealth(cid, new_life)
doSendMagicEffect(topos, 12)
doPlayerSay(cid, "Aaaah...", 1)
else
doPlayerSay(cid, "Gulp.", 1)
end
else
splash = doCreateItem(2025, item.type, topos)
doDecayItem(splash)
end
end
elseif item2.itemid >= 490 and item2.itemid <= 517
or item2.itemid >= 618 and item2.itemid <= 629
or item2.itemid == 1368 or item2.itemid == 1369
or item2.itemid >= 4820 and item2.itemid <= 4825
or item2.itemid >= 4828 and item2.itemid <= 4831
or item2.itemid >= 4608 and item2.itemid <= 4666 then
doChangeTypeItem(item.uid, 1)
elseif item2.itemid == 103 then
doChangeTypeItem(item.uid, 19)
elseif item2.itemid >= 598 and item2.itemid < 601
or item2.itemid == 1509
or item2.itemid >= 518 and item2.itemid <= 529 then
doChangeTypeItem(item.uid, 26)
elseif item2.itemid >= 351 and item2.itemid <= 355 then
doChangeTypeItem(item.uid, 19)
elseif item2.itemid >= 602 and item2.itemid <= 605
or item2.itemid >= 4691 and item2.itemid <= 4755
or item2.itemid == 4758 then
doChangeTypeItem(item.uid, 28)
elseif item2.itemid == 1771 then
doChangeTypeItem(item.uid, 1)
elseif item2.itemid == 1772 then
doChangeTypeItem(item.uid, 3)
elseif item2.itemid == 1773 then
doChangeTypeItem(item.uid, 15)
elseif item2.itemid > 2806 and item2.itemid < 3132
or item2.itemid >= 4251 and item2.itemid <= 4327 then
doChangeTypeItem(item.uid, 2)
elseif item2.itemid == 5513 or item2.itemid == 5514 then
doChangeTypeItem(item.uid, 27)
else
doPlayerSendCancel(cid, "You're exausted.")
end
else
if item.type == 0 then
doPlayerSendCancel(cid, "It is empty.")
else
doChangeTypeItem(item.uid, 0)
splash = doCreateItem(2025, item.type, topos)
doDecayItem(splash)
end
end
return 1
end
Editado Janeiro 24 por Cbw