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!

Some help with quest

Newbie Spellweaver
Joined
Feb 23, 2009
Messages
62
Reaction score
6
Hello Guys, anyone know here how i can make a quest see able under "Q" ?

I tried this :

Quest.txt
PHP:
;1.Quest Priest XingFing

(quest 
	(index 40000 1) 
	(case (if (clear 40000 1) (level 1)(gstate 104 1))) 
	(case (then (link 40000 2)))
)
(quest 
	(index 40000 2) (linked 1)
	(case (if (level 1) (item (396 1)))
	(then (item (out 396 1) (in 4006 0 1)) (save 40000 2)(clear 40000 1) (html 860000) (html)))
	(case (then (html )))
)

task-e.dat
PHP:
( task 
	( key 40000)
	( name "The Transporter (1)")
	( desc "First Step")
	
	( flag 
		( key 1)
		( desc "Priest Xing Fing ask if you can help him. He need a head from a Demon Vulgar, the Demon Vulgars lives around of the Village of Narootuh. Collect 1 of their to Xing Fing.")
		( param 257597 259126)
	)
)

I want that the quest is only 1 time aviable.
See able under "Q".
The only thing is that the param is the XY from the NPC, i have compare other Quests and found it out.

PHP:
(filechk file_ver (country_type ENG)(filename s850021))
(background
	(font 12) 
	(link system ( param ( width 350) ( height 450) ( style center transparent) ( caption "")))
)

;Background
( page ( pos  -3 -0) ( bitmap "trans1"  (colorkey 255 0 255)) )

;XingFing
( page	( font 12)
	( pos 43 350 )
	( button 	(bitmap "B03-default") ( param send quest 40000 1 )(text "Let's go!")( tip"#5You need 1 Vulgar Head!.")(colorkey 15 15 15))
                   
)

;Head

( page	( font 12)
	( pos 131 166)
	( button 	(bitmap "vulghead")( tip"Quest Information:#n#5Go and hunt 1 Demon Vulgar Head!")(colorkey 255 0 255))
                   
)
	
;Close buttons
( page	( font 12)
	( pos 310 11)
	( button 	(bitmap "xbutton") ( param send quest 41000 1 )( tip"Close")(colorkey 15 15 15))
                   
)

( page	( font 12)
	( pos 289 419)
	( button 	(bitmap "x2") ( param send quest 41000 1 )( tip"Close")(colorkey 255 0 255))
                   
)

The Second thing is, i want after the Click the Button "Let's Go" that the Quest start.
If you spoke with the NPC and you started the Quest with the "Let's Go" button the quest is seeable under "Q". If you know speak with the NPC a Other html open. (Example (html 123)
If you finised the Quest a another html open, but not html (123)

And is it possible if anyone speak to the NPC and have Level 56 instead of level 60 that
it open a html with (for example) "You're not High enough"?


I hope someone can help me,
XiaOnline
 
make Love, not War!
Joined
Feb 2, 2008
Messages
511
Reaction score
407
The best solution for this looks like that:
1. npc dialogs (4)
  • quest not done and not activated
  • quest not done but activated
  • quest finished -> reward
  • quest done
2. show task on Q when:
  • quest is not done but activated(2nd state only)

1. npc design

(gennpc (index 5) (country 2) (kind 3) (shape 7) (quest 40000 1) (map 0) (xy 267723 242587 19630) (dir 267722 242617))

//(kind 3) is telling the npc NOT to open html BUT run a (quest)
//(quest xxxx y) is telling WHICH quest and flag shall be executed when you talk to the npc

2. Quest.txt
  • 1. dialog is when u click on him
  • -> required checks: quest done? quest active?
  • 2. if quest is not done and not active -> show window to activate the quest
  • if quest is not done but active -> show window to hand over the items (Q task is enabled here)
  • if quest is finished -> active status (save x y) will turn into "done status" (clear x)
  • the (clear x) command does not need a flag - only use clear if this quest is totally finished, otherwise work with (save x y)
  • the (if (quest x y) check is checking if the quest x with flag y is saved with (save x y) before. If yes, it will return TRUE

Quest.txt

;npc talk
(quest (index 40000 1)
(case (if (clear 40000)) (then (html done)))
(case (if (quest 40000 1)) (then (html active)))
(case (then (html startquest)))
)

//the html startquest needs to include a button: start quest! (param send quest 40001 1)
;accept
(quest (index 40001 1)
(case (then (save 40000 1)(html active)(html activated)))
)

//after accepting the quest next page -> html active will be loaded -> including the button to hand over items and get reward
//html activated is an optional html where you add a notice like: "quest has been accepted, additional information can be found on Questlog (Q)"


;reward
(quest (index 40001 2)
(case (if (quest 40000 1) (item (396 1)))
(then (item (out 396 1) (in 4006 0 1)) (clear 40000) (html done)))

)




task-e.dat

( task
( key 40000)
( name "The Transporter (1)")
( desc "First Step")

( flag
( key 1)
( desc "Priest Xing Fing ask if you can help him. He need a head from a Demon Vulgar, the Demon Vulgars lives around of the Village of Narootuh. Collect 1 of their to Xing Fing.")
( param 257597 259126)
)
)

//this information will be shown on Questlog (Q) when Quest 40000 with key 1 is saved.
As soon as flag 2 is saved, this will be still shown in Q.
As soon as Quest 40000 is clear, it will be removed from Q


... if you got problems with e.pk i can help you too.
i uploaded some example e.pk files which i use on my server to do quests fast.
Example e.pk files:


Kind Regards,

UppaCuT
 
Upvote 0
Newbie Spellweaver
Joined
Feb 23, 2009
Messages
62
Reaction score
6
First Thank you for your amazing tutorial here, it'll help me a alot!

I download your example e.pks.

First Question:

Is it right that in line 2 stand (clear 40000) instead of (clear 40000 1) ?

Second Question:

The html "done" will load if someone finished the quest or?


Now i'll look at your download file :)

And again, thank you very much for your great Tutorial!

With friendly regards
XiaOnline
 
Upvote 0
make Love, not War!
Joined
Feb 2, 2008
Messages
511
Reaction score
407
First Thank you for your amazing tutorial here, it'll help me a alot!

I download your example e.pks.

First Question:

Is it right that in line 2 stand (clear 40000) instead of (clear 40000 1) ?

To get a better understanding im just about to write a tutorial on the Tutorial section about quest syntax.

Most important commands :

(quest x y) -> only after (if) -> checking if quest x and flag y is SAVED into db with (save x y)
(save x y) -> only after (then) -> saving quest x with flag y into db (saved quests will show on Q)
(clear x) -> after (then) -> clearing quest x. The flag is not important here.
(clear x) -> after (if) -> checking if quest x is cleared -> not showing on Q anymore
(notclear x) -> only after (if) -> checking if quest is NOT clear yet

Second Question:

The html "done" will load if someone finished the quest or?

Yes, something like: "you ve finished this quest arleady, this quest is not repeatable or whatever big bla pipapo"

Now i'll look at your download file :)

And again, thank you very much for your great Tutorial!

With friendly regards
XiaOnline

Kind Regards,

Uppa
 
Upvote 0
Newbie Spellweaver
Joined
Feb 23, 2009
Messages
62
Reaction score
6
Great Idea with the Tutorial for Quest, guys like you i want to see in the kal section.

I want people like you see here, are still as friendly as I have you in remembrance.


Kind Regards,
Uppa
 
Upvote 0
Back
Top