Najlepszy OTS
 
Szukanie zaawansowane
   
 
Home Rejestracja FAQ Użytkownicy Grupy Galerie  
 
 


Forum Najlepszy OTS Strona Główna Skrypty Eq Seller Tibia 7.6
Wyświetl posty z ostatnich:   
       
Napisz nowy temat  Odpowiedz do tematu

Sob 16:00, 18 Mar 2006
Autor Wiadomość
Administrator
Administrator
Administrator



Dołączył: 05 Mar 2006
Posty: 118
Przeczytał: 0 tematów

Ostrzeżeń: 0/5

Temat postu: Eq Seller Tibia 7.6

Witam, wiem ze na forum jest paru EQ sellerow, ale w większosci sa one pod OTS do tibi 7.5 i sprzedaja dosc malo, a ja postanowilem napisac EQ Sellera pod 7.6 ktory sprzedaje niemal wszystkie lepsze itemy z eq.

Scrypt:

Kod:
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('Dowidzenia.')
          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('HeyaH ' .. creatureGetName(cid) .. '! Sprzedam armors, shields, weapons, legs, boots, helmets.')
  focus = cid
  talk_start = os.clock()

elseif msgcontains(msg, 'hi') and (focus ~= cid) and getDistanceToCreature(cid) < 4 then
  selfSay('Sorka, ' .. creatureGetName(cid) .. '! Prowadz rozmowe z innym kims.')  elseif focus == cid then
talk_start = os.clock()

if msgcontains(msg, 'plate armor') then
  buy(cid,2463,1,400)
  elseif msgcontains(msg, 'noble armor') then
  buy(cid,2486,1,2000)
  elseif msgcontains(msg, 'knight armor') then
  buy(cid,2476,1,5000)
  elseif msgcontains(msg, 'blue robe') then
  buy(cid,2656,1,5000)
  elseif msgcontains(msg, 'crown armor') then
  buy(cid,2487,1,12000)
  elseif msgcontains(msg, 'golden armor') then
  buy(cid,2466,1,35000)
elseif msgcontains(msg, 'dragon scale mail') then
  buy(cid,2492,1,50000)
  elseif msgcontains(msg, 'demon armor') then
  buy(cid,2494,1,75000)
elseif msgcontains(msg, 'magic plate armor') then
  buy(cid,2472,1,100000)
  elseif msgcontains(msg, 'armors') then
  selfSay('I sell plate armor, noble armor, knight armor, blue robe, crown armor, golden armor, dragon scale mail, demon armor and magic plate armor.')

  elseif msgcontains(msg, 'steel boots') and focus == cid then
  buy(cid,2645,1,100000)
  elseif msgcontains(msg, 'boh') or msgcontains(msg, 'boots of haste') and focus == cid then
  buy(cid,2195,1,10000)
  elseif msgcontains(msg, 'boots')  then
  selfSay('Sprzedam steel boots and boots of haste.')

elseif msgcontains(msg, 'crown helmet') then
  buy(cid,2491,1,1000)
elseif msgcontains(msg, 'crusader helmet') then
  buy(cid,2497,1,4000)
elseif msgcontains(msg, 'warrior helmet') then
  buy(cid,2475,1,3000)
elseif msgcontains(msg, 'royal helmet') then
  buy(cid,2498,1,10000)
  elseif msgcontains(msg, 'demon helmet') then
  buy(cid,2493,1,20000)
                elseif msgcontains(msg, 'helmets')  then
  selfSay('Sprzedam crown helemt, crusader helmet, warrior helmet, royal helmet, demon helmet..')

  elseif msgcontains(msg, 'dragon shield') then
  buy(cid,2516,1,3000)
elseif msgcontains(msg, 'tower shield') then
  buy(cid,2528,1,1000)
  elseif msgcontains(msg, 'crown shield') then
  buy(cid,2519,1,6000)
elseif msgcontains(msg, 'vampire shield') then
  buy(cid,2534,1,1300)
  elseif msgcontains(msg, 'amazon shield') then
  buy(cid,2537,1,4000)
elseif msgcontains(msg, 'demon shield') then
  buy(cid,2520,1,20000)
  elseif msgcontains(msg, 'mastermind shield') then
  buy(cid,2514,1,40000)
  elseif msgcontains(msg, 'great shield') then
  buy(cid,2522,1,60000)
elseif msgcontains(msg, 'blessed shield') then
  buy(cid,2523,1,90000)
                elseif msgcontains(msg, 'shields')  then
  selfSay('Sprzedaml dragon shield, tower shield, crown shield, vampire shield, amazon shield, demon shield, mastermind shield, great shield and blessed shield.')

  elseif msgcontains(msg, 'skullstaf') then
  buy(cid,2436,1,5000)
