Hey ho
For SwordOnline, I made a quest generator in php that works in a similar way as inix' quests do.
It's a basic "chain" quest generator, means you need to have completed the previous quest to be able to start the next quest.
There are 2 static error HTMLs (i used s001435 and s001436), one for "Too low level" and one for "Act like nothing happens" (when previous quest not done or quest already done.), which you can always extend.
There are 3 dynamic HTMLs per quest. One is the starter window with a link to accept the quest. It's important that you send the quest with flag 3.
I'll give you a small example:
1. HTML Start:
2. HTML continue (not needed for the quest generator)Quote:
(filechk file_ver (country_type ENG) (filename s001189))
(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 "Devil Investigator: Hi, so you are ready for your next mission?")
( line "")
( link ( text "Yes!") (param load "s001190"))
( link close ( text "[Talk End] Like i care."))
)
3. HTML ThanksQuote:
(filechk file_ver (country_type ENG) (filename s001190))
(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 "Devil Investigator: Get me 30 Blades from the devil soldiers with twin blades..")
( line "")
( link ( text "[Accept Quest] Okay, I'll do it.") (param send quest 1107 3))
)
HTML Error: wen you don't have the amount of tiems requestedQuote:
(filechk file_ver (country_type ENG) (filename s001191))
(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 "Devil Investigator: Thanks! Take this, and come back when you've trained.")
( line "")
( link close ( text "[Talk End] Thanks!"))
)
This would look in Quest.txt: (lets say lvl 30 required to start and assuming you did quest 1106)Quote:
(filechk file_ver (country_type ENG) (filename s001192))
(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 "Devil Investigator: Get moving!")
( line "")
( link close ( text "[Talk End] I'm on my way"))
)
Open the NPC dialogue with:Quote:
(quest (index 1107 1)
(case (if (clear 1107)) ;if already completed
(then (html 1191))); thanks
(case (if (quest 1107 0) (clear 1106));if not done + previous quest completed
(then (link 1107 2))); check lvl
(case (if (quest 1107 1));if active
(then (link 1107 4))); check for items
(case (then (html 1436))) ;act like nothing happened
)
(quest (index 1107 2) (linked 1)
(case (if (level 30)) ;check lvl
(then (html 1189))) ;show first window
(case (then (html 1435))) ;too low lvl
)
(quest (index 1107 3) ;accept quest
(case (if (quest 1107 0) (level 30));check lvl
(then (save 1107 1)));start quest
)
(quest (index 1107 4) (linked 1)
(case (if (item (1337 30)))
(then (item (out 1337 30)) (exp 50000) (clear 1107 2) (html 1191))) ;reward
(case (then (html 1192)))
)
Kind regardsQuote:
(gennpc (index 1) (country 2) (kind 3) (shape 3) (quest 1107 1) (map 0)
