data\lib\050-function.lua
pula uma linha e cola isso la no final
function doRemoveSummon(cid, name, time)
if isMonster(getCreatureByName(name)) then
if (type(time) == "number" and time) > 0 then
doSummonMonster(cid, name)
for _, monsters in ipairs(getCreatureSummons(cid)) do
addEvent(doRemoveCreature, time*1000, monsters)
end
return TRUE
end
return error("Time must be a number higher than 0!")
end
return error("Creature not found!")
end
data\actions\scripts\nomedoarquivo.lua
function onUse(cid, item, frompos, item2, topos) local bicho = 'demon' if doPlayerRemoveItem(cid,7410,1) then -- troca id do item doRemoveSummon(cid, bicho, 20) end return true end
data\actions\actions.xml
<action itemid="7410" script="nomedoaquivo.lua"/>
se não tiver 050-function.lua
cola na function.lua
pro bicho não atk vc tem que tirar atk dele
exemplo
demon.xml
<?xml version="1.0" encoding="UTF-8"?> <monster name="Demon" nameDescription="a demon" race="fire" experience="6000" speed="275" manacost="10000"> <health now="8200" max="8200"/> <look type="35" corpse="5995"/> <targetchange interval="5000" chance="8"/> <strategy attack="90" defense="10"/> <flags> <flag summonable="0"/> <flag attackable="1"/> <flag hostile="1"/> <flag illusionable="0"/> <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="melee" interval="2000" skill="100" attack="1"/> </attacks> <defenses armor="55" defense="55"> <defense name="healing" interval="2000" chance="15" min="130" max="240"> <attribute key="areaEffect" value="blueshimmer"/> </defense> <defense name="speed" interval="1000" chance="8" speedchange="290" duration="5000"> <attribute key="areaEffect" value="redshimmer"/> </defense> </defenses> <elements> <element physicalPercent="30"/> <element energyPercent="50"/> <element earthPercent="20"/> <element icePercent="-15"/> <element holyPercent="-15"/> <element deathPercent="20"/> </elements> <immunities> <immunity fire="1"/> <immunity drown="1"/> <immunity paralyze="1"/> <immunity invisible="1"/> </immunities> <summons maxSummons="1"> <summon name="fire elemental" interval="1000" chance="12"/> </summons> <voices interval="5000" chance="10"> <voice sentence="MUHAHAHAHA!" yell="1"/> <voice sentence="I SMELL FEEEEEAAAR!" yell="1"/> <voice sentence="CHAMEK ATH UTHUL ARAK!" yell="1"/> <voice sentence="Your resistance is futile!"/> <voice sentence="Your soul will be mine!" yell="0"/> </voices> <loot> <item id="2148" countmax="100" chance1="100000" chancemax="0"/> -- gold coins <item id="2148" countmax="100" chance1="100000" chancemax="0"/> -- gold coins <item id="2152" countmax="3" chance1="33333" chancemax="2000"/> --Plat <item id="2514" chance="1900"/> --mastermind shield <item id="2472" chance="200"/> --magic plate armor <item id="2795" countmax="6" chance1="7500"/> --Fire Mushroom <item id="5906" countmax="1" chance="2000"/> -- demon dust <item id="5954" countmax="1" chance="2345"/> -- demon horn <item id="2164" chance="2100"/> --might ring <item id="2176" chance="3500"/> --orb <item id="1982" chance="1300"/> --purpel tome <item id="2165" chance="2300"/> --stealth ring <item id="7591" chance="4500"/> -- GHP <item id="1987" chance="100000"> <inside> <item id="2393" chance="3800"/> --giantsword <item id="2432" chance="3800"/> --fire axe <item id="2214" chance="2222"/> --ring of healing <item id="2396" chance="2600"/> --ice rapier <item id="2179" chance="1100"/> --golden ring <item id="2795" countmax="6" chance1="13000"/> --fire mushroom <item id="2678" countmax="3" chance1="10000" chancemax="0"/> --coconut <item id="2148" countmax="100" chance1="100000" chancemax="0"/> -- gold coin <item id="2151" countmax="4" chance1="5500" chancemax="0"/> <item id="2462" chance="3200"/> --devil helmet <item id="2149" countmax="3" chance1="11000" chancemax="0"/> <item id="2171" chance="2200"/> --platinum amulet <item id="2387" chance="32000"/> --double axe <item id="2470" chance="1350"/> --golden legs <item id="7382" chance="300"/> -- Demonrage Sword <item id="7393" chance="1700"/> -- Demon Trophy <item id="2520" chance="3100"/> --demon shield <item id="2418" chance="1500"/> --golden sickle <item id="2377" chance="6666"/> --two-handed sword </inside> </item> </loot> </monster>
deixei tudo só tirei as magias ![]()
só deixei o atk mele tirando 1
<attack name="melee" interval="2000" skill="100" attack="1"/>




info
Grupo: Campones
Registrado: 15/02/08
Posts: 72
Reputação: 0
Boa noite pessoal, gostaria de fazer mais um pedido, como sempre. Queria um Item que sumona-se um monstro ao dar use, e esse item sumisse depois de ser utilizado, entretanto eu queria que ele sumona-se um monstro por exemplo um Treiner mas o monstro sumisse depois de 20 segundos, por exemplo o cara compra o item, vai em uma quest e sumona o monstro, o monstro não ataca, porem fica la blocando por 20 segundos ou até morrer entende? Sei que para isso tenho que criar o monstro, e um script se alguém souber se tem como fazer isso ficarei muito grato.
Valendo Resp+ ^^