Primeiro va na pasta do seu ot e va em data/npc/scripts
Copie e cole o seller como bloco de notas na mesma pasta so mudar o nome se vc quiser que o nome seja Vendedor se poe vendedor...ai vai estar assim:
Agora faca assim:
elseif msgcontains(msg, 'rope') and focus == cid then
buy(cid,2941,1,50)
talk_start = os.clock()
Ai vc quer vende crown armor vc vai la em rope e muda por crown armor e aonde ta buy(cid,2941,1,50) vc poe o ID da crown armor
para funcionar procure a frase:
E mude por
E assim vai =D
ai se vai mudando todos
Para por ele no mapa vc vai em
World/npc.xml
Abra-o como bloco de notas
Vai estar por exemplo assim:
Voce adiciona o seu tipo
<xml>
<npclist>
<npc>
<npc><npc>
<npc>
<npc>
<npc>
<npc>
<npc>
<npc>
<npc>
<npc>
<npc>
<npc>
<npc>
<npc>
<npc>
<npc>
<npc>
<npc>
<npc>
<npc>
<npc>
</npclist>
Creditos: GM Rotciv, eu
Fui, duvidas é so postar ai que eu respondo!
Copie e cole o seller como bloco de notas na mesma pasta so mudar o nome se vc quiser que o nome seja Vendedor se poe vendedor...ai vai estar assim:
focus = 0
talk_start = 0
target = 0
following = false
attacking = false
function onThingMove(creature, thing, oldpos, oldstackpos)
end
function onCreatureAppear(creature)
end
function onCreatureDisappear(cid, pos)
if focus == cid then
selfSay('Good bye then.')
focus = 0
talk_start = 0
end
end
function onCreatureTurn(creature)
end
function msgcontains(txt, str)
return (string.find(txt, str) and not string.find(txt, '(%w+)' .. str) and not string.find(txt, str .. '(%w+)'))
end
function onCreatureSay(cid, type, msg)
msg = string.lower(msg)
if ((string.find(msg, '(%a*)hi(%a*)')) and (focus == 0)) and getDistanceToCreature(cid) < 4 then
selfSay('Hello, ' .. creatureGetName(cid) .. '! I sell ropes (50gps), shovels (20gps), backpacks (10gps), manafluids (100gps), lifefluids (60gps) and fishing rods (100gps). I buy vials (10gps).')
focus = cid
talk_start = os.clock()
elseif string.find(msg, '(%a*)hi(%a*)') and (focus ~= cid) and getDistanceToCreature(cid) < 4 then
selfSay('Sorry, ' .. creatureGetName(cid) .. '! I talk to you in a minute.')
elseif msgcontains(msg, 'rope') and focus == cid then
buy(cid,2941,1,50)
talk_start = os.clock()
elseif msgcontains(msg, 'shovel') and focus == cid then
buy(cid,3395,1,20)
talk_start = os.clock()
elseif msgcontains(msg, 'backpack') and focus == cid then
buy(cid,2792,1,10)
talk_start = os.clock()
elseif msgcontains(msg, 'manafluid') or msgcontains(msg, 'mana fluid') and focus == cid then
buy(cid,2812,7,100)
talk_start = os.clock()
elseif msgcontains(msg, 'lifefluid') or msgcontains(msg, 'life fluid') and focus == cid then
buy(cid,2812,10,60)
talk_start = os.clock()
elseif msgcontains(msg, 'fishing rod') and focus == cid then
buy(cid,3421,1,100)
talk_start = os.clock()
elseif (msgcontains(msg, 'vial') or msgcontains(msg, 'flask')) and focus == cid then
sell(cid,2812,1,10)
talk_start = os.clock()
elseif string.find(msg, '(%a*)bye(%a*)') and focus == cid and getDistanceToCreature(cid) < 4 then
selfSay('Good bye, ' .. creatureGetName(cid) .. '!')
focus = 0
talk_start = 0
end
end
function onCreatureChangeOutfit(creature)
end
function onThink()
if (os.clock() - talk_start) > 30 then
if focus > 0 then
selfSay('Next Please...')
end
focus = 0
end
if focus ~= 0 then
if getDistanceToCreature(focus) > 5 then
selfSay('Good bye then.')
focus = 0
end
end
end
Agora faca assim:
elseif msgcontains(msg, 'rope') and focus == cid then
buy(cid,2941,1,50)
talk_start = os.clock()
Ai vc quer vende crown armor vc vai la em rope e muda por crown armor e aonde ta buy(cid,2941,1,50) vc poe o ID da crown armor
para funcionar procure a frase:
I sell ropes (50gps), shovels (20gps), backpacks (10gps), manafluids (100gps), lifefluids (60gps) and fishing rods (100gps). I buy vials (10gps).')
E mude por
I sell crown armor (10k), shovels (20gps), backpacks (10gps), manafluids (100gps), lifefluids (60gps) and fishing rods (100gps). I buy vials (10gps).')
E assim vai =D
ai se vai mudando todos
Para por ele no mapa vc vai em
World/npc.xml
Abra-o como bloco de notas
Vai estar por exemplo assim:
<?xml version="1.0"?>
<npclist>
<npc name="Seller" x="145" y="50" z="7" dir="3"/>
<npc name="Dark Rodo" x="129" y="50" z="6" dir="0"/>
<npc name="Mad" x="145" y="51" z="6" dir="3"/>
<npc name="Lector" x="127" y="49" z="7" dir="1"/>
<npc name="Perac" x="144" y="54" z="5" dir="0"/>
<npc name="Dufi" x="128" y="55" z="7" dir="1"/>
<npc name="Seller" x="208" y="80" z="7" dir="3"/>
<npc name="Dark Rodo" x="207" y="71" z="7" dir="2"/>
<npc name="Cody" x="129" y="30" z="7" dir="2"/>
<npc name="Pirate Jack" x="177" y="64" z="7" dir="1"/>
<npc name="Guild Master" x="129" y="51" z="5" dir="0"/>
<npc name="Obi" x="173" y="46" z="7" dir="1"/>
<npc name="Fargum" x="171" y="64" z="7" dir="1"/>
<npc name="Nimral" x="122" y="117" z="7" dir="3"/>
<npc name="Dagor" x="132" y="29" z="7" dir="2"/>
<npc name="Diamati" x="132" y="29" z="6" dir="2"/>
<npc name="Azemor" x="132" y="29" z="5" dir="2"/>
<npc name="Shanti" x="132" y="29" z="4" dir="2"/>
<npc name="Orlan" x="127" y="49" z="4" dir="1"/>
<npc name="The Oracle" x="96" y="207" z="6"/>
<npc name="Sally" x="74" y="220" z="7" dir="1"/>
</npclist>
Voce adiciona o seu tipo
<xml>
<npclist>
<npc>
<npc><npc>
<npc>
<npc>
<npc>
<npc>
<npc>
<npc>
<npc>
<npc>
<npc>
<npc>
<npc>
<npc>
<npc>
<npc>
<npc>
<npc>
<npc>
<npc>
<npc>
</npclist>
Creditos: GM Rotciv, eu
Fui, duvidas é so postar ai que eu respondo!