bom e bem simples vamos começar...
e assim e so abrir a pasta npcs do seu ot copiar um dos arquivos xml
renomeio colokandu issu ...... Papai Noel.xml
editio e cole issu
<?xml version="1.0"?><npc name="Papai Noel" script="data/npc/scripts/noel.lua" access="3"><look type="12" head="20" body="30" legs="40" feet="50"/></npc>
agora va nos scripts q esta dentro da pasta npc...
copie um arquivo lua q tem la renomeio com issu : noel.lua
agora editeo e cole issu:
focus = 0talk_start = 0target = 0following = falseattacking = falsefunction onThingMove(creature, thing, oldpos, oldstackpos)endfunction onCreatureAppear(creature)endfunction onCreatureDisappear(cid, pos)if focus == cid thenselfSay('######, nem fala xau.')focus = 0talk_start = 0endendfunction 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)if (msgcontains(msg, 'hi') and focus == 0) and getDistanceToCreature(cid) < 3 thenselfSay('HohOhoOho, Feliz Natal ' .. creatureGetName(cid) .. ', você quer seu presente?')focus = cidtalk_start = os.clock()elseif msgcontains(msg, 'hi') and (focus ~= cid) and getDistanceToCreature(cid) < 3 thenselfSay('Ja bou dar seu presente se acalma!')elseif focus == cid thentalk_start = os.clock()if msgcontains(msg, 'sim') or msgcontains(msg, 'presente') or msgcontains(msg, 'present') thenpresente = getPlayerStorageValue(cid,7913)present = math.random(1,350)if presente == -1 and present <= 40 thenbuy(cid,2674,15,0)selfSay('Feliz natal, aproveite bem seu presente!! HoHouhohuho')setPlayerStorageValue(cid,7913,1)elseif presente == -1 and present > 40 and present <= 80 thenbuy(cid,2675,10,0)selfSay('Feliz natal, aproveite bem seu presente!! HoHouhohuho')setPlayerStorageValue(cid,7913,1)elseif presente == -1 and present > 80 and present <= 120 thenbuy(cid,2687,30,0)selfSay('Feliz natal, aproveite bem seu presente!! HoHouhohuho')setPlayerStorageValue(cid,7913,1)elseif presente == -1 and present > 120 and present <= 160 thenbuy(cid,2688,7,0)selfSay('Feliz natal, aproveite bem seu presente!! HoHouhohuho')setPlayerStorageValue(cid,7913,1)elseif presente == -1 and present == 161 thenbuy(cid,2195,1,0)selfSay('Feliz natal, aproveite bem seu presente!! HoHouhohuho')setPlayerStorageValue(cid,7913,1)elseif presente == -1 and present > 161 and present <= 201 thenbuy(cid,2678,7,0)selfSay('Feliz natal, aproveite bem seu presente!! HoHouhohuho')setPlayerStorageValue(cid,7913,1)elseif presente == -1 and present > 201 and present <= 211 thenbuy(cid,2152,1,0)selfSay('Feliz natal, aproveite bem seu presente!! HoHouhohuho')setPlayerStorageValue(cid,7913,1)elseif presente == -1 and present > 211 and present <= 221 thenbuy(cid,2152,5,0)selfSay('Feliz natal, aproveite bem seu presente!! HoHouhohuho')setPlayerStorageValue(cid,7913,1)elseif presente == -1 and present > 221 and present <= 231 thenbuy(cid,2152,12,0)selfSay('Feliz natal, aproveite bem seu presente!! HoHouhohuho')setPlayerStorageValue(cid,7913,1)elseif presente == -1 and present > 231 and present <= 248 thenbuy(cid,2152,15,0)selfSay('Feliz natal, aproveite bem seu presente!! HoHouhohuho')setPlayerStorageValue(cid,7913,1)elseif presente == -1 and present > 249 and present <= 250 thenbuy(cid,2152,100,0)selfSay('Feliz natal, aproveite bem seu presente!! HoHouhohuho')setPlayerStorageValue(cid,7913,1)elseif presente == -1 and present == 249 thenbuy(cid,2152,100,0)selfSay('Feliz natal, aproveite bem seu presente!! HoHouhohuho')setPlayerStorageValue(cid,7913,1)elseif presente == -1 and present > 250 and present <= 260 thenbuy(cid,2183,1,0)selfSay('Feliz natal, aproveite bem seu presente!! HoHouhohuho')setPlayerStorageValue(cid,7913,1)elseif presente == -1 and present > 260 and present <= 280 thenbuy(cid,2187,100,0)selfSay('Feliz natal, aproveite bem seu presente!! HoHouhohuho')setPlayerStorageValue(cid,7913,1)elseif presente == -1 and present > 280 and present <= 320 thenbuy(cid,2352,50,0)selfSay('Feliz natal, aproveite bem seu presente!! HoHouhohuho')setPlayerStorageValue(cid,7913,1)elseif presente == -1 and present > 320 and present <= 322 thenbuy(cid,2487,1,0)selfSay('Feliz natal, aproveite bem seu presente!! HoHouhohuho')setPlayerStorageValue(cid,7913,1)elseif presente == -1 and present == 350 thenbuy(cid,2173,1,0)selfSay('Feliz natal, aproveite bem seu presente!! HoHouhohuho')setPlayerStorageValue(cid,7913,1)elseif presente == -1 and present > 322 and present <= 349 thenbuy(cid,2669,5,0)selfSay('Feliz natal, aproveite bem seu presente!! HoHouhohuho')setPlayerStorageValue(cid,7913,1)elseselfSay('Voce ja recebeu seu presente! so temos presentes sobe conta!')endelseif msgcontains(msg, '######') thenselfSay('/kick ' .. creatureGetName(cid) .. '')elseif string.find(msg, '(%a*)bye(%a*)') and getDistanceToCreature(cid) < 3 thenselfSay('Flw, ' .. creatureGetName(cid) .. '!')focus = 0talk_start = 0endendendfunction onCreatureChangeOutfit(creature)endfunction onThink()if (os.clock() - talk_start) > 30 then if focus > 0 then selfSay('Proximo plxx...') end focus = 0 end if focus ~= 0 then if getDistanceToCreature(focus) > 3 then selfSay('flw, mal educado.') focus = 0 end endend
agora bota seu ot on i de /s Papai noel
xD
ou se coloka ele no seu map editor!!!
byebye
se gostarem do meu npc estarei postandu mais alguns heheheh!!
poh genti comenta ai né... :confused: