[8.0][NPC]Santa Claus

 
Tibia.net.pl

Wróć   Tibia.net.pl > OpenTibia > Skrypty Lua & XML > NPC

#2 event Tibia.net.pl: Kończymy rozgrzewkę! (Start - Sobota, godz. 17:00) Big meeting (22 listopada, Poznań)


  Tibia.net.pl (#?)
[8.0][NPC]Santa Claus

Dyskusja dotycząca tematu [8.0][NPC]Santa Claus, który znajduje się w kategorii Skrypty Lua & XML (Znajdują się tutaj potwory, NPC, itd. Publikacja tylko GOTOWYCH skryptów!), na forum NPC (). Treść: Oto skrypt świętego Mikołaja.(Skrypt z hunted.pl/forum/showthread.php?t=696,pisany przez Komóra) Ja gotylko testowałem pod 8.0 i działa. Aby dostac prezent należy wpisać : ...


Odpowiedz
 
01-09-2008, 17:42  
Początkujący
 
Użytkownik BladeS na Tibia.net.pl

[8.0][NPC]Santa Claus


Oto skrypt świętego Mikołaja.(Skrypt z hunted.pl/forum/showthread.php?t=696,pisany przez Komóra)
Ja gotylko testowałem pod 8.0 i działa.
Aby dostac prezent należy wpisać :
Cytat:
Hi
Present
yes
Bye
W npc tworzymy plik o nazwie Santa Claus.xml
i wklejamy tam :
Kod:
<?xml version="1.0"?>
<npc name="Santa Claus" script="data/npc/scripts/santa.lua" access="3" lookdir="160" autowalk="25">
	<mana now="800" max="800"/>
	<health now="200" max="200"/>
<look type="160" head="0" body="94" legs="0" feet="94"/>
</npc>
teraz w scripts tworzymy plik santa.lua i wklejamy tam :
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('Merry Christmas!') 
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('Merry Christmas ' .. creatureGetName(cid) .. '!') 
focus = cid 
talk_start = os.clock() 
end 
if string.find(msg, '(%a*)hi(%a*)') and (focus ~= cid) and getDistanceToCreature(cid) < 4 then 
selfSay('Sorry, ' .. creatureGetName(cid) .. '! Please wait.') 
end 
if string.find(msg, '(%a*)present(%a*)') and focus == cid and getDistanceToCreature(cid) < 4 then 
present = getPlayerStorageValue(cid,1210) 
if present == -1 then 
buy(cid,item,1,0) 
setPlayerStorageValue(cid,1210,1) 
end 
if present == 1 then 
selfSay('Sorry, I dont have more presents for you.') 
end 
end 
if 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('Merry Christmas!') 
end 
focus = 0 
end 
if focus ~= 0 then 
if getDistanceToCreature(focus) > 3 then 
selfSay('Merry Christmas!') 
focus = 0 
end 
end 
if focus == 0 then 
cx, cy, cz = selfGetPosition() 
randmove = math.random(1,25) 
if randmove == 1 then 
nx = cx + 1 
end 
if randmove == 2 then 
nx = cx - 1 
end 
if randmove == 3 then 
ny = cy + 1 
end 
if randmove == 4 then 
ny = cy - 1 
end 
if randmove >= 5 then 
nx = cx 
ny = cy 
end 
moveToPosition(nx, ny, cz) 
--summons = 30 
--summons2 = 30 
end 
if focus > 0 then 
rand = math.random(1,8) 
if rand == 1 then 
item = 2195
elseif rand == 2 then 
item = 2130
elseif rand == 3 then 
item = 2173
elseif rand == 4 then 
item = 2160
elseif rand == 5 then 
item = 2452
elseif rand == 6 then 
item = 2453
elseif rand == 7 then 
item = 2349
else 
item = 2353
end 
end 
if focus == 0 then 
randsay = math.random(1,80) 
if randsay == 1 then 
selfSay('Hmmhmm...') 
end 
if randsay == 2 then 
selfSay('Hooooly Shit...') 
end 
if randsay == 3 then 
selfSay('Hoho...') 
end 
end 
end
 


01-09-2008, 18:05  
Początkujący
 
Użytkownik Mangel na Tibia.net.pl

Odp: [8.0]Santa Claus


Dał byś może zdjęcie jak on wygląda?Nie każdy może zna ten kod:
Kod:
<look type="160" head="0" body="94" legs="0" feet="94"/>
.
A może dał byś cytat co mówić do Mikołaja aby dał ci prezent?
Zapewne: hi,present,yes? Mam rację?.

@edit
O już nie grałem 2 lata w tibię i jeszcze nie zapomniałem kodów Rox^^
 
01-09-2008, 18:39  
Fanatyk
 
Użytkownik lolakr na Tibia.net.pl

Odp: [8.0]Santa Claus


ciekawy skrypt na pewno skorzystam zrobię święta na moim otsie będzie zabawa no i dzięki
 
01-09-2008, 18:42  
Legenda
 
Użytkownik Przemek na Tibia.net.pl

Odp: [8.0]Santa Claus


Skrypt powinien jeszcze zawierać : link do orginalnego tematu, autora i objaśnienie ;s Masz 1 dzień na uzupełnienie
 
06-09-2008, 11:40  
Gaduła
 
Użytkownik adus41 na Tibia.net.pl

Odp: [8.0]Santa Claus


Dzięki mi sie to przydało.THX dla ciebie,nie musiałem szukać xD
 
14-10-2008, 16:56  
Bywalec
 
Użytkownik Marcin24 na Tibia.net.pl

Odp: [8.0][NPC]Santa Claus


pod 8.1 też działa
 


Odpowiedz

Narzędzia tematu
Wygląd

Podobne wątki

[8.1]Santa Claus - Witajcie Drodzy Użytkownicy! Dzisiaj do waszych rąk daję wam przerobiony przeze mnie NPC,skrypt na Świętego Mikołaja (Santa Claus) lecz pod tibię... Piotrek1474, Wczoraj


Tibia.net.pl: NPC ()
Temat: [8.0][NPC]Santa Claus Oto skrypt świętego Mikołaja.(Skrypt z hunted.pl/forum/showthread.php?t=696,pisany przez Komóra) Ja gotylko [...]


[TFS]Paru podstawowych NPC na kazdego OTS - Gesior.pl (0) Wczoraj 16:28 Obronca miasta/graczy - Gesior.pl (1) Wczoraj 16:23 [8.2x][NPC]NPC Trade System - Hoster (0) 18-11-2008 13:10 [8.22] Potrzebny NPC - wiewiorQ (0) 16-11-2008 13:32 [8.1][npc] Jubiler, Djinn, Bp Potions... - Ariantede (0) 16-11-2008 08:47 [7.6] 2 fajne NPC - Kaspersky 2008 (2) 14-11-2008 20:31 [-8.1] Priv NPC by Aragorn - Aragornkk (0) 14-11-2008 16:03 [8.1][Poradnik]Jak napisać swojego 1 NPCa? - mayu11 (5) 14-11-2008 20:17 [8.31] Npc Sprzedajacy Addon item - Xrobix (0) 09-11-2008 12:48 [8.0] Prosze opomoc z NPC sprzedajacym faje wodne - zimny36 (0) 09-11-2008 00:55


Czasy w strefie GMT +1. Teraz jest 05:30.




Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.2.0 © 2008, Crawlability, Inc.