Kal Online Quest Guide

  суббота 21 марта
      59

Guide Timey s Shaman Guide. (Currently Updating) Florum. Introduction - Silkroad Online Wiki Guide Kal Online Quest Guide: pin. Kalonline #22 Sae-Won.

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:
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:
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:
If the Player is level 80=> perfect.
Wrong way:
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?'
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:
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:
(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

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 = specialtyx-Values: 0 1 2: 0= Knight, 1= Mage, 2= Archery-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.

Kalonline

(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 modeOther 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. Code: ( task ( key 500)( name 'Banshee SoulsToP F1')( desc 'Reward: Geons, Exp, 5 Contribution points, random special item, G70 weaponnormal')( flag( key 1)( desc 'Collect 15 Skeleton Bone and 15 Banshee Soul and bring them to me.'

)( param 257 ))( flag( key 2)( desc 'Now bring this letter to blablapipapo!' )( param 257 )))(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. Frag pro shooter hacks.