Ir para conteúdo

Npc De Armas


lucasbro

Posts Recomendados

Fonte : Tibia RL

 

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('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 (msgcontains(msg, 'hi') and (focus == 0)) and getDistanceToCreature(cid) < 4 then

selfSay('Hello ' .. creatureGetName(cid) .. '! I buy and sell swords, clubs and axes.')

focus = cid

talk_start = os.clock()

 

elseif msgcontains(msg, 'hi') and (focus ~= cid) and getDistanceToCreature(cid) < 4 then

selfSay('Sorry, ' .. creatureGetName(cid) .. '! I talk to you in a minute.')

 

elseif focus == cid then

talk_start = os.clock()

 

 

------------------------------ falas

 

if msgcontains(msg, 'swords') then

selfSay('Daggers, Rapiers, Short Swords, Sabres, Machetes, Carlin swords, Swords, Katanas, Longswords, Poison Daggers, Spike Swords and Two-Handed Swords.')

 

elseif msgcontains(msg, 'clubs') then

selfSay('Crowbars, Clubs, Scythes, Staffs, Maces, Battle Hammers, Morning Stars, Clerical Mace and War Hammers.')

 

elseif msgcontains(msg, 'axes') then

selfSay('Hand Axes, Axes, Hatchets, Battle Axes, Barbarian Axes, Double Axes and Halberds.')

 

------------------------------ Swords

 

elseif msgcontains(msg, 'sell dagger') then

selfSay('Do you want to sell a dagger for 2 gold?')

talk_state = 1

 

elseif msgcontains(msg, 'buy dagger') then

selfSay('Do you want to buy a dagger for 5 gold?')

talk_state = 2

 

elseif msgcontains(msg, 'sell rapier') then

selfSay('Do you want to sell a rapier for 5 gold?')

talk_state = 3

 

elseif msgcontains(msg, 'buy rapier') then

selfSay('Do you want to buy a rapier for 15 gold?')

talk_state = 4

 

elseif msgcontains(msg, 'sell short sword') then

selfSay('Do you want to sell a short sword for 10 gold?')

talk_state = 5

 

elseif msgcontains(msg, 'sell sabre') then

selfSay('Do you want to sell a sabre for 12 gold?')

talk_state = 6

 

elseif msgcontains(msg, 'buy sabre') then

selfSay('Do you want to buy a sabre for 35 gold?')

talk_state = 7

 

elseif msgcontains(msg, 'buy machete') then

selfSay('Do you want to buy a machete for 35 gold?')

talk_state = 8

 

elseif msgcontains(msg, 'buy carlin sword') then

selfSay('Do you want to buy a carlin sword for 473 gold?')

talk_state = 9

 

elseif msgcontains(msg, 'sell carlin sword') then

selfSay('Do you want to sell a carlin sword for 118 gold?')

talk_state = 10

 

elseif msgcontains(msg, 'sell sword') then

selfSay('Do you want to sell a sword for 25 gold?')

talk_state = 11

 

elseif msgcontains(msg, 'buy sword') then

selfSay('Do you want to buy a sword for 85 gold?')

talk_state = 12

 

elseif msgcontains(msg, 'sell katana') then

selfSay('Do you want to sell a katana for 8 gold?')

talk_state = 13

 

elseif msgcontains(msg, 'sell long sword') or msgcontains (msg, 'sell longsword') then

selfSay('Do you want to sell a longsword for 51 gold?')

talk_state = 14

 

elseif msgcontains(msg, 'buy long sword') or msgcontains (msg, 'buy longsword') then

selfSay('Do you want to buy a longesword for 160 gold?')

talk_state = 15

 

elseif msgcontains(msg, 'sell poison dagger') then

selfSay('Do you want to sell a poison agger for 1 gold?')

talk_state = 16

 

elseif msgcontains(msg, 'sell spike sword') then

selfSay('Do you want to sell a spike sword for 240 gold?')

talk_state = 17

 

elseif msgcontains(msg, 'sell two handed sword') then

selfSay('Do you want to sell a two handed sword for 450 gold?')

talk_state = 18

 

elseif msgcontains(msg, 'buy two handed sword') then

selfSay('Do you want to buy a two handed sword for 950 gold?')

talk_state = 19

 

------------------------------ Clubs

 

elseif msgcontains(msg, 'sell crowbar') then

selfSay('Do you want to sell a crowbar for 50 gold?')

talk_state = 20

 

elseif msgcontains(msg, 'buy crowbar') then

selfSay('Do you want to buy a crowbar for 260 gold?')

talk_state = 21

 

elseif msgcontains(msg, 'sell club') then

selfSay('Do you want to sell a club for 1 gold?')

talk_state = 22

 

elseif msgcontains(msg, 'buy club') then

selfSay('Do you want to buy a club for 5 gold?')

talk_state = 23

 

elseif msgcontains(msg, 'sell scythe') then

selfSay('Do you want to sell a scythe for 15 gold?')

talk_state = 24

 

elseif msgcontains(msg, 'buy scythe') then

selfSay('Do you want to buy a scythe for 50 gold?')

talk_state = 25

 

elseif msgcontains(msg, 'buy staff') then

selfSay('Do you want to buy a staff for 40 gold?')

talk_state = 26

 

elseif msgcontains(msg, 'buy mace') then

selfSay('Do you want to buy a mace for 90 gold?')

talk_state = 27

 

elseif msgcontains(msg, 'sell mace') then

selfSay('Do you want to sell a mace for 30 gold?')

talk_state = 28

 

elseif msgcontains(msg, 'buy battle hammer') then

selfSay('Do you want to buy a battle hammer for 350 gold?')

talk_state = 29

 

elseif msgcontains(msg, 'sell battle hammer') then

selfSay('Do you want to sell a battle hammer for 120 gold?')

talk_state = 30

 

elseif msgcontains(msg, 'sell morning star') then

selfSay('Do you want to sell a morning star for 100 gold?')

talk_state = 31

 

elseif msgcontains(msg, 'buy morning star') then

selfSay('Do you want to buy a morning star for 430 gold?')

talk_state = 32

 

elseif msgcontains(msg, 'buy clerical mace') then

selfSay('Do you want to buy a clerical mace for 540 gold?')

talk_state = 33

 

elseif msgcontains(msg, 'sell clerical mace') then

selfSay('Do you want to sell a clerical mace for 170 gold?')

talk_state = 34

 

elseif msgcontains(msg, 'sell war hammer') then

selfSay('Do you want to sell a dagger for 470 gold?')

talk_state = 35

 

------------------------------ Axes

 

elseif msgcontains(msg, 'sell hand axe') then

selfSay('Do you want to sell a hand axe for 4 gold?')

talk_state = 36

 

elseif msgcontains(msg, 'buy hand axe') then

selfSay('Do you want to buy a hand axe for 8 gold?')

talk_state = 37

 

elseif msgcontains(msg, 'sell axe') then

selfSay('Do you want to sell an axe for 7 gold?')

talk_state = 38

 

elseif msgcontains(msg, 'buy axe') then

selfSay('Do you want to buy an axe for 20 gold?')

talk_state = 39

 

elseif msgcontains(msg, 'sell hatchet') then

selfSay('Do you want to sell a hatchet for 25 gold?')

talk_state = 40

 

elseif msgcontains(msg, 'sell battle axe') then

selfSay('Do you want to sell a battle axe for 80 gold?')

talk_state = 41

 

elseif msgcontains(msg, 'buy battle axe') then

selfSay('Do you want to buy a battle axe for 235 gold?')

talk_state = 42

 

elseif msgcontains(msg, 'buy barbarian axe') then

selfSay('Do you want to buy a barbarian axe for 590 gold?')

talk_state = 43

 

elseif msgcontains(msg, 'sell barbarian axe') then

selfSay('Do you want to sell a barbarian axe for 185 gold?')

talk_state = 44

 

elseif msgcontains(msg, 'sell double axe') then

selfSay('Do you want to sell a double axe for 260 gold?')

talk_state = 45

 

elseif msgcontains(msg, 'sell halberd') then

selfSay('Do you want to sell a halberd for 400 gold?')

talk_state = 46

 

----------------------------- Confirmação Swords

 

elseif talk_state == 1 then

if msgcontains(msg, 'yes') then

itemstatus = doPlayerRemoveItem(cid,2379,1)

if itemstatus == 0 then

selfSay('Sorry, you not have items.')

else

doPlayerAddItem(cid,2148,2)

selfSay('Thanks for items.')

end

end

talk_state = 0

 

elseif talk_state == 2 then

if msgcontains(msg, 'yes') then

itemstatus = doPlayerAddItem(cid,2379,1)

if itemstatus == 0 then

selfSay('Sorry, you not have items.')

else

doPlayerRemoveItem(cid,2148,5)

selfSay('Thanks for items.')

end

end

talk_state = 0

 

elseif talk_state == 3 then

if msgcontains(msg, 'yes') then

itemstatus = doPlayerRemoveItem(cid,2384,1)

if itemstatus == 0 then

selfSay('Sorry, you not have items.')

else

doPlayerAddItem(cid,2148,5)

selfSay('Thanks for items.')

end

end

talk_state = 0

 

elseif talk_state == 4 then

if msgcontains(msg, 'yes') then

itemstatus = doPlayerAddItem(cid,2384,1)

if itemstatus == 0 then

selfSay('Sorry, you not have items.')

else

doPlayerRemoveItem(cid,2148,15)

selfSay('Thanks for items.')

end

end

talk_state = 0

 

elseif talk_state == 5 then

if msgcontains(msg, 'yes') then

itemstatus = doPlayerRemoveItem(cid,2406,1)

if itemstatus == 0 then

selfSay('Sorry, you not have items.')

else

doPlayerAddItem(cid,2148,10)

selfSay('Thanks for items.')

end

end

talk_state = 0

 

elseif talk_state == 6 then

if msgcontains(msg, 'yes') then

itemstatus = doPlayerRemoveItem(cid,2385,1)

if itemstatus == 0 then

selfSay('Sorry, you not have items.')

else

doPlayerAddItem(cid,2148,12)

selfSay('Thanks for items.')

end

end

talk_state = 0

 

elseif talk_state == 7 then

if msgcontains(msg, 'yes') then

itemstatus = doPlayerAddItem(cid,2385,1)

if itemstatus == 0 then

selfSay('Sorry, you not have items.')

else

doPlayerRemoveItem(cid,2148,35)

selfSay('Thanks for items.')

end

end

talk_state = 0

 

elseif talk_state == 8 then

if msgcontains(msg, 'yes') then

itemstatus = doPlayerAddItem(cid,2420,1)

if itemstatus == 0 then

selfSay('Sorry, you not have items.')

else

doPlayerRemoveItem(cid,2148,35)

selfSay('Thanks for items.')

end

end

talk_state = 0

 

elseif talk_state == 9 then

if msgcontains(msg, 'yes') then

itemstatus = doPlayerAddItem(cid,2395,1)

if itemstatus == 0 then

selfSay('Sorry, you not have items.')

else

doPlayerRemoveItem(cid,2152,4)

doPlayerRemoveItem(cid,2148,73)

selfSay('Thanks for items.')

end

end

talk_state = 0

 

elseif talk_state == 10 then

if msgcontains(msg, 'yes') then

itemstatus = doPlayerRemoveItem(cid,2395,1)

if itemstatus == 0 then

selfSay('Sorry, you not have items.')

else

doPlayerAddItem(cid,2148,18)

doPlayerAddItem(cid,2152,1)

selfSay('Thanks for items.')

end

end

talk_state = 0

 

elseif talk_state == 11 then

if msgcontains(msg, 'yes') then

itemstatus = doPlayerRemoveItem(cid,2376,1)

if itemstatus == 0 then

selfSay('Sorry, you not have items.')

else

doPlayerAddItem(cid,2148,25)

selfSay('Thanks for items.')

end

end

talk_state = 0

 

elseif talk_state == 12 then

if msgcontains(msg, 'yes') then

itemstatus = doPlayerAddItem(cid,2376,1)

if itemstatus == 0 then

selfSay('Sorry, you not have items.')

else

doPlayerRemoveItem(cid,2148,85)

selfSay('Thanks for items.')

end

end

talk_state = 0

 

elseif talk_state == 13 then

if msgcontains(msg, 'yes') then

itemstatus = doPlayerRemoveItem(cid,2412,1)

if itemstatus == 0 then

selfSay('Sorry, you not have items.')

else

doPlayerAddItem(cid,2148,8)

selfSay('Thanks for items.')

end

end

talk_state = 0

 

elseif talk_state == 14 then

if msgcontains(msg, 'yes') then

itemstatus = doPlayerRemoveItem(cid,2397,1)

if itemstatus == 0 then

selfSay('Sorry, you not have items.')

else

doPlayerAddItem(cid,2148,51)

selfSay('Thanks for items.')

end

end

talk_state = 0

 

elseif talk_state == 15 then

if msgcontains(msg, 'yes') then

itemstatus = doPlayerAddItem(cid,2397,1)

if itemstatus == 0 then

selfSay('Sorry, you not have items.')

else

doPlayerRemoveItem(cid,2148,60)

doPlayerRemoveItem(cid,2152,1)

selfSay('Thanks for items.')

end

end

talk_state = 0

 

elseif talk_state == 16 then

if msgcontains(msg, 'yes') then

itemstatus = doPlayerRemoveItem(cid,2411,1)

if itemstatus == 0 then

selfSay('Sorry, you not have items.')

else

doPlayerAddItem(cid,2148,1)

selfSay('Thanks for items.')

end

end

talk_state = 0

 

elseif talk_state == 17 then

if msgcontains(msg, 'yes') then

itemstatus = doPlayerRemoveItem(cid,2383,1)

if itemstatus == 0 then

selfSay('Sorry, you not have items.')

else

doPlayerAddItem(cid,2148,40)

doPlayerAddItem(cid,2152,2)

selfSay('Thanks for items.')

end

end

talk_state = 0

 

elseif talk_state == 18 then

if msgcontains(msg, 'yes') then

itemstatus = doPlayerRemoveItem(cid,2377,1)

if itemstatus == 0 then

selfSay('Sorry, you not have items.')

else

doPlayerAddItem(cid,2148,50)

doPlayerAddItem(cid,2152,4)

selfSay('Thanks for items.')

end

end

talk_state = 0

 

elseif talk_state == 19 then

if msgcontains(msg, 'yes') then

itemstatus = doPlayerAddItem(cid,2377,1)

if itemstatus == 0 then

selfSay('Sorry, you not have items.')

else

doPlayerRemoveItem(cid,2148,50)

doPlayerRemoveItem(cid,2152,9)

selfSay('Thanks for this item.')

end

end

talk_state = 0

 

----------------------------- Confirmação Clubs

 

elseif talk_state == 20 then

if msgcontains(msg, 'yes') then

itemstatus = doPlayerRemoveItem(cid,2416,1)

if itemstatus == 0 then

selfSay('Sorry, you not have items.')

else

doPlayerAddItem(cid,2148,50)

selfSay('Thanks for this item.')

end

end

talk_state = 0

 

elseif talk_state == 21 then

if msgcontains(msg, 'yes') then

itemstatus = doPlayerAddItem(cid,2416,1)

if itemstatus == 0 then

selfSay('Sorry, you not have items.')

else

doPlayerRemoveItem(cid,2148,60)

doPlayerRemoveItem(cid,2152,2)

selfSay('Thanks for this item.')

end

end

talk_state = 0

 

elseif talk_state == 22 then

if msgcontains(msg, 'yes') then

itemstatus = doPlayerRemoveItem(cid,2382,1)

if itemstatus == 0 then

selfSay('Sorry, you not have items.')

else

doPlayerAddItem(cid,2148,1)

selfSay('Thanks for this item.')

end

end

talk_state = 0

 

elseif talk_state == 23 then

if msgcontains(msg, 'yes') then

itemstatus = doPlayerAddItem(cid,2382,1)

if itemstatus == 0 then

selfSay('Sorry, you not have items.')

else

doPlayerRemoveItem(cid,2148,5)

selfSay('Thanks for this item.')

end

end

talk_state = 0

 

elseif talk_state == 24 then

if msgcontains(msg, 'yes') then

itemstatus = doPlayerRemoveItem(cid,2550,1)

if itemstatus == 0 then

selfSay('Sorry, you not have items.')

else

doPlayerAddItem(cid,2148,15)

selfSay('Thanks for this item.')

end

end

talk_state = 0

 

elseif talk_state == 25 then

if msgcontains(msg, 'yes') then

itemstatus = doPlayerAddItem(cid,2550,1)

if itemstatus == 0 then

selfSay('Sorry, you not have items.')

else

doPlayerRemoveItem(cid,2148,50)

selfSay('Thanks for items.')

end

end

talk_state = 0

 

elseif talk_state == 26 then

if msgcontains(msg, 'yes') then

itemstatus = doPlayerAddItem(cid,2401,1)

if itemstatus == 0 then

selfSay('Sorry, you not have items.')

else

doPlayerRemoveItem(cid,2148,40)

selfSay('Thanks for items.')

end

end

talk_state = 0

 

elseif talk_state == 27 then

if msgcontains(msg, 'yes') then

itemstatus = doPlayerAddItem(cid,2398,1)

if itemstatus == 0 then

selfSay('Sorry, you not have items.')

else

doPlayerRemoveItem(cid,2148,90)

selfSay('Thanks for items.')

end

end

talk_state = 0

 

elseif talk_state == 28 then

if msgcontains(msg, 'yes') then

itemstatus = doPlayerRemoveItem(cid,2398,1)

if itemstatus == 0 then

selfSay('Sorry, you not have items.')

else

doPlayerAddItem(cid,2148,30)

selfSay('Thanks for items.')

end

end

talk_state = 0

 

elseif talk_state == 29 then

if msgcontains(msg, 'yes') then

itemstatus = doPlayerAddItem(cid,2417,1)

if itemstatus == 0 then

selfSay('Sorry, you not have items.')

else

doPlayerRemoveItem(cid,2148,50)

doPlayerRemoveItem(cid,2152,3)

selfSay('Thanks for items.')

end

end

talk_state = 0

 

elseif talk_state == 30 then

if msgcontains(msg, 'yes') then

itemstatus = doPlayerRemoveItem(cid,2417,1)

if itemstatus == 0 then

selfSay('Sorry, you not have items.')

else

doPlayerAddItem(cid,2148,20)

doPlayerAddItem(cid,2152,1)

selfSay('Thanks for items.')

end

end

talk_state = 0

 

elseif talk_state == 31 then

if msgcontains(msg, 'yes') then

itemstatus = doPlayerRemoveItem(cid,2394,1)

if itemstatus == 0 then

selfSay('Sorry, you not have items.')

else

doPlayerAddItem(cid,2152,1)

selfSay('Thanks for items.')

end

end

talk_state = 0

 

elseif talk_state == 32 then

if msgcontains(msg, 'yes') then

itemstatus = doPlayerAddItem(cid,2394,1)

if itemstatus == 0 then

selfSay('Sorry, you not have items.')

else

doPlayerRemoveItem(cid,2148,30)

doPlayerRemoveItem(cid,2152,4)

selfSay('Thanks for items.')

end

end

talk_state = 0

 

elseif talk_state == 33 then

if msgcontains(msg, 'yes') then

itemstatus = doPlayerAddItem(cid,2423,1)

if itemstatus == 0 then

selfSay('Sorry, you not have items.')

else

doPlayerRemoveItem(cid,2148,40)

doPlayerRemoveItem(cid,2152,5)

selfSay('Thanks for items.')

end

end

talk_state = 0

 

elseif talk_state == 34 then

if msgcontains(msg, 'yes') then

itemstatus = doPlayerRemoveItem(cid,2423,1)

if itemstatus == 0 then

selfSay('Sorry, you not have items.')

else

doPlayerAddItem(cid,2148,70)

doPlayerAddItem(cid,2152,1)

selfSay('Thanks for items.')

end

end

talk_state = 0

 

elseif talk_state == 35 then

if msgcontains(msg, 'yes') then

itemstatus = doPlayerRemoveItem(cid,2391,1)

if itemstatus == 0 then

selfSay('Sorry, you not have items.')

else

doPlayerAddItem(cid,2148,70)

doPlayerAddItem(cid,2152,4)

selfSay('Thanks for items.')

end

end

talk_state = 0

 

----------------------------- Confirmação Axes

 

elseif talk_state == 36 then

if msgcontains(msg, 'yes') then

itemstatus = doPlayerRemoveItem(cid,2380,1)

if itemstatus == 0 then

selfSay('Sorry, you not have items.')

else

doPlayerAddItem(cid,2148,4)

selfSay('Thanks for items.')

end

end

talk_state = 0

 

elseif talk_state == 37 then

if msgcontains(msg, 'yes') then

itemstatus = doPlayerAddItem(cid,2380,1)

if itemstatus == 0 then

selfSay('Sorry, you not have items.')

else

doPlayerRemoveItem(cid,2148,8)

selfSay('Thanks for items.')

end

end

talk_state = 0

 

elseif talk_state == 38 then

if msgcontains(msg, 'yes') then

itemstatus = doPlayerRemoveItem(cid,2386,1)

if itemstatus == 0 then

selfSay('Sorry, you not have items.')

else

doPlayerAddItem(cid,2148,7)

selfSay('Thanks for items.')

end

end

talk_state = 0

 

elseif talk_state == 39 then

if msgcontains(msg, 'yes') then

itemstatus = doPlayerAddItem(cid,2386,1)

if itemstatus == 0 then

selfSay('Sorry, you not have items.')

else

doPlayerRemoveItem(cid,2148,20)

selfSay('Thanks for items.')

end

end

talk_state = 0

 

elseif talk_state == 40 then

if msgcontains(msg, 'yes') then

itemstatus = doPlayerRemoveItem(cid,2388,1)

if itemstatus == 0 then

selfSay('Sorry, you not have items.')

else

doPlayerAddItem(cid,2148,25)

selfSay('Thanks for items.')

end

end

talk_state = 0

 

elseif talk_state == 41 then

if msgcontains(msg, 'yes') then

itemstatus = doPlayerRemoveItem(cid,2378,1)

if itemstatus == 0 then

selfSay('Sorry, you not have items.')

else

doPlayerAddItem(cid,2148,80)

selfSay('Thanks for items.')

end

end

talk_state = 0

 

elseif talk_state == 42 then

if msgcontains(msg, 'yes') then

itemstatus = doPlayerAddItem(cid,2378,1)

if itemstatus == 0 then

selfSay('Sorry, you not have items.')

else

doPlayerRemoveItem(cid,2148,35)

doPlayerRemoveItem(cid,2152,2)

selfSay('Thanks for items.')

end

end

talk_state = 0

 

elseif talk_state == 43 then

if msgcontains(msg, 'yes') then

itemstatus = doPlayerAddItem(cid,2429,1)

if itemstatus == 0 then

selfSay('Sorry, you not have items.')

else

doPlayerRemoveItem(cid,2148,90)

doPlayerRemoveItem(cid,2152,5)

selfSay('Thanks for money.')

end

end

talk_state = 0

 

elseif talk_state == 44 then

if msgcontains(msg, 'yes') then

itemstatus = doPlayerRemoveItem(cid,2429,1)

if itemstatus == 0 then

selfSay('Sorry, you not have items.')

else

doPlayerAddItem(cid,2148,85)

doPlayerAddItem(cid,2152,1)

selfSay('Thanks for this item.')

end

end

talk_state = 0

 

elseif talk_state == 45 then

if msgcontains(msg, 'yes') then

itemstatus = doPlayerRemoveItem(cid,2387,1)

if itemstatus == 0 then

selfSay('Sorry, you not have items.')

else

doPlayerAddItem(cid,2148,60)

doPlayerAddItem(cid,2152,2)

selfSay('Thanks for this item.')

end

end

talk_state = 0

 

elseif talk_state == 46 then

if msgcontains(msg, 'yes') then

itemstatus = doPlayerRemoveItem(cid,2381,1)

if itemstatus == 0 then

selfSay('Sorry, you not have items.')

else

doPlayerAddItem(cid,2152,4)

selfSay('Thanks for this item.')

end

end

talk_state = 0

 

 

elseif string.find(msg, '(%a*)bye(%a*)') and getDistanceToCreature(cid) < 4 then

selfSay('Good bye, ' .. 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('Next Please...')

end

focus = 0

end

if focus ~= 0 then

if getDistanceToCreature(focus) > 5 then

selfSay('Good bye then.')

focus = 0

end

end

end

 

Créditos: LuNaTiC (eu)

Editado por lucasbro
Link para o comentário
Compartilhar em outros sites

lolz como assim Tibia RL?? esse pc vende que armas?

 

@dekoww

Você tenha atenção ao que escreve. Escreveu "esse pc vende armas?

 

@tópico

Parece bom. Mas foi mesmo você que fez??? Não há problema se postar: "Créditos 80%: por ter feito, Créditos 20%: a mim por ter trazido para o Xtibia.

De qualquer maneira está bom, mas falta uma coisa.

Link para o comentário
Compartilhar em outros sites

Seu tópico tá edited cara.

Você emendou :p

E já agora o meu nao ta edited!!!

 

Lol voce que editou e olha isso "seu tópico tá edited cara" sehauehasuehaue vc quer post naum tópico naum eh?!

#Edit

Tamo fazenu coisa errada...tamo discutino no tópico do kara... parei!

Editado por Dekoo Sorcerer xD
Link para o comentário
Compartilhar em outros sites

@tópico

Parece bom. Mas foi mesmo você que fez??? Não há problema se postar: "Créditos 80%: por ter feito, Créditos 20%: a mim por ter trazido para o Xtibia.

De qualquer maneira está bom, mas falta uma coisa.

 

lol, só porque eu tenho poucos posts vocês pensam isso?

Se eu fosse famoso geral ia falar muito bom e talz...

Para sua informação sou Scripter a 4 anos, e sei muitas coisas que muitos que acham que sabem fazer um NPC e talz.

Fiquei uma hora no site, pegando as fontes dos itens, ele tem uma Fonte que no caso o XTibia proibe que eu coloque o nome dela aqui...

E falando, fui eu que fiz sim, todinho, eu ja fiz o de armadura, mais ainda não atualizei para ele falar "sell chain armor" "yes", só está "sell chain armor", então já que o script de armaduras é bem maior, só atualizei o de Armas, então para todos que acham que eu não fiz, acho uma tremenda babaquice!

 

OBS: Não estou querendo te ofender, só acho que você tem preconceito para os novos no fórum, sendo que tem forúm muito mais famosos sobre otserver do que o XTibia!

Link para o comentário
Compartilhar em outros sites

  • 2 weeks later...

Para sua informação sou Scripter a 4 anos

Você tem 12 anos

Você diz que é scripter ha (com H) 4 anos

 

Você tinha 8 anos quando começou ???

 

nessa aula de matemática eu não faltei

12 - 4 = 8

 

Ps.: Se eu tiver 20 itens vou ter que "sell" 20 vezes...

tem como "ler" o número de itens que tá sendo vendido

(sell 20 item) -> tem como ler esse 20

 

acerta isso que o NPC vai ficar muito bom.

Parabéns.

Editado por Conde Sapo
Link para o comentário
Compartilhar em outros sites

Sim, comecei com 8 anos sim!

 

Sobre o NPC eu fiz pro ServFull, que nele não tem a configuração de getcount(msg), eu fiz postei desse jeito, mais o original pode vender ate 20 itens juntos!

Link para o comentário
Compartilhar em outros sites

  • 2 weeks later...
×
×
  • Criar Novo...