PHP Quest Generator

Results 1 to 12 of 12
  1. #1
    boo General is offline
    MemberRank
    Sep 2006 Join Date
    at homeLocation
    2,269Posts

    PHP Quest Generator

    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:
    (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."))
    )
    2. HTML continue (not needed for the quest generator)
    (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))
    )
    3. HTML Thanks
    (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!"))
    )
    HTML Error: wen you don't have the amount of tiems requested
    (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"))
    )
    This would look in Quest.txt: (lets say lvl 30 required to start and assuming you did quest 1106)

    (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)))
    )
    Open the NPC dialogue with:
    (gennpc (index 1) (country 2) (kind 3) (shape 3) (quest 1107 1) (map 0)
    Kind regards
    Attached Files Attached Files
    Last edited by General; 01-10-09 at 11:16 AM.


  2. #2
    Account Upgraded | Title Enabled! 2Kxx is offline
    MemberRank
    Feb 2008 Join Date
    Sweden..Location
    1,194Posts

    Re: PHP Quest Generator

    Hehe nice!

  3. #3
    Enthusiast Andro...Orginal is offline
    MemberRank
    Mar 2009 Join Date
    Priest OnlineLocation
    48Posts

    Re: PHP Quest Generator

    great job!!

  4. #4
    Proficient Member Jurgen1994 is offline
    MemberRank
    Nov 2008 Join Date
    BelgiumLocation
    195Posts

    Re: PHP Quest Generator

    wow nice :D

    Grtzzz

  5. #5
    Account Upgraded | Title Enabled! mukso is offline
    MemberRank
    Nov 2007 Join Date
    HungaryLocation
    333Posts

    Re: PHP Quest Generator

    Thank you Bjorn :)
    It seem to you relase the most useful things nowadays :)

  6. #6
    make me laugh rekat is offline
    MemberRank
    Feb 2008 Join Date
    normaly at home...Location
    346Posts

    Re: PHP Quest Generator

    thx bjorn

  7. #7
    Account Upgraded | Title Enabled! Tommy1 is offline
    MemberRank
    Mar 2009 Join Date
    Earth/France/Paris/Montparna/Home/Room/ Iam not here.Location
    335Posts

    Re: PHP Quest Generator

    Thanks Bjorn it can save alot of time :)

  8. #8
    Account Upgraded | Title Enabled! Fleetaks is offline
    MemberRank
    Jan 2007 Join Date
    GermanyLocation
    376Posts

    Re: PHP Quest Generator

    Thanks Bjorn, again a nice release from you.

  9. #9
    Infraction Banned hero322 is offline
    MemberRank
    Nov 2006 Join Date
    CanadaLocation
    1,036Posts

    Re: PHP Quest Generator

    <--- hehe ty bjorn
    & you added more features to it now XD

  10. #10
    Enthusiast RoYal.Guard is offline
    MemberRank
    Jan 2009 Join Date
    EgyptLocation
    46Posts

    Re: PHP Quest Generator

    Thank you

  11. #11
    Novice EU:UNIT is offline
    MemberRank
    Nov 2009 Join Date
    1Posts

    Re: PHP Quest Generator

    how do i start this ? =(
    Im German and dont speak english so very good.

  12. #12
    Alpha Member Zen is offline
    MemberRank
    Dec 2006 Join Date
    MelbourneLocation
    2,291Posts

    Re: PHP Quest Generator

    put it in your webserver and then access it.



Advertisement