An Introduction about KalOnline Quest system

Results 1 to 8 of 8
  1. #1
    make Love, not War! HadesKal is offline
    True MemberRank
    Feb 2008 Join Date
    PandoraLocation
    523Posts

    An Introduction about KalOnline Quest system


    RaGEZONE Recommends

    RaGEZONE Recommends

    Updated 05.03.2013 - FAQ_How to show a quest in Quest log 'Q'


    Whats a quest?

    A quest is a simple "if-then" test.
    I will use the correct syntax in Code fields only. I ll try to explain HOW the quest system of KalOnline is working. To explain this more easy, i will try to use a mix between normal english words and kalonline syntax.

    Step 1: get an overview

    Example:
    Code:
    //easy overview structure:
    (case
    (if
    (item (120 2)
    )
    (then
    (item (out 120 2)(in 121 0 1))
    )
    ) //common structure: (case (if (item (120 2))(then (item (out 120 2)(in 121 0 1))))
    These 2 cases do exactly the same.
    In words:
    We open a case (case) -> if the user has the item 120 2 times or more in his inventory, then put item out of inventory 120 2 times and put into inventory item 121 1 time.
    Shorter:
    If player has item 120 at least 2 times
    then item out 120 2 times and item in 121 1 time

    Next question is: which options do we have???
    There are 2 kinds of options:


    • If's
    • Then's


    General meaning of if and then:
    Syntax: (if (test) expression)
    If the (test) returns TRUE value, the expression (then) will be executed.
    If the (test) returns FALSE value, the expression (then) will NOT be executed.

    If ONE case returns the value TRUE the other tests will NOT be executed.

    Example:
    Code:
    (quest (index 500 1)
    	(case (if (class 0))(then (item (in 485 0 1)))) <--first line => test = true => stop!!
    	(case (if (class 0))(then (item (in 485 0 1)))) <--not executed because first test = true 
    )
    If a knight executes this quest he will get item 485. BUT only 1 time, because the first test results TRUE => (class 0 = knight = true).
    If you want to teleport on different levels in different areas with 1 quest only, build it up like this:
    Code:
    (quest (index 500 2)	(case (if (level 100))(then (item (in 485 0 1)))) 
    	(case (if (level 80))(then (item (in 485 0 1))))
    	(case (if (level 70))(then (item (in 485 0 1))))
    )
    If the Player is level 80=> perfect.
    Wrong way:
    Code:
    (quest (index 500 2)
    ​	(case (if (level 70))(then (item (in 485 0 1))))
    	(case (if (level 80))(then (item (in 485 0 1)))) 
    	(case (if (level 90))(then (item (in 485 0 1))))
    
    
    )
    If the Player is level 80 => first test (if (level 70)) => true => execute expression => STOP!


    So what tests do we have?

    Summary of commands/functions/syntax:

    If's:


    • (class x)

    -> Checking players class - x= 0 1 2: 0= Knight, 1= Mage, 2= Archer

    • (specialty x y)

    -> Checking players specialty - x = class, y = specialty
    x-Values: 0 1 2: 0= Knight, 1= Mage, 2= Archer
    y-Values: 0 1 2 3 4 5: 0= wondering, 1= apprentice (lv. 30), 2= hermit/vaga/ea, 3=cjb/commander/ic, 4= 3rd job , 5= 3rd job

    • (level x)

    -> If the player is at least level x (example: (if (level 100)) - Playerlevel 83 => return value FALSE... - Playerlevel 110 => return value: TRUE

    • (gstate x y)

    -> Checking the player state (gstate 104 1) => assassin mode // (gstate 104 0) NO assassin mode
    Other known guild states? - guild?

    • (item (x y))

    -> Checking if the player has item index x and amount y in inventory

    • (quest x y)

    -> Checking if the player saved the quest index x and flag y into database (then (save x y))

    • (clear x)

    -> Checking if the quest index x is cleared (Flag is not playing a role here)

    • (notclear x)

    -> Checking if the quest index x is NOT cleared (Flag is not playing a role here)

    Then's:


    • updated soon



    FAQ:



    Quest Log - ingame "Q": "How can I show the Quest information on Q ingame?"

    How does the task-e.dat in config.pk work?

    If the quest is saved in the database => show quest
    If the quest is cleared in the database => do not show the quest anymore


    • => (then (save 500 1))

    Show Quest 500 flag 1 in task-e.dat

    • => (then (clear 500))

    Do not show Quest 500 flag x anymore

    task-e.dat:
    Code:
    ( task     ( key 500)
        ( name "Banshee Souls[ToP F1]")
        ( desc "Reward: Geons, Exp, 5 Contribution points, random special item, G70 weapon[normal]")
        ( flag 
            ( key 1)
            ( desc "Collect [15] Skeleton Bone and [15] Banshee Soul and bring them to me.")
            ( param 235968 279757 )
        )
    )
    If the Quest 500 is saved with flag 1 => show in Q
    If the Quest 500 is cleared => delete from Q

    task-e.dat can get more flag keys for longer quests:
    Code:
    ( task     ( key 500)
        ( name "Banshee Souls[ToP F1]")
        ( desc "Reward: Geons, Exp, 5 Contribution points, random special item, G70 weapon[normal]")
        ( flag 
            ( key 1)
            ( desc "Collect [15] Skeleton Bone and [15] Banshee Soul and bring them to me.")
            ( param 235968 279757 )
        )
        ( flag 
            ( key 2)
            ( desc "Now bring this letter to blablapipapo!")
            ( param 235968 279757 )
        )
    
    )
    (then (save 500 1)) -> after the quest is done => (then (save 500 2))
    =>will show "Now bring this letter to blablapipapo!" on the detailed quest description.


    I will edit this post when i got more time :) just introduction so far
    Last edited by HadesKal; 05-03-13 at 01:18 AM.


  2. #2
    Member XiaOnline is offline
    MemberRank
    Feb 2009 Join Date
    GermanyLocation
    65Posts

    Re: An Introduction about KalOnline Quest system

    This guide is just epic.

    Kind regards,
    XiaOnline

  3. #3
    Get over it strik3r2k5 is offline
    True MemberRank
    Jun 2006 Join Date
    843Posts

    Re: An Introduction about KalOnline Quest system

    Isn't this your second or third quest tutorial xD?
    Anyways good one :P

    Kind regards,
    strik3r xD

  4. #4
    make Love, not War! HadesKal is offline
    True MemberRank
    Feb 2008 Join Date
    PandoraLocation
    523Posts

    Re: An Introduction about KalOnline Quest system

    Quote Originally Posted by strik3r2k5 View Post
    Isn't this your second or third quest tutorial xD?
    Anyways good one :P

    Kind regards,
    strik3r xD
    xD i think yep... im still getting asked same questions over and over...
    There was a quest tutorial released on magias realm which taught me everything about quests i think.... but magias realm forum is offline, so i try to copy this guide :)

    Kind Regards,

    Uppa

  5. #5
    Helper for everyone Ismir93 is online now
    True MemberRank
    Oct 2010 Join Date
    BosniaLocation
    1,122Posts

    Re: An Introduction about KalOnline Quest system

    Quote Originally Posted by UppaCuT View Post
    xD i think yep... im still getting asked same questions over and over...
    There was a quest tutorial released on magias realm which taught me everything about quests i think.... but magias realm forum is offline, so i try to copy this guide :)

    Kind Regards,

    Uppa

    yeah there was full quest tutorials but links dead,anyone still got it?

  6. #6
    Account Upgraded | Title Enabled! XxGhosTxX is offline
    True MemberRank
    Jan 2011 Join Date
    CanadaLocation
    594Posts

    Re: An Introduction about KalOnline Quest system

    I don't know if this is usefull but I had this ond link from Arturasul's webserver where you can see all the serverside/clientside game config files with all there existing features Index of /kalonline/kml/doc

    Never argue with an idiot. He will only bring you down to his level and beat you with experience.


  7. #7
    Banned Kallyanna is offline
    BannedRank
    Jul 2007 Join Date
    Spamzilla CrewLocation
    1,829Posts

    Re: An Introduction about KalOnline Quest system

    even "I" understood it.. good name! *claps hands for applause* good man... if I dnt understand it ..no beesh will...lol

  8. #8
    Member XiaOnline is offline
    MemberRank
    Feb 2009 Join Date
    GermanyLocation
    65Posts

    Re: An Introduction about KalOnline Quest system

    The Param @ task-e.dat is the XY Coordinates from your NPC.




Advertisement