Primeiro va na pasta data/npc e copie qualquer npc de la.
Ai vc abre e coloca isso aki o:
<?xml version="1.0"?><npc name="Treinador" script="data/npc/scripts/treina.lua" access="3" lookdir="1"><health now="1000" max="1000"/><look type="128" head="78" body="71" legs="82" feet="114" corpse="3128"/></npc>
Ai vc feixa e renomeia o npc com o nome "Treinador.xml".
agora va na pasta data/npc/scripts e copie qualquer arquivo de la.Apage tudo e coloque o seguinte:
-- the id of the creature we are attacking, following, etc.focus = 0talk_start = 0target = 0following = falseattacking = falsefunction onThingMove(creature, thing, oldpos, oldstackpos)endfunction onCreatureAppear(creature)endfunction onCreatureDisappear(cid, pos) if focus == cid then selfSay('Good bye then.') focus = 0 talk_start = 0 endendfunction onCreatureTurn(creature)endfunction msgcontains(txt, str) return (string.find(txt, str) and not string.find(txt, '(%w+)' .. str) and not string.find(txt, str .. '(%w+)'))endfunction onCreatureSay(cid, type, msg) msg = string.lower(msg) if ((string.find(msg, '(%a*)hi(%a*)')) and (focus == 0)) and getDistanceToCreature(cid) < 4 then selfSay('Ola vendo Treiners para vc treinar. Cada um por 1k.') selfSay('Vc quer?') focus = cid talk_start = os.clock() endif string.find(msg, '(%a*)hi(%a*)') and (focus ~= cid) and getDistanceToCreature(cid) < 4 then selfSay('Desculpe, ' .. creatureGetName(cid) .. '! Te atendo agorinha') end if msgcontains(msg, 'yes') and focus == cid then buy(cid,3520,1,1000) selfSay('/m treiner') talk_start = os.clock() end if string.find(msg, '(%a*)bye(%a*)') and focus == cid and getDistanceToCreature(cid) < 4 then selfSay('Good bye, ' .. creatureGetName(cid) .. '!') focus = 0 talk_start = 0 endendfunction onCreatureChangeOutfit(creature)endfunction onThink() if (os.clock() - talk_start) > 30 then if focus > 0 then selfSay('Next Please...') end focus = 0 endif focus ~= 0 then if getDistanceToCreature(focus) > 5 then selfSay('Good bye then.') focus = 0 endendend
Fexe e depois renomei o arquivo e coloque o nome "treina.lua"
agora na na pasta data/world e abra o arquivo NPC.XML e coloque o seguinte:
<npc name="Treinador" x="100" y="100" z="7"/>
Agora va na pasta data/monster abre qualquer monstro com wordpad de la.Renomeie para "Treiner" salve-o Treiner.xml.Abra ele e apage tudo e coloque o seguinte:
<?xml version="1.0"?> <monster name="Monk Treinador" level="1" maglevel="20" experience="100" pushable="0" armor="40" defense="35" canpushitems="1" staticattack="50" changetarget="238"> <health now="100000" max="100000"/> <look type="57" head="20" body="30" legs="40" feet="50" corpse="4246"/> <combat targetdistance="1" runonhealth="0"/> <attacks> <attack type="melee" maxdamage="0"/> <attack type="instant" name="exura vita" exhaustion="500" cycleticks="3000" probability="5000"/> </attacks> <defenses> <!-- <defense immunity="poison"/> --> </defenses> <voices> <voice sentence="'Vem treina cmg seu [Palavrão Censurado], chega ae!!"/> </voices> <loot> <item id="2969" countmax="20" chance1="100000" chancemax="0"/> <item id="2753" chance="10000"/> <item id="3299" chance="10000"/> <item id="3489" chance="6666"/> <item id="2791" chance="100000"> <inside> <item id="2852" chance="6666"/> <item id="3538" countmax="3" chance1="20000" chancemax="0"/> <item id="3227" chance="3333"/> <item id="2988" chance="1428"/> </inside> </item> </loot> </monster>
Salve ,Fexe e esta pronto seu npc q vende treiner cada 1 por 1k.
Comentem!!!