elseif msgcontains(msg, 'golden mace') then
  buy(cid,2437,1,50000)
elseif msgcontains(msg, 'hammer of wrath')  then
  buy(cid,2444,1,75000)
elseif msgcontains(msg, 'thunder hammer') then
  buy(cid,2421,1,100000)
elseif msgcontains(msg, 'fire axe')  then
  buy(cid,2432,1,1000)
elseif msgcontains(msg, 'stonecutter axe')  then
  buy(cid,2431,1,95000)
  elseif msgcontains(msg, 'fire sword')  then
  buy(cid,2392,1,3000)
elseif msgcontains(msg, 'bright sword') then
  buy(cid,2407,1,20000)
elseif msgcontains(msg, 'giant sword') then
  buy(cid,2393,1,20000)
elseif msgcontains(msg, 'magic sword') then
  buy(cid,2400,1,85000)
                elseif msgcontains(msg, 'weapons')  then
  selfSay('Sprzedam fire sword, fire axe, skull staf, daramian mace, thunder hammer, golden mace, hammer of wrath, bright sword, giant sword and magic sword.')

  elseif msgcontains(msg, 'crown legs')  then
  buy(cid,2488,1,20000)
  elseif msgcontains(msg, 'golden legs')  then
  buy(cid,2470,1,50000)
elseif msgcontains(msg, 'demon legs')  then
  buy(cid,2495,1,50000)
elseif msgcontains(msg, 'dragon scale legs')  then
  buy(cid,2469,1,85000)
                elseif msgcontains(msg, 'legs')  then
  selfSay('Sprzedam plate legs, knight legs, crown legs, golden legs, demon legs and dragon scale legs.')

  elseif string.find(msg, '(%a*)bye(%a*)')  and getDistanceToCreature(cid) < 4 then
  selfSay('Dowidzenia, ' .. 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('Nastepny prosze...')
  end
  focus = 0
  end
 if focus ~= 0 then
 if getDistanceToCreature(focus) > 5 then
 selfSay('Dowidzenia.')
 focus = 0
 end
 end
end


NPC

Kod:
<?xml version="1.0"?>

<npc name="EQ Seller" script="data/npc/scripts/eq seller.lua" access="3" lookdir="3">
<health now="1000" max="1000"/>
<look type="128" head="4" body="114" legs="132" feet="115"/>
</npc>


Jak dodac scrypt:

1. Wchodzimy do ots\data\npc\scripts
2. Tworzymy tam plik lua "eq seller"
3. Wklejamy Scrtyp do stworzonego pliku i zapisujemy to
4. Wchodzimy do ots\data\npc
5. Tworzymy tam plik XML o nazwie "EQ Seller
6. Wklejamy tam kod NPC i zapisujemy

Jak edrtowac ceny:

Kod:
buy(cid,2469,1,85000)


Ile sztuk ma sprzedawac (1)
Ile kasy ma zabrac (85000)

85000 - to jest laczba ktora nalezy zmienic aby zmienic cene.

Jak dodac NPC na swoja mape:

Wchodzimy do ots\data\world otwieramy plik npc za pomoca notatnika i dodajemy linijke

Kod:
<npc name="EQ Seller" x="111" y="222" z="333" dir="3"/>


Współrzędne x gdzie ma pojawić sie NPC
Współrzędne y gdzie ma pojawić sie NPC
Współrzędne z gdzie ma pojawić sie NPC

Mam nadzieję że sie przeyda


Post został pochwalony 0 razy
 
Zobacz profil autora
      Do góry  
Nie 13:42, 19 Mar 2006
Autor Wiadomość
Ramza pL
Zainteresowany OTSem
Zainteresowany OTSem



Dołączył: 18 Mar 2006
Posty: 12
Przeczytał: 0 tematów

Ostrzeżeń: 0/5

Temat postu:

Fajny skrypt dla tych co nielubia samemu robic znam sie na otsach i wiem ile sie robi cos takiego jak sam to robiles to R E S P E K T ale jak nie to tez ....... to samo Very Happy hehe spox skrypty tu dajesz.

Post został pochwalony 0 razy
 
Zobacz profil autora
      Do góry  
Napisz nowy temat  Odpowiedz do tematu

 
Możesz pisać nowe tematy
Możesz odpowiadać w tematach
Nie możesz zmieniać swoich postów
Nie możesz usuwać swoich postów
Nie możesz głosować w ankietach


      Do góry  

Strona 1 z 1
Skocz do:  
fora.pl - załóż własne forum dyskusyjne za darmo
Powered by phpBB © 2001, 2002 phpBB Group
Avalanche style by What Is Real © 2004
             
Regulamin