What's new
  • logo_cipsoft
    Latest servers:
    New servers will open on: 19th Feb 2025:
    Noctalia (Open PvP) Ignitera (Open PvP) us_logo Xybra (Open PvP)

Santa Claus [8.1]

Status
Not open for further replies.

Piotrek1474

Advanced User
Joined
Sep 13, 2008
Messages
193
Reaction score
5
Age
33
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? 8.1 :)

No to zacznijmy od Data/Npc i tam tworzymy santa.xml

Code:
<?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>

A nast?pnie tworzymy plik santa.lua

Code:
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('Wesolych Swiat!') 
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('Przepraszam, ' .. creatureGetName(cid) .. '! Poczekaj chwilke,lub dostaniesz rozge!.') 
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('Przepraszam,dostales juz prezent,lub byles nie grzeczny :( ') 
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('Wesolych Swiat') 
end 
focus = 0 
end 
if focus ~= 0 then 
if getDistanceToCreature(focus) > 3 then 
selfSay('Wesolych Swiat') 
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

Potem m?wimy do Miko?aja:

Code:
Hi
Present
yes
Bye

I mamy prezent,gdy byli?my grzeczni ;)
 

Evisar

User
Joined
Oct 24, 2008
Messages
14
Reaction score
2
Odp: [8.1]Santa Claus

Odp: [8.1]Santa Claus

Mo?esz poda? jakie prezenty dostajemy od Miko?aja?
I czy to jednorazowo czy co Reset Servera (czy co jakis czas) ?

@Down
Nie wszyscy umiej? to rozszyfrowa?.
 
Last edited:

Piotrek1474

Advanced User
Joined
Sep 13, 2008
Messages
193
Reaction score
5
Age
33
Odp: [8.1]Santa Claus

Odp: [8.1]Santa Claus

Mo?emy dosta? itemki o tych idach:
Code:
2195
2130
2173
2160
2452
2453
2349
2353
'
A zreszt? wi?cej jest opisane w kodzie :)

Evisiar said:
Nie wszyscy umiej? to rozszyfrowa?.


No niestety..
 
Last edited:

Marcin24

Ja i Kazia
Joined
Oct 14, 2008
Messages
1,617
Reaction score
209
Age
30
Odp: [8.1]Santa Claus

Odp: [8.1]Santa Claus

Z racji i? zbli?aj? si? ?wi?ta :p postanowi?em wyt?umaczy? id itemk?w :D
Code:
2195- Boots of haste
2130- Golden amulet
2173- Amulet of loss
2160 -Crystal coin
2452 -Heavy mace
2453 -Arcane staff
2349 -Blue note
2353 -Burning heart

My?l? ?e pomog?em :D
 

grubymaciej

Active User
Joined
Sep 20, 2008
Messages
82
Reaction score
1
Odp: [8.1]Santa Claus

Odp: [8.1]Santa Claus

kiepsko.... za dobre itemy daje 5/10 w?tpie by komu? sie przyda?o
 

noob1000

New User
Joined
Oct 14, 2008
Messages
6
Reaction score
0
Odp: [8.1]Santa Claus

Odp: [8.1]Santa Claus

fajny ten mikolaj napewno mi sie przyda thx[/SIZE][/SIZE]
 

Graxiu

User
Joined
Nov 9, 2008
Messages
24
Reaction score
0
Odp: [8.1]Santa Claus

Odp: [8.1]Santa Claus

Mam takie male pytanko, czy ten satna bedzie dzialal pod 8.1 jesli nie to czy mozna go jakos przerobic?
 

Denyx

New User
Joined
Oct 24, 2008
Messages
3
Reaction score
0
Odp: [8.1]Santa Claus

Odp: [8.1]Santa Claus

@UP przecie? pisz? ?e pod 8.1 to po co si? g?upio pytasz? -.-"
 

Graxiu

User
Joined
Nov 9, 2008
Messages
24
Reaction score
0
Odp: [8.1]Santa Claus

Odp: [8.1]Santa Claus

A czemu nie ? Wiele skryptow z 8.1 dziala pod 8.22/ 8.31 wiec chcialem sie zapytac czy ten tez dziala a jak nie czy mozna go przerobic :p
 

PatulecxD

Advanced User
Joined
Nov 17, 2008
Messages
209
Reaction score
12
Age
30
Odp: [8.1]Santa Claus

Odp: [8.1]Santa Claus

Zajebisty Santa 10/10 :]
 

GM Stary

Advanced User
Joined
May 8, 2008
Messages
213
Reaction score
3
Odp: [8.1]Santa Claus

Odp: [8.1]Santa Claus

Swietny miko. Daje 10/10 choc zbyt dobre itemki to Umiem zamienic id...:D
 

ElectroMan

New User
Joined
Sep 23, 2008
Messages
4
Reaction score
0
Odp: Santa Claus [8.1]

A da si? zrobi? zeby sprzedawa? po pare itemow? Bo chcia?bym go bardziej upodobni? do prawdziwego Santy tak ?eby dawa? np. 15 jab?ek :)
 

matrix8800

Active User
Joined
Dec 1, 2008
Messages
127
Reaction score
6
Odp: Santa Claus [8.1]

Bardzo fajny Miko?aj daj? 10/10 ... wstawi? go na m?j OTS :)
 

Jimbol

User
Joined
Nov 20, 2008
Messages
28
Reaction score
6
Odp: Santa Claus [8.1]

A mi nie dzia?a:( Zrobi?em wszystko, ale gdzie on niby jest? Gdy pisze GOD'em np /goto Soya, przenosi mnie do niej. Jak psize /goto Santa/Santa Claus itp nic.. Co jest nie tak?
 
Status
Not open for further replies.
Top