Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

[Tutorial] Lottery NPC

Junior Spellweaver
Joined
Jun 5, 2011
Messages
180
Reaction score
205
If you can't get it - buy a gun and kill yourself.

Quest.txt
Code:
(quest (index 1 1)
(case (if (item (ticket_id ticket_amount))) (then (itemrand 1)(item (out ticket_id ticket_amount))))
(case (then (html no_ticket)))
)
ItemGroup.txt
Code:
// 90% - medium medicine, 10% - horn of spirit
(group (index 1) (item (900 48 0)(1000 515 0)))
// 100% change to get into group 1
(itemgroup (index 1) (group (1000 1)))


e.pk:
Code:
(filechk file_ver (country_type ENG) (filename s000175))
(background
	(font 12) 
	(wrap 270)
	(link system ( param ( width 270) ( height 255) ( style title edge system vscroll) ( caption "Talk") ( layout script) ))
)

( frame ( font 12)

	( line "Lottery system: Wanna try?")
	( line "")

	( link ( text "[Rand] Sure, I wanna be a millionaire!") ( param send quest 1 1 ))
	( link close ( text "[Talk End] Alight."))	
)
InitNPC.txt
Code:
(gennpc (index 1) (country 2) (kind 1) (shape 3) (html 175) (map 0) (xy 267610 243128 19630) (dir 266610 242128))
 
Newbie Spellweaver
Joined
Mar 13, 2011
Messages
8
Reaction score
0
ItemGroup.txt is wrong :s

any sollutions why i get error with it ?
 
Experienced Elementalist
Joined
Nov 19, 2011
Messages
245
Reaction score
160
;90% - medium medicine, 10% - horn of spirit
(group (index 1) (item (900 48 0)(1000 515 0)))
;100% change to get into group 1
(itemgroup (index 1) (group (1000 1)))


So as not an error.

LOL, change the index
 
Junior Spellweaver
Joined
Sep 29, 2007
Messages
102
Reaction score
7
Quest.txt
Code:
(quest (index 1 1)
(case (if (item (ticket_id ticket_amount))) (then [COLOR=#ff0000](itemrand 1)[/COLOR](item (out ticket_id ticket_amount))))
(case (then (html no_ticket)))
)

well i dont want to shoot myself:D: but what is this (itemrand 1)? i got everything else.... but what do i put for this?
 
make Love, not War!
Joined
Feb 2, 2008
Messages
511
Reaction score
407
(itemrand 1) => give the player (itemgroup (index 1)) 1 time. It's as if you kill a monster with (itemgroup 1 1) but in quest its (itemrand 1).

Kind regards
 
Junior Spellweaver
Joined
Sep 29, 2007
Messages
102
Reaction score
7
well thanks uppacut thats kinda what i figured but it didnt work for me but i must have done something wrong ill check it again
 
make Love, not War!
Joined
Feb 2, 2008
Messages
511
Reaction score
407
You can do a quest like this where you get a reward for example:
quest checks your class -> f.e. knight
and then :
In ItemGroup.txt:
Code:
(group (index 5011) (item (200 [COLOR=#008000]5130[/COLOR])(400 [COLOR=#008000]5131[/COLOR])(600 [COLOR=#008000]5132[/COLOR])(800 [COLOR=#008000]5133[/COLOR])(1000 [COLOR=#008000]5134[/COLOR])))
(itemgroup (index 5011) (group (1000 5011)))

In Quest.txt
Code:
(quest (index 505 14)    
    (case (if (class 0)) (then (itemrand 5011)))
    (case (if (class 2)) (then (itemrand 5012)))
    (case (if (class 1)) (then (itemrand 5013)))
    (case (then (html 910027)))
)
If you are knight, you get 100% 1 item of 5130(chest),5131(shoes),5132(hood)...5134(shorts)
For example quest reward: g90 armor part(random)

Kind regards,

UppaCuT
 
Helper for everyone
[VIP] Member
Joined
Oct 30, 2010
Messages
1,181
Reaction score
228
You can do a quest like this where you get a reward for example:
quest checks your class -> f.e. knight
and then :
In ItemGroup.txt:
Code:
(group (index 5011) (item (200 [COLOR=#008000]5130[/COLOR])(400 [COLOR=#008000]5131[/COLOR])(600 [COLOR=#008000]5132[/COLOR])(800 [COLOR=#008000]5133[/COLOR])(1000 [COLOR=#008000]5134[/COLOR])))
(itemgroup (index 5011) (group (1000 5011)))

In Quest.txt
Code:
(quest (index 505 14)    
    (case (if (class 0)) (then (itemrand 5011)))
    (case (if (class 2)) (then (itemrand 5012)))
    (case (if (class 1)) (then (itemrand 5013)))
    (case (then (html 910027)))
)
If you are knight, you get 100% 1 item of 5130(chest),5131(shoes),5132(hood)...5134(shorts)
For example quest reward: g90 armor part(random)

Kind regards,

UppaCuT


Nice tutorial ;)
 
Experienced Elementalist
Joined
Apr 2, 2012
Messages
270
Reaction score
7
is there any way to make event like ticket
maybe money every 30minute??
 
Newbie Spellweaver
Joined
Mar 19, 2013
Messages
60
Reaction score
1
can i know where exactly where i put the code's i got the files and i know them but where i should put the code's in the middle or in the end or in the start !?
 
Junior Spellweaver
Joined
Dec 6, 2007
Messages
110
Reaction score
4
can i know where exactly where i put the code's i got the files and i know them but where i should put the code's in the middle or in the end or in the start !?

IT DOESN'T MATTER WHERE YOU PUT THEM! (<-- The Rock)

The end is fine.
 
Last edited:
Back
Top