Descrição ele fica mudando de cor direto como se fosse dele mesmo e não que esta mudando aparencia para outro monstro.
Crie um arquivo na pasta demon bosses chamado metamorfo.xml
?xml version="1.0" encoding="UTF-8"?
monster name="Metamorfo" nameDescription="do metamorfo" race="fire" experience="45000" speed="500" manacost="0"
health now="100000" max="100000"/
look type="12" head="0" body="101" legs="0" feet="101" corpse="6068"/
targetchange interval="5000" chance="20"/
strategy attack="65" defense="5"/
flags
flag summonable="0"/
flag attackable="1"/
flag hostile="1"/
flag illusionable="1"/
flag convinceable="0"/
flag pushable="0"/
flag canpushitems="1"/
flag canpushcreatures="1"/
flag targetdistance="1"/
flag staticattack="90"/
flag runonhealth="0"/
/flags
attacks
attack name="Frozen Wave" interval="1000" min="-600" max="-1200"/
attack name="Eternal Winter" interval="2000" min="-600" max="-1200"/
attack name="Exkordium" interval="3000" min="-600" max="-1200"/
attack name="Ice Storm" interval="4000" min="-600" max="-1200"/
attack name="Fierce Berserk" interval="1500" min="-600" max="-1200"/
attack name="Hells Core" interval="2500" min="-600" max="-1200"/
/attack
defenses armor="188" defense="145"
defense name="healing" interval="1000" chance="15" min="1000" max="3000"
/defense
defense name="outfit" interval="0" chance="60" monster="apocalypse" duration="0"
/defense
defense name="outfit" interval="0" chance="60" monster="mutant angel" duration="0"
/defense
defense name="outfit" interval="0" chance="60" monster="zugurosh" duration="0"
/defense
defense name="outfit" interval="0" chance="60" monster="Lord Knight" duration="0"
/defense
defense name="speed" interval="2000" chance="8" speedchange="360" duration="6000"
attribute key="areaEffect" value="redshimmer"/
/defense
/defenses
immunities>
immunity physical="0"/
immunity energy="1"/
immunity fire="1"/
immunity poison="1"/
immunity lifedrain="1"/
immunity paralyze="1"/
immunity outfit="1"/
immunity drunk="1"/
immunity invisible="1"/
/immunities
loot
item id="2142" countmax="1" chance="3500"/
item id="2160" countmax="10" chance="9000"/
item id="2160" countmax="5" chance="9000"/
item id="2151" countmax="40" chance="15000"/
item id="2158" countmax="1" chance="1500"/
item id="2646" countmax="1" chance="4000"/
item id="2159" countmax="50" chance="2500"/
item id="2173" countmax="1" chance="1500"/
item id="2127" countmax="1" chance="5500"/
item id="2520" countmax="1" chance="15500"/
item id="2342" countmax="1" chance="11000"/
item id="2390" countmax="1" chance="90000"/
item id="6528" countmax="1" chance="4500"/
item id="2167" countmax="1" chance="13500"/
item id="7456" countmax="1" chance="17000"/
item id="2179" countmax="1" chance="8000"/
item id="2470" countmax="1" chance="5000"/
item id="2523" countmax="1" chance="2000"/
item id="2155" countmax="1" chance="1500"/
item id="2472" countmax="1" chance="3000"/
item id="2514" countmax="1" chance="7500"/
item id="2539" countmax="1" chance="5000"/
item id="2157" countmax="10" chance="4000"/
item id="5926" chance="100000"
inside
item id="2197" countmax="20" chance="4000"/
item id="7745" countmax="1" chance="2600"/
item id="2453" countmax="1" chance="12500"/
item id="7753" countmax="1" chance="13000"/
item id="7755" countmax="1" chance="3500"/
item id="8870" countmax="1" chance="13000"/
item id="8871" countmax="1" chance="15500"/
item id="8892" countmax="1" chance="5000"/
item id="8900" countmax="1" chance="13500"/
item id="8901" countmax="1" chance="9500"/
item id="8902" countmax="1" chance="15500"/
item id="8903" countmax="1" chance="13500"/
item id="8904" countmax="1" chance="3500"/
item id="8905" countmax="1" chance="3500"/
item id="8890" countmax="1" chance="2500"/
item id="8887" countmax="1" chance="14000"/
item id="8884" countmax="1" chance="14500"/
item id="8883" countmax="1" chance="13500"/
item id="8882" countmax="1" chance="20000"/
item id="8881" countmax="1" chance="3500"/
item id="8879" countmax="1" chance="3000"/
item id="8878" countmax="1" chance="2500"/
item id="8877" countmax="1" chance="12500"/
item id="8869" countmax="1" chance="3500"/
item id="8867" countmax="1" chance="3000"/
item id="8866" countmax="1" chance="2500"/
item id="8865" countmax="1" chance="2500"/
item id="8873" countmax="1" chance="3500"/
item id="8874" countmax="1" chance="3000"/
item id="8876" countmax="1" chance="2500"/
/inside
/item
/loot
/monster
agora em monster.xml adicione essa tag
monster name="Metamorfo" file="Demon bosses/metamorfo.xml"/ (entre < >)
domingo, 9 de janeiro de 2011
Mana Rune
Crie uma pasta com o nome mfrune.lua em /data/action/scripts e coloque isto dentro:
[code]-- New MF rune******--
function onUse(cid, item, frompos, item2, topos)
playerpos = {x=topos.x, y=topos.y, z=topos.z, stackpos=253}************
player = getThingfromPos(playerpos)
ml = getPlayerMagLevel(cid)
lvl = getPlayerLevel(cid)
formula = math.random(((lvl+ml)*2)-(lvl-ml))
if item2.itemid == 1 and ml >= 2 then
doSendMagicEffect(playerpos,1)
doPlayerAddMana(player.uid,formula)
doPlayerSay(player.uid,"Ahhhhhh",2)
if item.type > 1 then
doChangeTypeItem(item.uid,item.type-1)
else
doRemoveItem(item.uid,1)
end
end
if item2.itemid == 1 and ml <= 1 then
doSendMagicEffect(frompos,2)
doPlayerSendCancel(cid,"You dont Have Magic Level to use this rune.")
end
if item2.itemid >= 2 then
doPlayerSendCancel(cid,"You can only use this rune in you or in players.")
doSendMAgicEffect(frompos,2)
end
return 1
end[/code]
Segundo Passo:
Após o primeiro passo vem o segundo , agora voltar para a pasta /data/actions e abrir o arquivo actions.xml e colar:
action itemid="2281" script="mfrune.lua" / (entre <>)
PS: O action itemid é o id do item a ser utilizado você pode modificalo o 2281 vou usar como exemplo.
Terceiro Passo:
Abrir a pasta /data/spells/scripts copiar qualquer script.lua e renomear para mana rune.lua depois abrir o arquivo mana rune.lua , apagar tudo oque esta escrito nele e escrever:
[code]local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, 1)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)
function onCastSpell(cid, var)
doPlayerAddMana(cid, 1000)
return doCombat(cid, combat, var)
end[/code]
PS: no local doPlayerAddMana onde esta 1000 é a quantidade de mana que você deseja que adicione ao jogador, eu recomendo por 1000 dai você consequentemente vende esta runa por um preço digamos que alto.
Quarto Passo:
Voltar para a pasta /data/spells abrir o arquivo spells.xml e colocar:
[code] [/code]
PS: Você pode modificar o magic level que pode utilizar a runa e tambem no id se você modicifou ele no segundo passo tera de modificar aqui tambem.
Primeiro Passo B:
Agora tua mana rune ja esta criada, só que o npc não a vende entao vou mostrar como fazer o npc vende-la.
Abrir a pasta /data/npc/scripts abrir o arquivo runes.lua.
Procure um lugar que esteja escrito isto
[code]if msgcontains(msg, 'runes') then
selfSay('I sell hmms (10gps cada), uhs (30gps cada), gfbs (20gps cada), explosions (30gps cada), sds (40gps cada) and blank runes (5gps cada).')[/code]
então adicione antes do blank rune a mana rune. ficara assim:
[quote]if msgcontains(msg, 'runes') then
selfSay('I sell hmms (10gps cada), uhs (30gps cada), gfbs (20gps cada), explosions (30gps cada), sds (40gps cada), mana rune (2k cada) and blank runes (5gps cada).')[/quote]
PS: Você pode modificar opreço onde esta 2k pode colocar o preço que queira.
Segundo Passo B:
No mesmo arquivo ''runes.lua" procure o local onde esta as runas e entre elas coloque:
Citação:
elseif msgcontains(msg, 'mana rune') then
count = getCount(msg)
if count == 0 then
selfSay('Im Not Sell 0 Mana Rune!, Continue buying ')
talk_start = os.clock()
else
buy(cid,2281,count, 2000)
end
PS: Se você tiver modificado o id do item no Segundo e no Quarto Passo tera que modificar agora tambem, e se modificou o preço dela no Primeiro Passo B tera que modificar ali onde esta 2000, Cuidado: O preço neste segundo passo esta em gps isto é 1k = 1000gps
[i][b]Agora vamos criar uma Mana Rune para OT SQL[/b][/i]
Primeiro passo:
Entrar na pasta de /data/action/scripts depois copiar qualquer script.lua e colar na mesma pasta, entam renomear o script copiado para mfrune.lua depois abrir e apaguar tudo o que esta escrito e coloque isto:
[code]-- New MF rune******--
function onUse(cid, item, frompos, item2, topos)
playerpos = {x=topos.x, y=topos.y, z=topos.z, stackpos=253}************
player = getThingfromPos(playerpos)
ml = getPlayerMagLevel(cid)
lvl = getPlayerLevel(cid)
formula = math.random(((lvl+ml)*2)-(lvl-ml))
if item2.itemid == 1 and ml >= 2 then
doSendMagicEffect(playerpos,1)
doPlayerAddMana(player.uid,formula)
doPlayerSay(player.uid,"Ahhhhhh",2)
if item.type > 1 then
doChangeTypeItem(item.uid,item.type-1)
else
doRemoveItem(item.uid,1)
end
end
if item2.itemid == 1 and ml <= 1 then
doSendMagicEffect(frompos,2)
doPlayerSendCancel(cid,"You dont Have Magic Level to use this rune.")
end
if item2.itemid >= 2 then
doPlayerSendCancel(cid,"You can only use this rune in you or in players.")
doSendMAgicEffect(frompos,2)
end
return 1
end[/code]
Segundo Passo:
Após o primeiro passo vem o segundo , agora voltar para a pasta /data/actions e abrir o arquivo actions.xml e colar:
[code] [/code]
PS: O action itemid é o id do item a ser utilizado você pode modificalo o 2281 vou usar como exemplo.
Terceiro Passo:
Abrir a pasta /data/spells/scripts copiar qualquer script.lua e renomear para mana rune.lua depois abrir o arquivo mana rune.lua , apagar tudo oque esta escrito nele e escrever:
[code]local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, 1)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)
function onCastSpell(cid, var)
doPlayerAddMana(cid, 1000)
return doCombat(cid, combat, var)
end[/code]
PS: no local doPlayerAddMana onde esta 1000 é a quantidade de mana que você deseja que adicione ao jogador, eu recomendo por 1000 dai você consequentemente vende esta runa por um preço digamos que alto.
Quarto Passo:
Voltar para a pasta /data/spells abrir o arquivo spells.xml e colocar:
[code] [/code]
PS: Você pode modificar o magic level que pode utilizar a runa e tambem no id se você modificou ele no segundo passo tera de modificar aqui tambem.
Primeiro Passo B:
Agora tua mana rune ja esta criada, só que o npc não a vende entao vou mostrar como fazer o npc vende-la.
Abrir a pasta /data/npc/scripts abrir o arquivo runes.lua.
E digite a parte que está em negrito
-- Made by Delton // Coltain --
-- If you use or edit, please give credit to me --
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end
function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end
function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end
function onThink() npcHandler:onThink() end
local shopModule = ShopModule:new()
npcHandler:addModule(shopModule)
-- These have to be here so they won't mess up the keywords
shopModule:addBuyableItem({'energy field', 'ef'}, 2277, 115, 3, 'energy field rune')
shopModule:addBuyableItem({'fire field', 'ff'}, 2301, 85, 3, 'fire field rune')
shopModule:addBuyableItem({'poison field', 'pf'}, 2285, 65, 3, 'poison field rune')
local node1 = keywordHandler:addKeyword({'runes'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I sell Healing, Support, Attack, Summon, and Field Runes.'})
[b]shopModule:addBuyableItem({'mana', 'rune'}, 2281, 10, 'mana rune')[/b]
shopModule:addBuyableItem({'blank', 'rune'}, 2260, 10, 'blank rune')
local node2 = keywordHandler:addKeyword({'healing'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I can sell you Antidote, Intense Healing, and Ultimate Healing Runes.'})
shopModule:addBuyableItem({'antidote', 'antidote'}, 2266, 65, 1, 'antidote rune')
shopModule:addBuyableItem({'intense healing', 'ih'}, 2265, 95, 1, 'intense healing rune')
shopModule:addBuyableItem({'ultimate healing', 'uh'}, 2273, 175, 1, 'ultimate healing rune')
local node3 = keywordHandler:addKeyword({'support'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I can sell you Chameleon, Desintegrate, Destroy Field, Magic Wall, and Paralyze Runes.'})
shopModule:addBuyableItem({'chameleon', 'chameleon'}, 2291, 210, 1, 'chameleon rune')
shopModule:addBuyableItem({'desintegrate', 'desintegrate'}, 2310, 80, 3, 'desintegrate rune')
shopModule:addBuyableItem({'destroy field', 'destroy field'}, 2261, 45, 3, 'destroy field rune')
shopModule:addBuyableItem({'magic wall', 'mw'}, 2293, 350, 3, 'magic wall rune')
shopModule:addBuyableItem({'paralyze', 'paralyze'}, 2278, 700, 1, 'paralyze rune')
local node4 = keywordHandler:addKeyword({'attack'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I can sell you Avalanche, Explosion, Fireball, Great Fireball, Heavy Magic Missile, Icicle, Light Magic Missile, Soulfire, Stalagmite, Stone Shower, Sudden Death, Thunderstorm Runes.'})
shopModule:addBuyableItem({'avalanche', 'avalanche'}, 2274, 180, 4, 'avalanche rune')
shopModule:addBuyableItem({'explosion', 'explo'}, 2274, 190, 6, 'explosion rune')
shopModule:addBuyableItem({'great fireball', 'gfb'}, 2304, 180, 4, 'great fireball rune')
shopModule:addBuyableItem({'fireball', 'fb'}, 2302, 150, 5, 'fireball rune')
shopModule:addBuyableItem({'heavy magic missile', 'hmm'}, 2311, 120, 10, 'heavy magic missile rune')
shopModule:addBuyableItem({'icicle', 'icicle'}, 2271, 150, 5, 'icicle rune')
shopModule:addBuyableItem({'light magic missile', 'lmm'}, 2287, 40, 10, 'light magic missile rune')
shopModule:addBuyableItem({'soulfire', 'sf'}, 2308, 140, 3, 'soulfire rune')
shopModule:addBuyableItem({'stalagmite', 'stalagmite'}, 2292, 120, 10, 'stalagmite rune')
shopModule:addBuyableItem({'stone shower', 'ss'}, 2288, 150, 4, 'stone shower rune')
shopModule:addBuyableItem({'sudden death', 'sd'}, 2268, 325, 3, 'sudden death rune')
shopModule:addBuyableItem({'thunderstorm', 'thunderstorm'}, 2315, 150, 4, 'thunderstorm rune')
local node5 = keywordHandler:addKeyword({'summon'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I can sell you Animate Dead and Convince Creature Runes.'})
shopModule:addBuyableItem({'animate dead', 'animate dead'}, 2316, 375, 1, 'animate dead rune')
shopModule:addBuyableItem({'convince creature', 'cc'}, 2302, 80, 1, 'convince creature rune')
local node6 = keywordHandler:addKeyword({'field'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I can sell you Energy Bomb, Energy Field, Energy Wall, Fire Bomb, Fire Field, Fire Wall, Poison Bomb, Poison Field, and Poison Wall Runes.'})
shopModule:addBuyableItem({'energy bomb', 'energybomb'}, 2262, 325, 2, 'energy bomb rune')
shopModule:addBuyableItem({'energy wall', 'ew'}, 2279, 340, 4, 'energy wall rune')
shopModule:addBuyableItem({'fire bomb', 'firebomb'}, 2305, 235, 2, 'fire bomb rune')
shopModule:addBuyableItem({'fire wall', 'fw'}, 2303, 245, 4, 'fire wall rune')
shopModule:addBuyableItem({'poison bomb', 'pb'}, 2286, 170, 2, 'poison bomb rune')
shopModule:addBuyableItem({'poison wall', 'pw'}, 2289, 210, 4, 'poison wall rune')
local node7 = keywordHandler:addKeyword({'potions'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I sell Health, Mana, Strong Health, Strong Mana, Great Health, Great Mana, Ultimate Health, and Great Spirit Potions.'})
shopModule:addBuyableItem({'great spirit potion', 'gsp'}, 8376, 190, 'great spirit potion')
shopModule:addBuyableItem({'ultimate health potion', 'uhp'}, 8377, 310, 'ultimate health potion')
shopModule:addBuyableItem({'great mana potion', 'gmp'}, 7590, 120, 'great mana potion')
shopModule:addBuyableItem({'great health potion', 'ghp'}, 7591, 190, 'great health potion')
shopModule:addBuyableItem({'strong health potion', 'shp'}, 7588, 100, 'strong health potion')
shopModule:addBuyableItem({'strong mana potion', 'smp'}, 7589, 80, 'strong mana potion')
shopModule:addBuyableItem({'health potion', 'hp'}, 7618, 45, 'health potion')
shopModule:addBuyableItem({'mana potion', 'mp'}, 7620, 50, 'mana potion')
local node8 = keywordHandler:addKeyword({'wands'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I sell Wand of Vortex, Wand of Dragonbreath, Wand of Decay, Wand of Cosmic Energy, and Wand of Inferno.'})
shopModule:addBuyableItem({'wand of vortex', 'wov'}, 2190, 100, 'wand of vortex')
shopModule:addBuyableItem({'wand of dragonbreath', 'wodb'}, 2191, 1000, 'wand of dragonbreath')
shopModule:addBuyableItem({'wand of decay', 'wod'}, 2188, 5000, 'wand of decay')
shopModule:addBuyableItem({'wand of cosmic energy', 'woce'}, 2189, 10000, 'wand of cosmic energy')
shopModule:addBuyableItem({'wand of inferno', 'woi'}, 2187, 15000, 'wand of inferno')
local node10 = keywordHandler:addKeyword({'rods'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I sell Snakebite Rod, Moonlight Rod, Necrotic Rod, Terra Rod, and Hailstorm Rod.'})
shopModule:addBuyableItem({'snakebite rod', 'sbr'}, 2182, 100, 'snakebite rod')
shopModule:addBuyableItem({'moonlight rod', 'mlr'}, 2186, 1000, 'moonlight rod')
shopModule:addBuyableItem({'necrotic rod', 'nr'}, 2185, 5000, 'necrotic rod')
shopModule:addBuyableItem({'terra rod', 'tr'}, 2181, 10000, 'terra rod')
shopModule:addBuyableItem({'hailstorm rod', 'hsr'}, 2183, 15000, 'hailstorm rod')
PS: Você pode modificar opreço onde esta 10 gps pode colocar o preço que queira.
[code]-- New MF rune******--
function onUse(cid, item, frompos, item2, topos)
playerpos = {x=topos.x, y=topos.y, z=topos.z, stackpos=253}************
player = getThingfromPos(playerpos)
ml = getPlayerMagLevel(cid)
lvl = getPlayerLevel(cid)
formula = math.random(((lvl+ml)*2)-(lvl-ml))
if item2.itemid == 1 and ml >= 2 then
doSendMagicEffect(playerpos,1)
doPlayerAddMana(player.uid,formula)
doPlayerSay(player.uid,"Ahhhhhh",2)
if item.type > 1 then
doChangeTypeItem(item.uid,item.type-1)
else
doRemoveItem(item.uid,1)
end
end
if item2.itemid == 1 and ml <= 1 then
doSendMagicEffect(frompos,2)
doPlayerSendCancel(cid,"You dont Have Magic Level to use this rune.")
end
if item2.itemid >= 2 then
doPlayerSendCancel(cid,"You can only use this rune in you or in players.")
doSendMAgicEffect(frompos,2)
end
return 1
end[/code]
Segundo Passo:
Após o primeiro passo vem o segundo , agora voltar para a pasta /data/actions e abrir o arquivo actions.xml e colar:
action itemid="2281" script="mfrune.lua" / (entre <>)
PS: O action itemid é o id do item a ser utilizado você pode modificalo o 2281 vou usar como exemplo.
Terceiro Passo:
Abrir a pasta /data/spells/scripts copiar qualquer script.lua e renomear para mana rune.lua depois abrir o arquivo mana rune.lua , apagar tudo oque esta escrito nele e escrever:
[code]local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, 1)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)
function onCastSpell(cid, var)
doPlayerAddMana(cid, 1000)
return doCombat(cid, combat, var)
end[/code]
PS: no local doPlayerAddMana onde esta 1000 é a quantidade de mana que você deseja que adicione ao jogador, eu recomendo por 1000 dai você consequentemente vende esta runa por um preço digamos que alto.
Quarto Passo:
Voltar para a pasta /data/spells abrir o arquivo spells.xml e colocar:
[code]
PS: Você pode modificar o magic level que pode utilizar a runa e tambem no id se você modicifou ele no segundo passo tera de modificar aqui tambem.
Primeiro Passo B:
Agora tua mana rune ja esta criada, só que o npc não a vende entao vou mostrar como fazer o npc vende-la.
Abrir a pasta /data/npc/scripts abrir o arquivo runes.lua.
Procure um lugar que esteja escrito isto
[code]if msgcontains(msg, 'runes') then
selfSay('I sell hmms (10gps cada), uhs (30gps cada), gfbs (20gps cada), explosions (30gps cada), sds (40gps cada) and blank runes (5gps cada).')[/code]
então adicione antes do blank rune a mana rune. ficara assim:
[quote]if msgcontains(msg, 'runes') then
selfSay('I sell hmms (10gps cada), uhs (30gps cada), gfbs (20gps cada), explosions (30gps cada), sds (40gps cada), mana rune (2k cada) and blank runes (5gps cada).')[/quote]
PS: Você pode modificar opreço onde esta 2k pode colocar o preço que queira.
Segundo Passo B:
No mesmo arquivo ''runes.lua" procure o local onde esta as runas e entre elas coloque:
Citação:
elseif msgcontains(msg, 'mana rune') then
count = getCount(msg)
if count == 0 then
selfSay('Im Not Sell 0 Mana Rune!, Continue buying ')
talk_start = os.clock()
else
buy(cid,2281,count, 2000)
end
PS: Se você tiver modificado o id do item no Segundo e no Quarto Passo tera que modificar agora tambem, e se modificou o preço dela no Primeiro Passo B tera que modificar ali onde esta 2000, Cuidado: O preço neste segundo passo esta em gps isto é 1k = 1000gps
[i][b]Agora vamos criar uma Mana Rune para OT SQL[/b][/i]
Primeiro passo:
Entrar na pasta de /data/action/scripts depois copiar qualquer script.lua e colar na mesma pasta, entam renomear o script copiado para mfrune.lua depois abrir e apaguar tudo o que esta escrito e coloque isto:
[code]-- New MF rune******--
function onUse(cid, item, frompos, item2, topos)
playerpos = {x=topos.x, y=topos.y, z=topos.z, stackpos=253}************
player = getThingfromPos(playerpos)
ml = getPlayerMagLevel(cid)
lvl = getPlayerLevel(cid)
formula = math.random(((lvl+ml)*2)-(lvl-ml))
if item2.itemid == 1 and ml >= 2 then
doSendMagicEffect(playerpos,1)
doPlayerAddMana(player.uid,formula)
doPlayerSay(player.uid,"Ahhhhhh",2)
if item.type > 1 then
doChangeTypeItem(item.uid,item.type-1)
else
doRemoveItem(item.uid,1)
end
end
if item2.itemid == 1 and ml <= 1 then
doSendMagicEffect(frompos,2)
doPlayerSendCancel(cid,"You dont Have Magic Level to use this rune.")
end
if item2.itemid >= 2 then
doPlayerSendCancel(cid,"You can only use this rune in you or in players.")
doSendMAgicEffect(frompos,2)
end
return 1
end[/code]
Segundo Passo:
Após o primeiro passo vem o segundo , agora voltar para a pasta /data/actions e abrir o arquivo actions.xml e colar:
[code]
PS: O action itemid é o id do item a ser utilizado você pode modificalo o 2281 vou usar como exemplo.
Terceiro Passo:
Abrir a pasta /data/spells/scripts copiar qualquer script.lua e renomear para mana rune.lua depois abrir o arquivo mana rune.lua , apagar tudo oque esta escrito nele e escrever:
[code]local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, 1)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)
function onCastSpell(cid, var)
doPlayerAddMana(cid, 1000)
return doCombat(cid, combat, var)
end[/code]
PS: no local doPlayerAddMana onde esta 1000 é a quantidade de mana que você deseja que adicione ao jogador, eu recomendo por 1000 dai você consequentemente vende esta runa por um preço digamos que alto.
Quarto Passo:
Voltar para a pasta /data/spells abrir o arquivo spells.xml e colocar:
[code]
PS: Você pode modificar o magic level que pode utilizar a runa e tambem no id se você modificou ele no segundo passo tera de modificar aqui tambem.
Primeiro Passo B:
Agora tua mana rune ja esta criada, só que o npc não a vende entao vou mostrar como fazer o npc vende-la.
Abrir a pasta /data/npc/scripts abrir o arquivo runes.lua.
E digite a parte que está em negrito
-- Made by Delton // Coltain --
-- If you use or edit, please give credit to me --
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end
function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end
function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end
function onThink() npcHandler:onThink() end
local shopModule = ShopModule:new()
npcHandler:addModule(shopModule)
-- These have to be here so they won't mess up the keywords
shopModule:addBuyableItem({'energy field', 'ef'}, 2277, 115, 3, 'energy field rune')
shopModule:addBuyableItem({'fire field', 'ff'}, 2301, 85, 3, 'fire field rune')
shopModule:addBuyableItem({'poison field', 'pf'}, 2285, 65, 3, 'poison field rune')
local node1 = keywordHandler:addKeyword({'runes'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I sell Healing, Support, Attack, Summon, and Field Runes.'})
[b]shopModule:addBuyableItem({'mana', 'rune'}, 2281, 10, 'mana rune')[/b]
shopModule:addBuyableItem({'blank', 'rune'}, 2260, 10, 'blank rune')
local node2 = keywordHandler:addKeyword({'healing'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I can sell you Antidote, Intense Healing, and Ultimate Healing Runes.'})
shopModule:addBuyableItem({'antidote', 'antidote'}, 2266, 65, 1, 'antidote rune')
shopModule:addBuyableItem({'intense healing', 'ih'}, 2265, 95, 1, 'intense healing rune')
shopModule:addBuyableItem({'ultimate healing', 'uh'}, 2273, 175, 1, 'ultimate healing rune')
local node3 = keywordHandler:addKeyword({'support'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I can sell you Chameleon, Desintegrate, Destroy Field, Magic Wall, and Paralyze Runes.'})
shopModule:addBuyableItem({'chameleon', 'chameleon'}, 2291, 210, 1, 'chameleon rune')
shopModule:addBuyableItem({'desintegrate', 'desintegrate'}, 2310, 80, 3, 'desintegrate rune')
shopModule:addBuyableItem({'destroy field', 'destroy field'}, 2261, 45, 3, 'destroy field rune')
shopModule:addBuyableItem({'magic wall', 'mw'}, 2293, 350, 3, 'magic wall rune')
shopModule:addBuyableItem({'paralyze', 'paralyze'}, 2278, 700, 1, 'paralyze rune')
local node4 = keywordHandler:addKeyword({'attack'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I can sell you Avalanche, Explosion, Fireball, Great Fireball, Heavy Magic Missile, Icicle, Light Magic Missile, Soulfire, Stalagmite, Stone Shower, Sudden Death, Thunderstorm Runes.'})
shopModule:addBuyableItem({'avalanche', 'avalanche'}, 2274, 180, 4, 'avalanche rune')
shopModule:addBuyableItem({'explosion', 'explo'}, 2274, 190, 6, 'explosion rune')
shopModule:addBuyableItem({'great fireball', 'gfb'}, 2304, 180, 4, 'great fireball rune')
shopModule:addBuyableItem({'fireball', 'fb'}, 2302, 150, 5, 'fireball rune')
shopModule:addBuyableItem({'heavy magic missile', 'hmm'}, 2311, 120, 10, 'heavy magic missile rune')
shopModule:addBuyableItem({'icicle', 'icicle'}, 2271, 150, 5, 'icicle rune')
shopModule:addBuyableItem({'light magic missile', 'lmm'}, 2287, 40, 10, 'light magic missile rune')
shopModule:addBuyableItem({'soulfire', 'sf'}, 2308, 140, 3, 'soulfire rune')
shopModule:addBuyableItem({'stalagmite', 'stalagmite'}, 2292, 120, 10, 'stalagmite rune')
shopModule:addBuyableItem({'stone shower', 'ss'}, 2288, 150, 4, 'stone shower rune')
shopModule:addBuyableItem({'sudden death', 'sd'}, 2268, 325, 3, 'sudden death rune')
shopModule:addBuyableItem({'thunderstorm', 'thunderstorm'}, 2315, 150, 4, 'thunderstorm rune')
local node5 = keywordHandler:addKeyword({'summon'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I can sell you Animate Dead and Convince Creature Runes.'})
shopModule:addBuyableItem({'animate dead', 'animate dead'}, 2316, 375, 1, 'animate dead rune')
shopModule:addBuyableItem({'convince creature', 'cc'}, 2302, 80, 1, 'convince creature rune')
local node6 = keywordHandler:addKeyword({'field'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I can sell you Energy Bomb, Energy Field, Energy Wall, Fire Bomb, Fire Field, Fire Wall, Poison Bomb, Poison Field, and Poison Wall Runes.'})
shopModule:addBuyableItem({'energy bomb', 'energybomb'}, 2262, 325, 2, 'energy bomb rune')
shopModule:addBuyableItem({'energy wall', 'ew'}, 2279, 340, 4, 'energy wall rune')
shopModule:addBuyableItem({'fire bomb', 'firebomb'}, 2305, 235, 2, 'fire bomb rune')
shopModule:addBuyableItem({'fire wall', 'fw'}, 2303, 245, 4, 'fire wall rune')
shopModule:addBuyableItem({'poison bomb', 'pb'}, 2286, 170, 2, 'poison bomb rune')
shopModule:addBuyableItem({'poison wall', 'pw'}, 2289, 210, 4, 'poison wall rune')
local node7 = keywordHandler:addKeyword({'potions'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I sell Health, Mana, Strong Health, Strong Mana, Great Health, Great Mana, Ultimate Health, and Great Spirit Potions.'})
shopModule:addBuyableItem({'great spirit potion', 'gsp'}, 8376, 190, 'great spirit potion')
shopModule:addBuyableItem({'ultimate health potion', 'uhp'}, 8377, 310, 'ultimate health potion')
shopModule:addBuyableItem({'great mana potion', 'gmp'}, 7590, 120, 'great mana potion')
shopModule:addBuyableItem({'great health potion', 'ghp'}, 7591, 190, 'great health potion')
shopModule:addBuyableItem({'strong health potion', 'shp'}, 7588, 100, 'strong health potion')
shopModule:addBuyableItem({'strong mana potion', 'smp'}, 7589, 80, 'strong mana potion')
shopModule:addBuyableItem({'health potion', 'hp'}, 7618, 45, 'health potion')
shopModule:addBuyableItem({'mana potion', 'mp'}, 7620, 50, 'mana potion')
local node8 = keywordHandler:addKeyword({'wands'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I sell Wand of Vortex, Wand of Dragonbreath, Wand of Decay, Wand of Cosmic Energy, and Wand of Inferno.'})
shopModule:addBuyableItem({'wand of vortex', 'wov'}, 2190, 100, 'wand of vortex')
shopModule:addBuyableItem({'wand of dragonbreath', 'wodb'}, 2191, 1000, 'wand of dragonbreath')
shopModule:addBuyableItem({'wand of decay', 'wod'}, 2188, 5000, 'wand of decay')
shopModule:addBuyableItem({'wand of cosmic energy', 'woce'}, 2189, 10000, 'wand of cosmic energy')
shopModule:addBuyableItem({'wand of inferno', 'woi'}, 2187, 15000, 'wand of inferno')
local node10 = keywordHandler:addKeyword({'rods'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I sell Snakebite Rod, Moonlight Rod, Necrotic Rod, Terra Rod, and Hailstorm Rod.'})
shopModule:addBuyableItem({'snakebite rod', 'sbr'}, 2182, 100, 'snakebite rod')
shopModule:addBuyableItem({'moonlight rod', 'mlr'}, 2186, 1000, 'moonlight rod')
shopModule:addBuyableItem({'necrotic rod', 'nr'}, 2185, 5000, 'necrotic rod')
shopModule:addBuyableItem({'terra rod', 'tr'}, 2181, 10000, 'terra rod')
shopModule:addBuyableItem({'hailstorm rod', 'hsr'}, 2183, 15000, 'hailstorm rod')
PS: Você pode modificar opreço onde esta 10 gps pode colocar o preço que queira.
Pet System Complete
Petconfig.lua
petSystemExhaustion = 1 --in secods, 0 = no exhausted.
frases = {"Men, im still exhausted!", "Ok, in one momment", "afff, again?!", "meh, one second"}
lenght = 39 -- maximun lenght the !petsay can have...
manaGainTicks = 3000 --
--how fast the pet gains mana
manaGainAmmount = 10 --//
manaGainPerLevel = 20 -- mana that gains the pet for each level the player gain
magicLevelRate = 4 -- how faster the pet will gain mlvl compared to real tibia,,
base = 2000 --base storage. All storages will depend of this number
storages = {
petMag = base,
petUid = base+1,
petExha = base+2,
petDamage = base+3,
petManaSpent = base+4,
petIsOnline = base+5,
petMana = base+6,
petIsHealing = base+7,
petCap = base+8,
petSystemExhaustion = base+9
}
petItems = {}
maxItems = 10 --Max items the pet can carry
--lol V
x = 0 y = function() x = x + 1 end table.foreach(storages, y)
for i = 1, maxItems do
petItems[i] = base+x+i
end
--Pets, dependiong on the level
pets =
{
{vocations = {1, 5}, petS =
{{level = 100, name = "demon"}, {level = 60, name = "Dragon"}, {level = 50, name = "Dwarf Geomancer"}, {level = 40, name = "Demon Skeleton"}, {level = 30, name = "Fire Devil"}, {level = 20, name = "Minotaur Archer"}, {level = 10, name = "Minotaur"}, {level = 0, name = "Rat"}}
},
{vocations = {2, 6}, petS =
{{level = 100, name = "demon"}, {level = 60, name = "Dragon"}, {level = 50, name = "Dwarf Geomancer"}, {level = 40, name = "Demon Skeleton"}, {level = 30, name = "Fire Devil"}, {level = 20, name = "Minotaur Archer"}, {level = 10, name = "Minotaur"}, {level = 0, name = "Rat"}}
},
{vocations = {3, 7}, petS =
{{level = 100, name = "demon"}, {level = 60, name = "Dragon"}, {level = 50, name = "Dwarf Geomancer"}, {level = 40, name = "Demon Skeleton"}, {level = 30, name = "Fire Devil"}, {level = 20, name = "Minotaur Archer"}, {level = 10, name = "Minotaur"}, {level = 0, name = "Rat"}}
},
{vocations = {4, 8}, petS =
{{level = 100, name = "demon"}, {level = 60, name = "Dragon"}, {level = 50, name = "Dwarf Geomancer"}, {level = 40, name = "Demon Skeleton"}, {level = 30, name = "Fire Devil"}, {level = 20, name = "Minotaur Archer"}, {level = 10, name = "Minotaur"}, {level = 0, name = "Rat"}}
}
}
--attacks of the pet. !petattack "param
--It's pretty easy how to config, I think it doesn't need an extra explanation.
attacks = {{param = "m1", theFunction = false, offensive = 1, needLevel = 20, self = 0, needMag = 10, manaSpent = 60, exhausted = 1, range = 6, combatType =COMBAT_ENERGYDAMAGE, combatAni = CONST_ME_ENERGYAREA, area = 2,
formula = {maxb = 0.4, maxa = 30, minb = 0.5, mina = 0},
},
{param = "m2", theFunction = false, offensive = 1, needLevel = 40, self = 0, needMag = 5, manaSpent = 145, exhausted = 1, range = 0, combatType = COMBAT_PHYSICALDAMAGE, combatAni = CONST_ME_HITAREA, area = 2,
formula = {maxb = 0.6, maxa = 30, minb = 1.2, mina = 0},
},
{param = "m3", theFunction = false, offensive = 1, needLevel = 50, self = 0, needMag = 15, manaSpent = 100, exhausted = 1, range = 3, combatType = COMBAT_FIREDAMAGE, combatAni = CONST_ME_FIREAREA, area = 6, formula = {maxb = 0.6, maxa = 30, minb = 1.2, mina = 0}
},
{param = "m4", theFunction = false, offensive = 1, needLevel = 0, self = 0, needMag = 0, manaSpent = 20, exhausted = 1, range = 1, combatType = COMBAT_ENERGYDAMAGE, combatAni = CONST_ME_ENERGYAREA, area = 1,
formula = {maxb = 0.13, maxa = 0, minb = 0.262, mina = 0}
},
{param = "m5", theFunction = false, offensive = -1, needLevel = 10, self = 1, needMag = 0, manaSpent = 100, exhausted = 2, range = 0, combatType = COMBAT_HEALING, combatAni = CONST_ME_MAGIC_BLUE, area = 1,
formula = {maxb = 0.4, maxa = 20, minb = 0.7, mina = 0}
},
{param = "m6", needLevel = 1, needMag = 0, manaSpent = 300, exhausted = 2,
theFunction = function (parameters)
daPet = getPlayerStorageValue(parameters.cid, storages.petUid)
if getCreatureTarget(daPet) ~= 0 then
doAddCondition(getCreatureTarget(parameters.cid), 4)
end
end
},
{param = "m7", needLevel = 10, needMag = 4, manaSpent = 60, exhausted = 2,
theFunction = function (parameters)
doAddCondition(getPlayerStorageValue(parameters.cid, storages.petUid), 11)
end
},
{param = "m8", needLevel = 1, needMag = 0, manaSpent = 100, exhausted = 2,
theFunction = function (parameters)
local myAttack = formulaAttack(getPlayerLevel(parameters.cid), getPlayerStorageValue(parameters.cid, storages.petMag), 0.7, 0, 1.0, 0)
function doAreaCombatHealthEx(params)
local randoms = {[1] = math.random(-2, 2),
[2] = math.random(-2, 2)
}
local attackCreature = getPlayerStorageValue(parameters.cid, storages.petUid)
if getCreatureTarget(getPlayerStorageValue(parameters.cid, storages.petUid)) ~= 0 then
attackCreature = getCreatureTarget(getPlayerStorageValue(parameters.cid, storages.petUid))
end
local posa = getCreaturePosition(attackCreature)
doAreaCombatHealth(getPlayerStorageValue(parameters.cid, storages.petUid), COMBAT_FIREDAMAGE, {x = posa.x + randoms[1], y = posa.y + randoms[2], z = posa.z}, 1, -params.myAttack.minD, -params.myAttack.maxD, CONST_ME_FIREAREA)
doSendDistanceShoot(getCreaturePosition(getPlayerStorageValue(parameters.cid, storages.petUid)), {x = posa.x + randoms[1], y = posa.y + randoms[2], z = posa.z}, CONST_ANI_FIRE)
end
doAreaCombatHealthEx({cid = parameters.cid, target = getCreaturePosition(attackCreature), myAttack = myAttack})
for i = 1, 7 do
addEvent(doAreaCombatHealthEx, 200*i, {cid = parameters.cid, target = getCreaturePosition(attackCreature), myAttack = myAttack})
end
end
}
}
function setExhausted(cid)
setPlayerStorageValue(cid, storages.petSystemExhaustion, os.clock()+1)
end
function formulaAttack(magicLevel, level, maxb, maxa, minb, mina) return {minD = (level * 2 + magicLevel * 3) * (1 + mina) + minb,
maxD = (level * 2 + magicLevel * 3) * (1 + maxb) + maxa
}
end
function isExhausted(cid)
if isPlayer(cid) == 1 then
local CRONOMETRO = getPlayerStorageValue(cid, storages.petSystemExhaustion)
local CRONOMETRO2 = os.clock()
local TIEMPO = os.difftime(CRONOMETRO2, CRONOMETRO)
if petSystemExhaustion - TIEMPO > petSystemExhaustion or CRONOMETRO == -1 then
setPlayerStorageValue(cid, storages.petSystemExhaustion, CRONOMETRO2+1)
return 0
end
if petSystemExhaustion - TIEMPO <= 0 then
return 0
end
end
return 1
end
function addMana(a)
local cid = a.cid
local petManaMax = getPlayerLevel(cid)*manaGainPerLevel
if getPlayerStorageValue(cid, storages.petMana) < petManaMax then
if petManaMax - getPlayerStorageValue(cid, storages.petMana) < 10 then
setPlayerStorageValue(cid, storages.petMana, getPlayerStorageValue(cid, storages.petMana) + petManaMax - getPlayerStorageValue(cid, storages.petMana))
else
setPlayerStorageValue(cid, storages.petMana, getPlayerStorageValue(cid, storages.petMana) + 10)
end
addEvent(addMana, manaGainTicks, {cid = cid})
else setPlayerStorageValue(cid, storages.petIsHealing, 0)
end
end
!pet
dofile("./petConfig.lua")
function doPlayerAddSummon(cid, name, pos)
local MyCreature = doSummonCreature(name, pos)
doConvinceCreature(cid, MyCreature)
return MyCreature
end
local myPet = ""
local myPetUid = 0
function onSay(cid, words, param)
if isExhausted(cid) == 1 then
return 0
end
if getPlayerStorageValue(cid, storages.petMag) == -1 then
setPlayerStorageValue(cid, storages.petMag, 0)
end
if isCreature(getPlayerStorageValue(cid, storages.petUid)) == 0 then
if getTilePzInfo(getCreaturePosition(cid)) == 0 then
if getPlayerStorageValue(cid, storages.petIsOnline) == 1 or getPlayerStorageValue(cid, storages.petIsOnline) == -1 then
for i = 1, #pets do
if isInArray(pets[i].vocations, getPlayerVocation(cid)) == 1 then
for k = 1, #pets[i].petS do
if petS[i].petS[k].level <= getPlayerLevel(cid) then
myPet = petS[i].petS[k].name
break
end
end
break
end
end
myPetUid = doPlayerAddSummon(cid, myPet, getCreaturePosition(cid))
if myPetUid ~= -1 then
setPlayerStorageValue(cid, storages.petUid, myPetUid)
if getPlayerStorageValue(cid, storages.petDamage) ~= 0 and getPlayerStorageValue(cid, storages.petDamage) ~= -1 then
if getPlayerStorageValue(cid, storages.petDamage) < getCreatureMaxHealth(getPlayerStorageValue(cid, storages.petUid)) then
doCreatureAddHealth(getPlayerStorageValue(cid, storages.petUid), getPlayerStorageValue(cid, storages.petDamage)*-1)
end
end
doChangeSpeed(myPetUid, getCreatureBaseSpeed(cid) - getCreatureBaseSpeed(myPetUid))
doCreatureSay(myPetUid, 'Hail Manim!', TALKTYPE_ORANGE_1)
addMana({cid = cid})
setPlayerStorageValue(cid, storages.petIsOnline, 2)
else
doPlayerSendCancel(cid, 'Not enought room.')
end
else
doPlayerSendCancel(cid, 'Seu pet esta morto! Voce tem que revive-lo.')
end
else
doPlayerSendCancel(cid, 'Voce nao pode chamar seu pet em uma PZ.')
end
else
local daPet = getPlayerStorageValue(cid, storages.petUid)
setPlayerStorageValue(cid, storages.petDamage, getCreatureMaxHealth(daPet) - getCreatureHealth(daPet))
doCreatureSay(daPet, 'Bye bye !', TALKTYPE_ORANGE_1)
setPlayerStorageValue(cid, storages.petIsOnline, 1)
doSendMagicEffect(getCreaturePosition(daPet), CONST_ME_POFF)
doRemoveCreature(daPet)
end
return setExhausted(cid)
end
!petattack
dofile("./petConfig.lua")
function onSay(cid, words, param)
if isExhausted(cid) == 1 then
return 0
end
local lookDirs = {[0] = {x = 0, y = -1},
[1] = {x = 1, y = 0},
[2] = {x = 0, y = 1},
[3] = {x = -1, y = 0}
}
local myAttack = 0
local CRONOMETRO = 0
local CRONOMETRO2 = 0
local TIEMPO = 0
function formulaAttack(magicLevel, level, maxb, maxa, minb, mina)
return {minD = (level * 2 + magicLevel * 3) * (1 + mina) + minb,
maxD = (level * 2 + magicLevel * 3) * (1 + maxb) + maxa
}
end
function getPetMlvl(manaSpent)
local i = 0
while manaSpent >= (1600 * (1.2^i))*magicLevelRate do
i = i + 1
end
return i
end
local daPet = getPlayerStorageValue(cid, storages.petUid)
if isCreature(daPet) == 1 then
if param ~= nil then
param = string.lower(param)
local petPos = getCreaturePosition(daPet)
local lookDir = getPlayerLookDir(cid) -- getPlayerLookDir(daPet plz ! ! !)
local damage = {}
CRONOMETRO = getPlayerStorageValue(cid, storages.petExha)
CRONOMETRO2 = os.clock()
TIEMPO = os.difftime(CRONOMETRO2, CRONOMETRO)
for i = 1, #attacks do
if param == attacks[i].param then
myAttack = i
break
end
end
if myAttack ~= 0 then
if attacks[myAttack].exhausted - TIEMPO > attacks[myAttack].exhausted or CRONOMETRO == -1 then
setPlayerStorageValue(cid, storages.petExha, CRONOMETRO2+1)
end
if getPlayerStorageValue(cid, storages.petMana) >= attacks[myAttack].manaSpent then
if attacks[myAttack].needLevel <= getPlayerLevel(cid) then
if attacks[myAttack].needMag <= getPlayerStorageValue(cid, storages.petMag) then
if attacks[myAttack].exhausted - TIEMPO <= 0 then
if attacks[myAttack].theFunction == false then
damage = formulaAttack(getPlayerStorageValue(cid, storages.petMag), getPlayerLevel(cid), attacks[myAttack].formula.maxb, attacks[myAttack].formula.maxa, attacks[myAttack].formula.minb, attacks[myAttack].formula.mina) doAreaCombatHealth(daPet*((attacks[myAttack].self - 1)*-1), attacks[myAttack].combatType, {x = petPos.x + attacks[myAttack].range*lookDirs[lookDir].x, y = petPos.y + attacks[myAttack].range*lookDirs[lookDir].y, z = petPos.z}, attacks[myAttack].area, math.floor(damage.minD*-1*attacks[myAttack].offensive), math.floor(damage.maxD*-1*attacks[myAttack].offensive), attacks[myAttack].combatAni)
else attacks[myAttack].theFunction({cid = cid, words = words, param = param})
end
doCreatureSay(daPet, '' .. param .. '!', TALKTYPE_ORANGE_1)
if getPlayerStorageValue(cid, storages.petIsHealing) == 0 or getPlayerStorageValue(cid, storages.petIsHealing) == -1 then
addEvent(addMana, manaGainTicks, {cid = cid})
setPlayerStorageValue(cid, storages.petIsHealing, 1)
end
setPlayerStorageValue(cid, storages.petExha, CRONOMETRO2+1)
setPlayerStorageValue(cid, storages.petManaSpent, getPlayerStorageValue(cid, storages.petManaSpent) + attacks[myAttack].manaSpent)
setPlayerStorageValue(cid, storages.petMana, getPlayerStorageValue(cid, storages.petMana) - attacks[myAttack].manaSpent)
if getPetMlvl(getPlayerStorageValue(cid, storages.petManaSpent)) > getPlayerStorageValue(cid, storages.petMag) then
setPlayerStorageValue(cid, storages.petMag, getPetMlvl(getPlayerStorageValue(cid, storages.petManaSpent)))
doCreatureSay(daPet, 'You advanced to magic level ' .. getPlayerStorageValue(cid, storages.petMag) .. '!', TALKTYPE_ORANGE_1)
end
else
doCreatureSay(daPet, '' .. frases[math.random(1, #frases)] .. '!', TALKTYPE_ORANGE_1)
end
else
doCreatureSay(daPet, 'My magic level is too low!', TALKTYPE_ORANGE_1)
end
else doCreatureSay(daPet, 'AAh Im out of mana!', TALKTYPE_ORANGE_1)
end
else
doCreatureSay(daPet, 'Woups! I can\'t use that spell yet', TALKTYPE_ORANGE_1)
end
else
----------------special attacks ?----------------------
end
else
doPlayerSendCancel(cid, 'You must spesific a spell.')
end
else
doPlayerSendCancel(cid, 'You haven\'t call your pet!.')
end
return setExhausted(cid)
end
!petinfo
dofile("./petConfig.lua")
function onSay(cid, words, param)
if isExhausted(cid) == 1 then
return 0
end
local request = 0
local daPet = getPlayerStorageValue(cid, storages.petUid)
if isCreature(daPet) == 1 then
param = string.lower(param)
if param == "magic level" then
request = getPlayerStorageValue(cid, storages.petMag)
elseif param == "mana" then
request = getPlayerStorageValue(cid, storages.petMana)
elseif param == "health" then
request = getCreatureHealth(daPet)
end
if request ~= 0 then
doPlayerSendTextMessage(cid, 19, 'pet ' .. param .. ': ' .. request .. '.')
end
else
doPlayerSendCancel(cid, 'Você tem que chamar seu pet antes!')
end
return setExhausted(cid)
end
petSystemExhaustion = 1 --in secods, 0 = no exhausted.
frases = {"Men, im still exhausted!", "Ok, in one momment", "afff, again?!", "meh, one second"}
lenght = 39 -- maximun lenght the !petsay can have...
manaGainTicks = 3000 --
--how fast the pet gains mana
manaGainAmmount = 10 --//
manaGainPerLevel = 20 -- mana that gains the pet for each level the player gain
magicLevelRate = 4 -- how faster the pet will gain mlvl compared to real tibia,,
base = 2000 --base storage. All storages will depend of this number
storages = {
petMag = base,
petUid = base+1,
petExha = base+2,
petDamage = base+3,
petManaSpent = base+4,
petIsOnline = base+5,
petMana = base+6,
petIsHealing = base+7,
petCap = base+8,
petSystemExhaustion = base+9
}
petItems = {}
maxItems = 10 --Max items the pet can carry
--lol V
x = 0 y = function() x = x + 1 end table.foreach(storages, y)
for i = 1, maxItems do
petItems[i] = base+x+i
end
--Pets, dependiong on the level
pets =
{
{vocations = {1, 5}, petS =
{{level = 100, name = "demon"}, {level = 60, name = "Dragon"}, {level = 50, name = "Dwarf Geomancer"}, {level = 40, name = "Demon Skeleton"}, {level = 30, name = "Fire Devil"}, {level = 20, name = "Minotaur Archer"}, {level = 10, name = "Minotaur"}, {level = 0, name = "Rat"}}
},
{vocations = {2, 6}, petS =
{{level = 100, name = "demon"}, {level = 60, name = "Dragon"}, {level = 50, name = "Dwarf Geomancer"}, {level = 40, name = "Demon Skeleton"}, {level = 30, name = "Fire Devil"}, {level = 20, name = "Minotaur Archer"}, {level = 10, name = "Minotaur"}, {level = 0, name = "Rat"}}
},
{vocations = {3, 7}, petS =
{{level = 100, name = "demon"}, {level = 60, name = "Dragon"}, {level = 50, name = "Dwarf Geomancer"}, {level = 40, name = "Demon Skeleton"}, {level = 30, name = "Fire Devil"}, {level = 20, name = "Minotaur Archer"}, {level = 10, name = "Minotaur"}, {level = 0, name = "Rat"}}
},
{vocations = {4, 8}, petS =
{{level = 100, name = "demon"}, {level = 60, name = "Dragon"}, {level = 50, name = "Dwarf Geomancer"}, {level = 40, name = "Demon Skeleton"}, {level = 30, name = "Fire Devil"}, {level = 20, name = "Minotaur Archer"}, {level = 10, name = "Minotaur"}, {level = 0, name = "Rat"}}
}
}
--attacks of the pet. !petattack "param
--It's pretty easy how to config, I think it doesn't need an extra explanation.
attacks = {{param = "m1", theFunction = false, offensive = 1, needLevel = 20, self = 0, needMag = 10, manaSpent = 60, exhausted = 1, range = 6, combatType =COMBAT_ENERGYDAMAGE, combatAni = CONST_ME_ENERGYAREA, area = 2,
formula = {maxb = 0.4, maxa = 30, minb = 0.5, mina = 0},
},
{param = "m2", theFunction = false, offensive = 1, needLevel = 40, self = 0, needMag = 5, manaSpent = 145, exhausted = 1, range = 0, combatType = COMBAT_PHYSICALDAMAGE, combatAni = CONST_ME_HITAREA, area = 2,
formula = {maxb = 0.6, maxa = 30, minb = 1.2, mina = 0},
},
{param = "m3", theFunction = false, offensive = 1, needLevel = 50, self = 0, needMag = 15, manaSpent = 100, exhausted = 1, range = 3, combatType = COMBAT_FIREDAMAGE, combatAni = CONST_ME_FIREAREA, area = 6, formula = {maxb = 0.6, maxa = 30, minb = 1.2, mina = 0}
},
{param = "m4", theFunction = false, offensive = 1, needLevel = 0, self = 0, needMag = 0, manaSpent = 20, exhausted = 1, range = 1, combatType = COMBAT_ENERGYDAMAGE, combatAni = CONST_ME_ENERGYAREA, area = 1,
formula = {maxb = 0.13, maxa = 0, minb = 0.262, mina = 0}
},
{param = "m5", theFunction = false, offensive = -1, needLevel = 10, self = 1, needMag = 0, manaSpent = 100, exhausted = 2, range = 0, combatType = COMBAT_HEALING, combatAni = CONST_ME_MAGIC_BLUE, area = 1,
formula = {maxb = 0.4, maxa = 20, minb = 0.7, mina = 0}
},
{param = "m6", needLevel = 1, needMag = 0, manaSpent = 300, exhausted = 2,
theFunction = function (parameters)
daPet = getPlayerStorageValue(parameters.cid, storages.petUid)
if getCreatureTarget(daPet) ~= 0 then
doAddCondition(getCreatureTarget(parameters.cid), 4)
end
end
},
{param = "m7", needLevel = 10, needMag = 4, manaSpent = 60, exhausted = 2,
theFunction = function (parameters)
doAddCondition(getPlayerStorageValue(parameters.cid, storages.petUid), 11)
end
},
{param = "m8", needLevel = 1, needMag = 0, manaSpent = 100, exhausted = 2,
theFunction = function (parameters)
local myAttack = formulaAttack(getPlayerLevel(parameters.cid), getPlayerStorageValue(parameters.cid, storages.petMag), 0.7, 0, 1.0, 0)
function doAreaCombatHealthEx(params)
local randoms = {[1] = math.random(-2, 2),
[2] = math.random(-2, 2)
}
local attackCreature = getPlayerStorageValue(parameters.cid, storages.petUid)
if getCreatureTarget(getPlayerStorageValue(parameters.cid, storages.petUid)) ~= 0 then
attackCreature = getCreatureTarget(getPlayerStorageValue(parameters.cid, storages.petUid))
end
local posa = getCreaturePosition(attackCreature)
doAreaCombatHealth(getPlayerStorageValue(parameters.cid, storages.petUid), COMBAT_FIREDAMAGE, {x = posa.x + randoms[1], y = posa.y + randoms[2], z = posa.z}, 1, -params.myAttack.minD, -params.myAttack.maxD, CONST_ME_FIREAREA)
doSendDistanceShoot(getCreaturePosition(getPlayerStorageValue(parameters.cid, storages.petUid)), {x = posa.x + randoms[1], y = posa.y + randoms[2], z = posa.z}, CONST_ANI_FIRE)
end
doAreaCombatHealthEx({cid = parameters.cid, target = getCreaturePosition(attackCreature), myAttack = myAttack})
for i = 1, 7 do
addEvent(doAreaCombatHealthEx, 200*i, {cid = parameters.cid, target = getCreaturePosition(attackCreature), myAttack = myAttack})
end
end
}
}
function setExhausted(cid)
setPlayerStorageValue(cid, storages.petSystemExhaustion, os.clock()+1)
end
function formulaAttack(magicLevel, level, maxb, maxa, minb, mina) return {minD = (level * 2 + magicLevel * 3) * (1 + mina) + minb,
maxD = (level * 2 + magicLevel * 3) * (1 + maxb) + maxa
}
end
function isExhausted(cid)
if isPlayer(cid) == 1 then
local CRONOMETRO = getPlayerStorageValue(cid, storages.petSystemExhaustion)
local CRONOMETRO2 = os.clock()
local TIEMPO = os.difftime(CRONOMETRO2, CRONOMETRO)
if petSystemExhaustion - TIEMPO > petSystemExhaustion or CRONOMETRO == -1 then
setPlayerStorageValue(cid, storages.petSystemExhaustion, CRONOMETRO2+1)
return 0
end
if petSystemExhaustion - TIEMPO <= 0 then
return 0
end
end
return 1
end
function addMana(a)
local cid = a.cid
local petManaMax = getPlayerLevel(cid)*manaGainPerLevel
if getPlayerStorageValue(cid, storages.petMana) < petManaMax then
if petManaMax - getPlayerStorageValue(cid, storages.petMana) < 10 then
setPlayerStorageValue(cid, storages.petMana, getPlayerStorageValue(cid, storages.petMana) + petManaMax - getPlayerStorageValue(cid, storages.petMana))
else
setPlayerStorageValue(cid, storages.petMana, getPlayerStorageValue(cid, storages.petMana) + 10)
end
addEvent(addMana, manaGainTicks, {cid = cid})
else setPlayerStorageValue(cid, storages.petIsHealing, 0)
end
end
!pet
dofile("./petConfig.lua")
function doPlayerAddSummon(cid, name, pos)
local MyCreature = doSummonCreature(name, pos)
doConvinceCreature(cid, MyCreature)
return MyCreature
end
local myPet = ""
local myPetUid = 0
function onSay(cid, words, param)
if isExhausted(cid) == 1 then
return 0
end
if getPlayerStorageValue(cid, storages.petMag) == -1 then
setPlayerStorageValue(cid, storages.petMag, 0)
end
if isCreature(getPlayerStorageValue(cid, storages.petUid)) == 0 then
if getTilePzInfo(getCreaturePosition(cid)) == 0 then
if getPlayerStorageValue(cid, storages.petIsOnline) == 1 or getPlayerStorageValue(cid, storages.petIsOnline) == -1 then
for i = 1, #pets do
if isInArray(pets[i].vocations, getPlayerVocation(cid)) == 1 then
for k = 1, #pets[i].petS do
if petS[i].petS[k].level <= getPlayerLevel(cid) then
myPet = petS[i].petS[k].name
break
end
end
break
end
end
myPetUid = doPlayerAddSummon(cid, myPet, getCreaturePosition(cid))
if myPetUid ~= -1 then
setPlayerStorageValue(cid, storages.petUid, myPetUid)
if getPlayerStorageValue(cid, storages.petDamage) ~= 0 and getPlayerStorageValue(cid, storages.petDamage) ~= -1 then
if getPlayerStorageValue(cid, storages.petDamage) < getCreatureMaxHealth(getPlayerStorageValue(cid, storages.petUid)) then
doCreatureAddHealth(getPlayerStorageValue(cid, storages.petUid), getPlayerStorageValue(cid, storages.petDamage)*-1)
end
end
doChangeSpeed(myPetUid, getCreatureBaseSpeed(cid) - getCreatureBaseSpeed(myPetUid))
doCreatureSay(myPetUid, 'Hail Manim!', TALKTYPE_ORANGE_1)
addMana({cid = cid})
setPlayerStorageValue(cid, storages.petIsOnline, 2)
else
doPlayerSendCancel(cid, 'Not enought room.')
end
else
doPlayerSendCancel(cid, 'Seu pet esta morto! Voce tem que revive-lo.')
end
else
doPlayerSendCancel(cid, 'Voce nao pode chamar seu pet em uma PZ.')
end
else
local daPet = getPlayerStorageValue(cid, storages.petUid)
setPlayerStorageValue(cid, storages.petDamage, getCreatureMaxHealth(daPet) - getCreatureHealth(daPet))
doCreatureSay(daPet, 'Bye bye !', TALKTYPE_ORANGE_1)
setPlayerStorageValue(cid, storages.petIsOnline, 1)
doSendMagicEffect(getCreaturePosition(daPet), CONST_ME_POFF)
doRemoveCreature(daPet)
end
return setExhausted(cid)
end
!petattack
dofile("./petConfig.lua")
function onSay(cid, words, param)
if isExhausted(cid) == 1 then
return 0
end
local lookDirs = {[0] = {x = 0, y = -1},
[1] = {x = 1, y = 0},
[2] = {x = 0, y = 1},
[3] = {x = -1, y = 0}
}
local myAttack = 0
local CRONOMETRO = 0
local CRONOMETRO2 = 0
local TIEMPO = 0
function formulaAttack(magicLevel, level, maxb, maxa, minb, mina)
return {minD = (level * 2 + magicLevel * 3) * (1 + mina) + minb,
maxD = (level * 2 + magicLevel * 3) * (1 + maxb) + maxa
}
end
function getPetMlvl(manaSpent)
local i = 0
while manaSpent >= (1600 * (1.2^i))*magicLevelRate do
i = i + 1
end
return i
end
local daPet = getPlayerStorageValue(cid, storages.petUid)
if isCreature(daPet) == 1 then
if param ~= nil then
param = string.lower(param)
local petPos = getCreaturePosition(daPet)
local lookDir = getPlayerLookDir(cid) -- getPlayerLookDir(daPet plz ! ! !)
local damage = {}
CRONOMETRO = getPlayerStorageValue(cid, storages.petExha)
CRONOMETRO2 = os.clock()
TIEMPO = os.difftime(CRONOMETRO2, CRONOMETRO)
for i = 1, #attacks do
if param == attacks[i].param then
myAttack = i
break
end
end
if myAttack ~= 0 then
if attacks[myAttack].exhausted - TIEMPO > attacks[myAttack].exhausted or CRONOMETRO == -1 then
setPlayerStorageValue(cid, storages.petExha, CRONOMETRO2+1)
end
if getPlayerStorageValue(cid, storages.petMana) >= attacks[myAttack].manaSpent then
if attacks[myAttack].needLevel <= getPlayerLevel(cid) then
if attacks[myAttack].needMag <= getPlayerStorageValue(cid, storages.petMag) then
if attacks[myAttack].exhausted - TIEMPO <= 0 then
if attacks[myAttack].theFunction == false then
damage = formulaAttack(getPlayerStorageValue(cid, storages.petMag), getPlayerLevel(cid), attacks[myAttack].formula.maxb, attacks[myAttack].formula.maxa, attacks[myAttack].formula.minb, attacks[myAttack].formula.mina) doAreaCombatHealth(daPet*((attacks[myAttack].self - 1)*-1), attacks[myAttack].combatType, {x = petPos.x + attacks[myAttack].range*lookDirs[lookDir].x, y = petPos.y + attacks[myAttack].range*lookDirs[lookDir].y, z = petPos.z}, attacks[myAttack].area, math.floor(damage.minD*-1*attacks[myAttack].offensive), math.floor(damage.maxD*-1*attacks[myAttack].offensive), attacks[myAttack].combatAni)
else attacks[myAttack].theFunction({cid = cid, words = words, param = param})
end
doCreatureSay(daPet, '' .. param .. '!', TALKTYPE_ORANGE_1)
if getPlayerStorageValue(cid, storages.petIsHealing) == 0 or getPlayerStorageValue(cid, storages.petIsHealing) == -1 then
addEvent(addMana, manaGainTicks, {cid = cid})
setPlayerStorageValue(cid, storages.petIsHealing, 1)
end
setPlayerStorageValue(cid, storages.petExha, CRONOMETRO2+1)
setPlayerStorageValue(cid, storages.petManaSpent, getPlayerStorageValue(cid, storages.petManaSpent) + attacks[myAttack].manaSpent)
setPlayerStorageValue(cid, storages.petMana, getPlayerStorageValue(cid, storages.petMana) - attacks[myAttack].manaSpent)
if getPetMlvl(getPlayerStorageValue(cid, storages.petManaSpent)) > getPlayerStorageValue(cid, storages.petMag) then
setPlayerStorageValue(cid, storages.petMag, getPetMlvl(getPlayerStorageValue(cid, storages.petManaSpent)))
doCreatureSay(daPet, 'You advanced to magic level ' .. getPlayerStorageValue(cid, storages.petMag) .. '!', TALKTYPE_ORANGE_1)
end
else
doCreatureSay(daPet, '' .. frases[math.random(1, #frases)] .. '!', TALKTYPE_ORANGE_1)
end
else
doCreatureSay(daPet, 'My magic level is too low!', TALKTYPE_ORANGE_1)
end
else doCreatureSay(daPet, 'AAh Im out of mana!', TALKTYPE_ORANGE_1)
end
else
doCreatureSay(daPet, 'Woups! I can\'t use that spell yet', TALKTYPE_ORANGE_1)
end
else
----------------special attacks ?----------------------
end
else
doPlayerSendCancel(cid, 'You must spesific a spell.')
end
else
doPlayerSendCancel(cid, 'You haven\'t call your pet!.')
end
return setExhausted(cid)
end
!petinfo
dofile("./petConfig.lua")
function onSay(cid, words, param)
if isExhausted(cid) == 1 then
return 0
end
local request = 0
local daPet = getPlayerStorageValue(cid, storages.petUid)
if isCreature(daPet) == 1 then
param = string.lower(param)
if param == "magic level" then
request = getPlayerStorageValue(cid, storages.petMag)
elseif param == "mana" then
request = getPlayerStorageValue(cid, storages.petMana)
elseif param == "health" then
request = getCreatureHealth(daPet)
end
if request ~= 0 then
doPlayerSendTextMessage(cid, 19, 'pet ' .. param .. ': ' .. request .. '.')
end
else
doPlayerSendCancel(cid, 'Você tem que chamar seu pet antes!')
end
return setExhausted(cid)
end
Chaos Bangle
Crie um arquivo chamado "chaosbangle" em movements. Dentro dele coloque isto:
QUOTE
-- >> Small config section --
local outfitMale =
{
lookType = 12,
lookHead = 19,
lookBody = 79,
lookLegs = 3,
lookFeet = 81,
lookAddons = 0
}
local outfitFemale =
{
lookType = 12,
lookHead = 19,
lookBody = 53,
lookLegs = 92,
lookFeet = 79,
lookAddons = 0
}
local cointype = 2152 -- Id of the coin the spell will use (2148 = gold coin, 2152 = platinum coin, 2160 = crystal coin) --
local tbcw = 2000 -- coin wasting time interval (miliseconds) --
local ncws = 1 -- number of coins used up during time interval --
local ncni = 20 -- number of coins needed to trigger the transformation --
local stcn = 20 -- number of coins needed to execute script (must be higher than ncni value) --
local warn = 1 -- warns player when runing short on coins, 1 = yes --
local cwar = 20 -- number of coins that triggers the warnings --
local bmaineff = CONST_ME_YELLOW_RINGS
local bsecondeff = CONST_ME_BLOCKHIT
local bflingeff = CONST_ANI_SMALLHOLY
local blandeff = CONST_ME_HOLYAREA
local bringwaste = CONST_ME_FIREWORK_YELLOW
local bringabsorb = CONST_ME_MAGIC_GREEN
local gmaineff = CONST_ME_EXPLOSIONAREA
local gsecondeff = CONST_ME_FIREAREA
local gflingeff = CONST_ANI_FIRE
local glandeff = CONST_ME_FIREWORK_RED
local gringwaste = CONST_ME_FIREWORK_RED
local gringabsorb = CONST_ME_MAGIC_RED
-- Small config section << --
local condition1 = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(condition1, CONDITION_PARAM_TICKS, -1)
setConditionParam(condition1, CONDITION_PARAM_SKILL_FIST, 210)
setConditionParam(condition1, CONDITION_PARAM_SKILL_FISHING, 210)
setConditionParam(condition1, CONDITION_PARAM_SKILL_CLUB, 210)
setConditionParam(condition1, CONDITION_PARAM_SKILL_SWORD, 210)
setConditionParam(condition1, CONDITION_PARAM_SKILL_AXE, 210)
setConditionParam(condition1, CONDITION_PARAM_SKILL_DISTANCE, 210)
setConditionParam(condition1, CONDITION_PARAM_SKILL_SHIELD, 210)
setConditionParam(condition1, CONDITION_PARAM_SKILL_FISHING, 210)
setConditionParam(condition1, CONDITION_PARAM_STAT_MAGICPOINTS, 210)
setConditionParam(condition1, CONDITION_PARAM_STAT_MAXHITPOINTSPERCENT, 215)
setConditionParam(condition1, CONDITION_PARAM_STAT_MAXMANAPOINTSPERCENT, 210)
local condition2 = createConditionObject(CONDITION_HASTE)
setConditionParam(condition2, CONDITION_PARAM_TICKS, -1)
setConditionFormula(condition2, 2.5, 0, 3.0, 0)
function superform1(param)
if param.crca == 1 then
local pos = getCreaturePosition(param.cid)
local sex = getPlayerSex(param.cid)
local nha = {x = pos.x, y = pos.y - 3, z = pos.z, stackpos = 255}
local sha = {x = pos.x, y = pos.y + 3, z = pos.z, stackpos = 255}
local wha = {x = pos.x - 3, y = pos.y, z = pos.z, stackpos = 255}
local eha = {x = pos.x + 3, y = pos.y, z = pos.z, stackpos = 255}
local nwa = {x = pos.x - 2, y = pos.y - 2, z = pos.z, stackpos = 255}
local nea = {x = pos.x + 2, y = pos.y - 2, z = pos.z, stackpos = 255}
local sea = {x = pos.x + 2, y = pos.y + 2, z = pos.z, stackpos = 255}
local swa = {x = pos.x - 2, y = pos.y + 2, z = pos.z, stackpos = 255}
if sex == 1 then
doSendMagicEffect(pos, bmaineff)
doSendMagicEffect(pos, bsecondeff)
doSendDistanceShoot(pos, nha, bflingeff)
doSendDistanceShoot(pos, sha, bflingeff)
doSendDistanceShoot(pos, wha, bflingeff)
doSendDistanceShoot(pos, eha, bflingeff)
doSendDistanceShoot(pos, nwa, bflingeff)
doSendDistanceShoot(pos, nea, bflingeff)
doSendDistanceShoot(pos, sea, bflingeff)
doSendDistanceShoot(pos, swa, bflingeff)
doSendMagicEffect(nha, blandeff)
doSendMagicEffect(sha, blandeff)
doSendMagicEffect(wha, blandeff)
doSendMagicEffect(eha, blandeff)
doSendMagicEffect(nwa, blandeff)
doSendMagicEffect(nea, blandeff)
doSendMagicEffect(sea, blandeff)
doSendMagicEffect(swa, blandeff)
doSetCreatureOutfit(param.cid, outfitMale, -1)
else
doSendMagicEffect(pos, gmaineff)
doSendMagicEffect(pos, gsecondeff)
doSendDistanceShoot(pos, nha, gflingeff)
doSendDistanceShoot(pos, sha, gflingeff)
doSendDistanceShoot(pos, wha, gflingeff)
doSendDistanceShoot(pos, eha, gflingeff)
doSendDistanceShoot(pos, nwa, gflingeff)
doSendDistanceShoot(pos, nea, gflingeff)
doSendDistanceShoot(pos, sea, gflingeff)
doSendDistanceShoot(pos, swa, gflingeff)
doSendMagicEffect(nha, glandeff)
doSendMagicEffect(sha, glandeff)
doSendMagicEffect(wha, glandeff)
doSendMagicEffect(eha, glandeff)
doSendMagicEffect(nwa, glandeff)
doSendMagicEffect(nea, glandeff)
doSendMagicEffect(sea, glandeff)
doSendMagicEffect(swa, glandeff)
doSetCreatureOutfit(param.cid, outfitFemale, -1)
end
doAddCondition(param.cid, condition1)
doAddCondition(param.cid, condition2)
local mhp = getCreatureMaxHealth(param.cid)
local mma = getPlayerMaxMana(param.cid)
local chp = getCreatureHealth(param.cid)
local cma = getPlayerMana(param.cid)
local dhp = mhp - chp
local dma = mma - cma
doCreatureAddHealth(param.cid, dhp)
doPlayerAddMana(param.cid, dma)
doPlayerRemoveItem(param.cid, cointype, ncni)
param.crcb = 1
param.sex = sex
setPlayerStorageValue(param.cid, 50780, 1)
addEvent(superform2, 1, param)
end
end
function superform2(param)
if param.crca == 1 and param.crcb == 1 and isCreature(param.cid) == TRUE and getPlayerStorageValue(param.cid, 50780) == 1 then
local pos = getCreaturePosition(param.cid)
doPlayerRemoveItem(param.cid, cointype, ncws)
if param.sex == 1 then
doSendMagicEffect(pos, bringwaste)
doSendMagicEffect(pos, bringabsorb)
else
doSendMagicEffect(pos, gringwaste)
doSendMagicEffect(pos, gringabsorb)
end
local goldleft = getPlayerItemCount(param.cid, cointype)
if goldleft < cwar and warn == 1 then
doPlayerSendTextMessage(param.cid, MESSAGE_STATUS_CONSOLE_RED, "Coins left: " ..goldleft.. ".")
end
if goldleft < ncws then
param.crca = 0
param.crcb = 0
setPlayerStorageValue(param.cid, 50780, 0)
doPlayerSendTextMessage(param.cid, MESSAGE_EVENT_DEFAULT, "No cash left!")
local pos = getCreaturePosition(param.cid)
local nha = {x = pos.x, y = pos.y - 3, z = pos.z, stackpos = 255}
local sha = {x = pos.x, y = pos.y + 3, z = pos.z, stackpos = 255}
local wha = {x = pos.x - 3, y = pos.y, z = pos.z, stackpos = 255}
local eha = {x = pos.x + 3, y = pos.y, z = pos.z, stackpos = 255}
local nwa = {x = pos.x - 2, y = pos.y - 2, z = pos.z, stackpos = 255}
local nea = {x = pos.x + 2, y = pos.y - 2, z = pos.z, stackpos = 255}
local sea = {x = pos.x + 2, y = pos.y + 2, z = pos.z, stackpos = 255}
local swa = {x = pos.x - 2, y = pos.y + 2, z = pos.z, stackpos = 255}
doRemoveCondition(param.cid, CONDITION_OUTFIT)
doRemoveCondition(param.cid, CONDITION_ATTRIBUTES)
doRemoveCondition(param.cid, CONDITION_HASTE)
if param.sex == 1 then
doSendMagicEffect(pos, bmaineff)
doSendMagicEffect(pos, bsecondeff)
doSendDistanceShoot(pos, nha, bflingeff)
doSendDistanceShoot(pos, sha, bflingeff)
doSendDistanceShoot(pos, wha, bflingeff)
doSendDistanceShoot(pos, eha, bflingeff)
doSendDistanceShoot(pos, nwa, bflingeff)
doSendDistanceShoot(pos, nea, bflingeff)
doSendDistanceShoot(pos, sea, bflingeff)
doSendDistanceShoot(pos, swa, bflingeff)
doSendMagicEffect(nha, blandeff)
doSendMagicEffect(sha, blandeff)
doSendMagicEffect(wha, blandeff)
doSendMagicEffect(eha, blandeff)
doSendMagicEffect(nwa, blandeff)
doSendMagicEffect(nea, blandeff)
doSendMagicEffect(sea, blandeff)
doSendMagicEffect(swa, blandeff)
else
doSendMagicEffect(pos, gmaineff)
doSendMagicEffect(pos, gsecondeff)
doSendDistanceShoot(pos, nha, gflingeff)
doSendDistanceShoot(pos, sha, gflingeff)
doSendDistanceShoot(pos, wha, gflingeff)
doSendDistanceShoot(pos, eha, gflingeff)
doSendDistanceShoot(pos, nwa, gflingeff)
doSendDistanceShoot(pos, nea, gflingeff)
doSendDistanceShoot(pos, sea, gflingeff)
doSendDistanceShoot(pos, swa, gflingeff)
doSendMagicEffect(nha, glandeff)
doSendMagicEffect(sha, glandeff)
doSendMagicEffect(wha, glandeff)
doSendMagicEffect(eha, glandeff)
doSendMagicEffect(nwa, glandeff)
doSendMagicEffect(nea, glandeff)
doSendMagicEffect(sea, glandeff)
doSendMagicEffect(swa, glandeff)
end
else
addEvent(superform2, tbcw, param)
end
end
end
function onEquip(cid, item, slot)
local param = {cid = cid, item = item, slot = slot}
local gold = getPlayerItemCount(cid, cointype)
if gold > stcn then
param.crca = 1
--can equip here?
addEvent(superform1, 1, param)
return TRUE
end
end
function onDeEquip(cid, item, slot)
if isPlayer(cid) and getPlayerStorageValue(cid, 50780) == 1 then
doRemoveCondition(cid, CONDITION_OUTFIT)
doRemoveCondition(cid, CONDITION_ATTRIBUTES)
doRemoveCondition(cid, CONDITION_HASTE)
local pos = getCreaturePosition(cid)
setPlayerStorageValue(cid, 50780, 0)
local sex = getPlayerSex(cid)
local nha = {x = pos.x, y = pos.y - 3, z = pos.z, stackpos = 255}
local sha = {x = pos.x, y = pos.y + 3, z = pos.z, stackpos = 255}
local wha = {x = pos.x - 3, y = pos.y, z = pos.z, stackpos = 255}
local eha = {x = pos.x + 3, y = pos.y, z = pos.z, stackpos = 255}
local nwa = {x = pos.x - 2, y = pos.y - 2, z = pos.z, stackpos = 255}
local nea = {x = pos.x + 2, y = pos.y - 2, z = pos.z, stackpos = 255}
local sea = {x = pos.x + 2, y = pos.y + 2, z = pos.z, stackpos = 255}
local swa = {x = pos.x - 2, y = pos.y + 2, z = pos.z, stackpos = 255}
if sex == 1 then
doSendMagicEffect(pos, bmaineff)
doSendMagicEffect(pos, bsecondeff)
doSendDistanceShoot(pos, nha, bflingeff)
doSendDistanceShoot(pos, sha, bflingeff)
doSendDistanceShoot(pos, wha, bflingeff)
doSendDistanceShoot(pos, eha, bflingeff)
doSendDistanceShoot(pos, nwa, bflingeff)
doSendDistanceShoot(pos, nea, bflingeff)
doSendDistanceShoot(pos, sea, bflingeff)
doSendDistanceShoot(pos, swa, bflingeff)
doSendMagicEffect(nha, blandeff)
doSendMagicEffect(sha, blandeff)
doSendMagicEffect(wha, blandeff)
doSendMagicEffect(eha, blandeff)
doSendMagicEffect(nwa, blandeff)
doSendMagicEffect(nea, blandeff)
doSendMagicEffect(sea, blandeff)
doSendMagicEffect(swa, blandeff)
else
doSendMagicEffect(pos, gmaineff)
doSendMagicEffect(pos, gsecondeff)
doSendDistanceShoot(pos, nha, gflingeff)
doSendDistanceShoot(pos, sha, gflingeff)
doSendDistanceShoot(pos, wha, gflingeff)
doSendDistanceShoot(pos, eha, gflingeff)
doSendDistanceShoot(pos, nwa, gflingeff)
doSendDistanceShoot(pos, nea, gflingeff)
doSendDistanceShoot(pos, sea, gflingeff)
doSendDistanceShoot(pos, swa, gflingeff)
doSendMagicEffect(nha, glandeff)
doSendMagicEffect(sha, glandeff)
doSendMagicEffect(wha, glandeff)
doSendMagicEffect(eha, glandeff)
doSendMagicEffect(nwa, glandeff)
doSendMagicEffect(nea, glandeff)
doSendMagicEffect(sea, glandeff)
doSendMagicEffect(swa, glandeff)
end
end
return TRUE
end
QUOTE
-- >> Small config section --
local outfitMale =
{
lookType = 12,
lookHead = 19,
lookBody = 79,
lookLegs = 3,
lookFeet = 81,
lookAddons = 0
}
local outfitFemale =
{
lookType = 12,
lookHead = 19,
lookBody = 53,
lookLegs = 92,
lookFeet = 79,
lookAddons = 0
}
local cointype = 2152 -- Id of the coin the spell will use (2148 = gold coin, 2152 = platinum coin, 2160 = crystal coin) --
local tbcw = 2000 -- coin wasting time interval (miliseconds) --
local ncws = 1 -- number of coins used up during time interval --
local ncni = 20 -- number of coins needed to trigger the transformation --
local stcn = 20 -- number of coins needed to execute script (must be higher than ncni value) --
local warn = 1 -- warns player when runing short on coins, 1 = yes --
local cwar = 20 -- number of coins that triggers the warnings --
local bmaineff = CONST_ME_YELLOW_RINGS
local bsecondeff = CONST_ME_BLOCKHIT
local bflingeff = CONST_ANI_SMALLHOLY
local blandeff = CONST_ME_HOLYAREA
local bringwaste = CONST_ME_FIREWORK_YELLOW
local bringabsorb = CONST_ME_MAGIC_GREEN
local gmaineff = CONST_ME_EXPLOSIONAREA
local gsecondeff = CONST_ME_FIREAREA
local gflingeff = CONST_ANI_FIRE
local glandeff = CONST_ME_FIREWORK_RED
local gringwaste = CONST_ME_FIREWORK_RED
local gringabsorb = CONST_ME_MAGIC_RED
-- Small config section << --
local condition1 = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(condition1, CONDITION_PARAM_TICKS, -1)
setConditionParam(condition1, CONDITION_PARAM_SKILL_FIST, 210)
setConditionParam(condition1, CONDITION_PARAM_SKILL_FISHING, 210)
setConditionParam(condition1, CONDITION_PARAM_SKILL_CLUB, 210)
setConditionParam(condition1, CONDITION_PARAM_SKILL_SWORD, 210)
setConditionParam(condition1, CONDITION_PARAM_SKILL_AXE, 210)
setConditionParam(condition1, CONDITION_PARAM_SKILL_DISTANCE, 210)
setConditionParam(condition1, CONDITION_PARAM_SKILL_SHIELD, 210)
setConditionParam(condition1, CONDITION_PARAM_SKILL_FISHING, 210)
setConditionParam(condition1, CONDITION_PARAM_STAT_MAGICPOINTS, 210)
setConditionParam(condition1, CONDITION_PARAM_STAT_MAXHITPOINTSPERCENT, 215)
setConditionParam(condition1, CONDITION_PARAM_STAT_MAXMANAPOINTSPERCENT, 210)
local condition2 = createConditionObject(CONDITION_HASTE)
setConditionParam(condition2, CONDITION_PARAM_TICKS, -1)
setConditionFormula(condition2, 2.5, 0, 3.0, 0)
function superform1(param)
if param.crca == 1 then
local pos = getCreaturePosition(param.cid)
local sex = getPlayerSex(param.cid)
local nha = {x = pos.x, y = pos.y - 3, z = pos.z, stackpos = 255}
local sha = {x = pos.x, y = pos.y + 3, z = pos.z, stackpos = 255}
local wha = {x = pos.x - 3, y = pos.y, z = pos.z, stackpos = 255}
local eha = {x = pos.x + 3, y = pos.y, z = pos.z, stackpos = 255}
local nwa = {x = pos.x - 2, y = pos.y - 2, z = pos.z, stackpos = 255}
local nea = {x = pos.x + 2, y = pos.y - 2, z = pos.z, stackpos = 255}
local sea = {x = pos.x + 2, y = pos.y + 2, z = pos.z, stackpos = 255}
local swa = {x = pos.x - 2, y = pos.y + 2, z = pos.z, stackpos = 255}
if sex == 1 then
doSendMagicEffect(pos, bmaineff)
doSendMagicEffect(pos, bsecondeff)
doSendDistanceShoot(pos, nha, bflingeff)
doSendDistanceShoot(pos, sha, bflingeff)
doSendDistanceShoot(pos, wha, bflingeff)
doSendDistanceShoot(pos, eha, bflingeff)
doSendDistanceShoot(pos, nwa, bflingeff)
doSendDistanceShoot(pos, nea, bflingeff)
doSendDistanceShoot(pos, sea, bflingeff)
doSendDistanceShoot(pos, swa, bflingeff)
doSendMagicEffect(nha, blandeff)
doSendMagicEffect(sha, blandeff)
doSendMagicEffect(wha, blandeff)
doSendMagicEffect(eha, blandeff)
doSendMagicEffect(nwa, blandeff)
doSendMagicEffect(nea, blandeff)
doSendMagicEffect(sea, blandeff)
doSendMagicEffect(swa, blandeff)
doSetCreatureOutfit(param.cid, outfitMale, -1)
else
doSendMagicEffect(pos, gmaineff)
doSendMagicEffect(pos, gsecondeff)
doSendDistanceShoot(pos, nha, gflingeff)
doSendDistanceShoot(pos, sha, gflingeff)
doSendDistanceShoot(pos, wha, gflingeff)
doSendDistanceShoot(pos, eha, gflingeff)
doSendDistanceShoot(pos, nwa, gflingeff)
doSendDistanceShoot(pos, nea, gflingeff)
doSendDistanceShoot(pos, sea, gflingeff)
doSendDistanceShoot(pos, swa, gflingeff)
doSendMagicEffect(nha, glandeff)
doSendMagicEffect(sha, glandeff)
doSendMagicEffect(wha, glandeff)
doSendMagicEffect(eha, glandeff)
doSendMagicEffect(nwa, glandeff)
doSendMagicEffect(nea, glandeff)
doSendMagicEffect(sea, glandeff)
doSendMagicEffect(swa, glandeff)
doSetCreatureOutfit(param.cid, outfitFemale, -1)
end
doAddCondition(param.cid, condition1)
doAddCondition(param.cid, condition2)
local mhp = getCreatureMaxHealth(param.cid)
local mma = getPlayerMaxMana(param.cid)
local chp = getCreatureHealth(param.cid)
local cma = getPlayerMana(param.cid)
local dhp = mhp - chp
local dma = mma - cma
doCreatureAddHealth(param.cid, dhp)
doPlayerAddMana(param.cid, dma)
doPlayerRemoveItem(param.cid, cointype, ncni)
param.crcb = 1
param.sex = sex
setPlayerStorageValue(param.cid, 50780, 1)
addEvent(superform2, 1, param)
end
end
function superform2(param)
if param.crca == 1 and param.crcb == 1 and isCreature(param.cid) == TRUE and getPlayerStorageValue(param.cid, 50780) == 1 then
local pos = getCreaturePosition(param.cid)
doPlayerRemoveItem(param.cid, cointype, ncws)
if param.sex == 1 then
doSendMagicEffect(pos, bringwaste)
doSendMagicEffect(pos, bringabsorb)
else
doSendMagicEffect(pos, gringwaste)
doSendMagicEffect(pos, gringabsorb)
end
local goldleft = getPlayerItemCount(param.cid, cointype)
if goldleft < cwar and warn == 1 then
doPlayerSendTextMessage(param.cid, MESSAGE_STATUS_CONSOLE_RED, "Coins left: " ..goldleft.. ".")
end
if goldleft < ncws then
param.crca = 0
param.crcb = 0
setPlayerStorageValue(param.cid, 50780, 0)
doPlayerSendTextMessage(param.cid, MESSAGE_EVENT_DEFAULT, "No cash left!")
local pos = getCreaturePosition(param.cid)
local nha = {x = pos.x, y = pos.y - 3, z = pos.z, stackpos = 255}
local sha = {x = pos.x, y = pos.y + 3, z = pos.z, stackpos = 255}
local wha = {x = pos.x - 3, y = pos.y, z = pos.z, stackpos = 255}
local eha = {x = pos.x + 3, y = pos.y, z = pos.z, stackpos = 255}
local nwa = {x = pos.x - 2, y = pos.y - 2, z = pos.z, stackpos = 255}
local nea = {x = pos.x + 2, y = pos.y - 2, z = pos.z, stackpos = 255}
local sea = {x = pos.x + 2, y = pos.y + 2, z = pos.z, stackpos = 255}
local swa = {x = pos.x - 2, y = pos.y + 2, z = pos.z, stackpos = 255}
doRemoveCondition(param.cid, CONDITION_OUTFIT)
doRemoveCondition(param.cid, CONDITION_ATTRIBUTES)
doRemoveCondition(param.cid, CONDITION_HASTE)
if param.sex == 1 then
doSendMagicEffect(pos, bmaineff)
doSendMagicEffect(pos, bsecondeff)
doSendDistanceShoot(pos, nha, bflingeff)
doSendDistanceShoot(pos, sha, bflingeff)
doSendDistanceShoot(pos, wha, bflingeff)
doSendDistanceShoot(pos, eha, bflingeff)
doSendDistanceShoot(pos, nwa, bflingeff)
doSendDistanceShoot(pos, nea, bflingeff)
doSendDistanceShoot(pos, sea, bflingeff)
doSendDistanceShoot(pos, swa, bflingeff)
doSendMagicEffect(nha, blandeff)
doSendMagicEffect(sha, blandeff)
doSendMagicEffect(wha, blandeff)
doSendMagicEffect(eha, blandeff)
doSendMagicEffect(nwa, blandeff)
doSendMagicEffect(nea, blandeff)
doSendMagicEffect(sea, blandeff)
doSendMagicEffect(swa, blandeff)
else
doSendMagicEffect(pos, gmaineff)
doSendMagicEffect(pos, gsecondeff)
doSendDistanceShoot(pos, nha, gflingeff)
doSendDistanceShoot(pos, sha, gflingeff)
doSendDistanceShoot(pos, wha, gflingeff)
doSendDistanceShoot(pos, eha, gflingeff)
doSendDistanceShoot(pos, nwa, gflingeff)
doSendDistanceShoot(pos, nea, gflingeff)
doSendDistanceShoot(pos, sea, gflingeff)
doSendDistanceShoot(pos, swa, gflingeff)
doSendMagicEffect(nha, glandeff)
doSendMagicEffect(sha, glandeff)
doSendMagicEffect(wha, glandeff)
doSendMagicEffect(eha, glandeff)
doSendMagicEffect(nwa, glandeff)
doSendMagicEffect(nea, glandeff)
doSendMagicEffect(sea, glandeff)
doSendMagicEffect(swa, glandeff)
end
else
addEvent(superform2, tbcw, param)
end
end
end
function onEquip(cid, item, slot)
local param = {cid = cid, item = item, slot = slot}
local gold = getPlayerItemCount(cid, cointype)
if gold > stcn then
param.crca = 1
--can equip here?
addEvent(superform1, 1, param)
return TRUE
end
end
function onDeEquip(cid, item, slot)
if isPlayer(cid) and getPlayerStorageValue(cid, 50780) == 1 then
doRemoveCondition(cid, CONDITION_OUTFIT)
doRemoveCondition(cid, CONDITION_ATTRIBUTES)
doRemoveCondition(cid, CONDITION_HASTE)
local pos = getCreaturePosition(cid)
setPlayerStorageValue(cid, 50780, 0)
local sex = getPlayerSex(cid)
local nha = {x = pos.x, y = pos.y - 3, z = pos.z, stackpos = 255}
local sha = {x = pos.x, y = pos.y + 3, z = pos.z, stackpos = 255}
local wha = {x = pos.x - 3, y = pos.y, z = pos.z, stackpos = 255}
local eha = {x = pos.x + 3, y = pos.y, z = pos.z, stackpos = 255}
local nwa = {x = pos.x - 2, y = pos.y - 2, z = pos.z, stackpos = 255}
local nea = {x = pos.x + 2, y = pos.y - 2, z = pos.z, stackpos = 255}
local sea = {x = pos.x + 2, y = pos.y + 2, z = pos.z, stackpos = 255}
local swa = {x = pos.x - 2, y = pos.y + 2, z = pos.z, stackpos = 255}
if sex == 1 then
doSendMagicEffect(pos, bmaineff)
doSendMagicEffect(pos, bsecondeff)
doSendDistanceShoot(pos, nha, bflingeff)
doSendDistanceShoot(pos, sha, bflingeff)
doSendDistanceShoot(pos, wha, bflingeff)
doSendDistanceShoot(pos, eha, bflingeff)
doSendDistanceShoot(pos, nwa, bflingeff)
doSendDistanceShoot(pos, nea, bflingeff)
doSendDistanceShoot(pos, sea, bflingeff)
doSendDistanceShoot(pos, swa, bflingeff)
doSendMagicEffect(nha, blandeff)
doSendMagicEffect(sha, blandeff)
doSendMagicEffect(wha, blandeff)
doSendMagicEffect(eha, blandeff)
doSendMagicEffect(nwa, blandeff)
doSendMagicEffect(nea, blandeff)
doSendMagicEffect(sea, blandeff)
doSendMagicEffect(swa, blandeff)
else
doSendMagicEffect(pos, gmaineff)
doSendMagicEffect(pos, gsecondeff)
doSendDistanceShoot(pos, nha, gflingeff)
doSendDistanceShoot(pos, sha, gflingeff)
doSendDistanceShoot(pos, wha, gflingeff)
doSendDistanceShoot(pos, eha, gflingeff)
doSendDistanceShoot(pos, nwa, gflingeff)
doSendDistanceShoot(pos, nea, gflingeff)
doSendDistanceShoot(pos, sea, gflingeff)
doSendDistanceShoot(pos, swa, gflingeff)
doSendMagicEffect(nha, glandeff)
doSendMagicEffect(sha, glandeff)
doSendMagicEffect(wha, glandeff)
doSendMagicEffect(eha, glandeff)
doSendMagicEffect(nwa, glandeff)
doSendMagicEffect(nea, glandeff)
doSendMagicEffect(sea, glandeff)
doSendMagicEffect(swa, glandeff)
end
end
return TRUE
end
Pet System
Va em Data>Actions>Scripts crie uma pasta.lua chamada pet e coloque isso dentro!
----- Config -----
local MonsterName = "Minotaur"
local MaximoSummon = 1
----- Config -----
local summons = getCreatureSummons(cid)
if(table.maxn(summons) < MaximoSummon) then -- no summons
doConvinceCreature(cid, doCreateMonster(MonsterName, getCreaturePosition(cid)))
doCreatureSay(cid, "Go,Minotaur", TALKTYPE_SAY)
doSendMagicEffect(getThingPos(cid), 10)
else
for _, pid in ipairs(summons) do
doRemoveCreature(pid)
doCreatureSay(cid, "Back,Minotaur", TALKTYPE_SAY)
end
end
return true
end
----- Config -----
local MonsterName = "Minotaur"
local MaximoSummon = 1
----- Config -----
local summons = getCreatureSummons(cid)
if(table.maxn(summons) < MaximoSummon) then -- no summons
doConvinceCreature(cid, doCreateMonster(MonsterName, getCreaturePosition(cid)))
doCreatureSay(cid, "Go,Minotaur", TALKTYPE_SAY)
doSendMagicEffect(getThingPos(cid), 10)
else
for _, pid in ipairs(summons) do
doRemoveCreature(pid)
doCreatureSay(cid, "Back,Minotaur", TALKTYPE_SAY)
end
end
return true
end
Assinar:
Postagens (Atom)