Rufux
Cantidad de envíos : 3 Fecha de inscripción : 26/06/2008
| Tema: ..::Npc Vendedor De Obsidian Knife Y Bws::.. Vie Jun 27, 2008 12:24 am | |
| El npc esta en español. Vamos a data/npc//. Copia cualquiera y borralo y cambiale el nombre a "Herramientas Addones". - Código:
-
<?xml version="1.0"?>
<npc name="Herramientras Addones" script="data/npc/scripts/tools.lua" access="5" lookdir="2" autowalk="1"> <mana now="800" max="800"/> <health now="200" max="200"/> <look type="134" head="0" body="132" legs="113" feet="112" addons="3"/> </npc>
Despoes ves a los scripts le cambiamos el nombre a "tools" - Código:
-
local focus = 0 local talk_start = 0 local target = 0 local following = false local attacking = false
function onThingMove(creature, thing, oldpos, oldstackpos)
end
function onCreatureAppear(creature)
end
function onCreatureDisappear(cid, pos) if focus == cid then selfSay('Nos vemos pues.') focus = 0 talk_start = 0 end end
function onCreatureTurn(creature)
end
function onCreatureSay(cid, type, msg) msg = string.lower(msg)
if (msgcontains(msg, 'hi') and (focus == 0)) and getDistanceToCreature(cid) < 4 then selfSay('Aventurero ' .. creatureGetName(cid) .. '. Yo tengo en mi poder una obsidian knife... Pareces interesado, deseas comprarla? (di obsidian knife) Tambien poseo una blessed wooden stake (di blessed wooden stake).') focus = cid talk_start = os.clock()
elseif msgcontains(msg, 'hi') and (focus ~= cid) and getDistanceToCreature(cid) < 4 then selfSay('Perdon, ' .. creatureGetName(cid) .. '! Perate un rato.')
elseif focus == cid then talk_start = os.clock()
if msgcontains(msg, 'blessed wooden stake') then buy(cid,5942,getCount(msg),10000)
elseif msgcontains(msg, 'obsidian knife') then buy(cid,5908,getCount(msg),10000)
elseif string.find(msg, '(%a*)bye(%a*)') and getDistanceToCreature(cid) < 4 then selfSay('Nos vemos, ' .. creatureGetName(cid) .. '!') focus = 0 talk_start = 0 end end end
function onCreatureChangeOutfit(creature)
end
function onThink() if (os.clock() - talk_start) > 30 then if focus > 0 then selfSay('Tardado, vete de aqui...') end focus = 0 end if focus ~= 0 then if getDistanceToCreature(focus) > 5 then selfSay('Nos vemos, pues.') focus = 0 end end end
| |
|
JoaQuiN7 Moderador
Cantidad de envíos : 17 Fecha de inscripción : 01/07/2008
| Tema: Re: ..::Npc Vendedor De Obsidian Knife Y Bws::.. Mar Jul 01, 2008 11:16 am | |
| | |
|