搜索
 找回密码
 加入

[Guide] In-Depth EVT Coding(全面了解EVT文件)

ctgwglzc 2008-10-17 10:46:45 2687
Introduction

So, you're probably asking yourself, "what is EVT Coding?" EVT coding is the coding language for any quest-related things to do with Knight Online. It has tons of potential, and I'll be explaining what all the functions/commands do and how you would use them.

I'm warning you right now, this is a bit of a long read and EVT coding is very time consuming, so unless you've got time, I wouldn't bother.


Functions/Commands


Basic things you should know :

A is used anytime you're using a IF / Check function

E is used anytime you're using an event function

; is used for commenting - Example
E RUN_EVENT 10601 ; You can write notes here..

-1 is used for noting a space that isn't used, if you're not using one of the supplied spaces you'll have to put a -1.

ALL of EVT Coding must be done in capital letters.
  1. Event Functions

  2. ROB_EXAM
  3. GIVE_ITEM_INPUT_COUNT
  4. ROB_ITEM_INPUT_COUNT
  5. OPEN_INPUT_COUNT
  6. LOG_OLYMPIC_ACCOUNT
  7. CHECK_OLYMPIC_ACCOUNT
  8. MOVE_MIDDLE_STATUE
  9. GIVE_LOGTIME_ITEM
  10. CHECK_LOGTIME_ACCOUNT
  11. GIVE_KJWAR_ITEM
  12. CHECK_KJWAR_ACCOUNT
  13. CHECK_PCBANG_OWNER
  14. GIVE_PCBANG_ITEM
  15. CHECK_PCBANG_ITEM
  16. SHOW_PCBANG_ITEM
  17. CHANGE_MANNER
  18. EMIGRATION_ACCEPT
  19. STATE_CHANGE
  20. ZONE_CHANGE_PARTY
  21. ROB_ALLITEM_PARTY
  22. SEND_WEBPAGE_ADDRESS
  23. CHANGE_NAME
  24. STAT_POINT_FREE
  25. SKILL_POINT_FREE
  26. CHANGE_LOYALTY
  27. ZONE_CHANGE_CLAN
  28. ROLL_DICE
  29. CHANGE_POSITION
  30. PROMOTE_KNIGHT
  31. DESTROY_ITEM
  32. EXP_CHANGE
  33. LEVEL_UP
  34. STAT_POINT_DISTRIBUTE
  35. SKILL_POINT_DISTRIBUTE
  36. PROMOTE_USER_NOVICE
  37. ZONE_CHANGE
  38. KISS_USER
  39. RUN_EXCHANGE
  40. GIVE_PROMOTION_QUEST
  41. PROMOTE_USER
  42. SAVE_EVENT
  43. GIVE_PPCARD_ITEM
  44. RETURN
  45. REQUEST_PERSONAL_RANK_REWARD
  46. REQUEST_REWARD
  47. ROB_NOAH
  48. SAVE_COM_EVENT
  49. LOG_COUPON_ITEM
  50. GIVE_NOAH
  51. OPEN_EDITBOX
  52. ROB_ITEM
  53. GIVE_ITEM
  54. RUN_EVENT
  55. SELECT_MSG
  56. SAY
复制代码

12 回复

ctgwglzc
2008-10-16 17:26:23
楼主
点击查看详情
  1. IF Functions(Functions for checking something)

  2. CHECK_BEEF_ROAST_NO_VICTORY
  3. CHECK_BEEF_ROAST_ELMORAD_VICTORY
  4. CHECK_BEEF_ROAST_KARUS_VICTORY
  5. CHECK_EXAM_COUNT
  6. CHECK_WEIGHT_INPUT_COUNT
  7. CHECK_EXIST_ITEM_INPUT_COUNT
  8. CHECK_INPUT_COUNT
  9. CHECK_MIDDLE_STATUE_NOCAPTURE
  10. CHECK_MIDDLE_STATUE_CAPTURE
  11. CHECK_CLAN_RANKING
  12. CHECK_LOYALTY_RANK
  13. CHECK_LOYALTY_RANK_MONTHLY
  14. CHECK_EMPTY_SLOT
  15. CHECK_STAT_TOTAL
  16. CHECK_SKILL_TOTAL
  17. CHECK_NO_CASTLE
  18. CHECK_CASTLE
  19. CHECK_MONSTER_CHALLENGE_USERCOUNT
  20. CHECK_MONSTER_CHALLENGE_TIME
  21. CHECK_MANNER
  22. CHECK_NO_CLAN
  23. CHECK_CLAN
  24. CHECK_DICE
  25. CHECK_KNIGHT
  26. CHECK_CLAN_GRADE
  27. CHECK_NO_CHIEF
  28. CHECK_CHIEF
  29. CHECK_LOYALTY
  30. CHECK_NOCLASS
  31. CHECK_ITEMCHANGE_NUM
  32. CHECK_EXCHANGE
  33. CHECK_PROMOTION_ELIGIBLE
  34. CHECK_EXIST_EVENT
  35. CHECK_NOEXIST_EVENT
  36. CHECK_NOEXIST_ITEM_OR
  37. CHECK_NOEXIST_ITEM_AND
  38. CHECK_EXIST_ITEM_OR
  39. CHECK_EXIST_ITEM_AND
  40. CHECK_PPCARD_TYPE
  41. CHECK_PPCARD_SERIAL
  42. CHECK_NATION
  43. CHECK_NOAH
  44. EXIST_COM_EVENT
  45. NOEXIST_COM_EVENT
  46. HOWMUCH_ITEM
  47. CHECK_LV
  48. RAND
  49. CHECK_EDITBOX
  50. CHECK_WEIGHT
  51. CHECK_CLASS
  52. CHECK_NOEXIST_ITEM
  53. CHECK_EXIST_ITEM
  54. CHECK_SKILL_POINT
  55. CHECK_OVER_WEIGHT
  56. CHECK_UNDER_WEIGHT
复制代码
ctgwglzc
2008-10-16 17:27:11
楼主
Function explanations
  • CHANGE_MANNER
    Used for removing or adding Manner points.
    Use: E CHANGE_MANNER 10000 ; Will give you 10,000 Manner points
    E CHANGE_MANNER -10000 ; Will remove 10,000 Manner points
  • ZONE_CHANGE_PARTY
    Used to TP your whole party to another zone.
    Use: E ZONE_CHANGE_PARTY 21 350 350 ; Will tp your party to Moradon, with coordinates of 350 350. Zone ID, X, Y
  • SEND_WEBPAGE_ADDRESS
    Will open a in-game browser to the link specified in 'Web_address_us.tbl'
    Use: E SEND_WEBPAGE_ADDRESS 4 ; This will open up the webpage which has the index of 4 in your Web_Address_us.tbl file, the first column is the index number.
  • CHANGE_NAME
    Used for the Name Change Scroll, will change your name instantly in-game.
    Use: E CHANGE_NAME ; Simple as that, you will need a Name change stored procedure under the name of 'CHANGE_NEW_ID'
  • STAT_POINT_FREE
    Will restat your character.
    Use: E STAT_POINT_FREE ;
  • SKILL_POINT_FREE
    Will reskill your character.
    Use: E SKILL_POINT_FREE ;
  • CHANGE_LOYALTY
    Used to Add/Remove National Points
    Use: E CHANGE_LOYALTY 500 ; Will add 500 National Points to your character.
    CHANGE_LOYALTY -500 ; Will remove 500 national points from your character.
  • ZONE_CHANGE_CLAN
    Used to TP your clan to a different zone.
    Use: E ZONE_CHANGE_CLAN 21 350 350 ; Will teleport your clan to Moradon, with a X,Y coordinate of 350,350.
    Parameters : Zone ID, X, Y.
  • ROLL_DICE
    Used to roll the dice, used for randomizing.
    Use: E ROLL_DICE 20 ; Will roll the dice with up to 20 possible values (1-20), Will be explained more later.
  • CHANGE_POSITION
    Used for the Key Quest NPCs, changes the NPC location. Note: This ONLY works if you have the TrapNumbers set up for the NPC.
    Use: E CHANGE_POSITION ; That's all you need, then it'll TP It to the next Trap Number set in your K_NPCPOS, it cycles through that.
  • PROMOTE_KNIGHT
    Used for promoting your clan, used when turning in your brain of centaur
    Use: E PROMOTE_KNIGHT
  • EXP_CHANGE
    Used for giving a character experience points.
    Use: E EXP_CHANGE 500 ; Will give the character 500 XP
  • LEVEL_UP
    Will level up the character.
    Use: E LEVEL_UP ;
  • PROMOTE_USER_NOVICE
    Will give you your level 10 specialty.
    Use: E PROMOTE_USER_NOVICE ;
  • ZONE_CHANGE
    Will teleport the character to a different zone/location.
    Use: E ZONE_CHANGE 21 350 350 ; Will teleport your character to Moradon, with coordinates of 350,350
    Parameters: Zone ID, X, Y
  • KISS_USER
    The NPC will kiss you and give you a Kiss Item
    Use: E KISS_USER ;
  • RUN_EXCHANGE
    Will run a item exchange (ITEM_EXCHANGE table in the database)
    Use: E RUN_EXCHANGE 36300 ; 36300 - Index number from ITEM_EXCHANGE table.
  • GIVE_PROMOTION_QUEST
    Gives you the quest to get your Masters Quest
    Use: E GIVE_PROMOTION_QUEST ;
  • SAVE_EVENT
    Saves the quest data into the database, lets you check whether or not the quest has been done.
    Use: E SAVE_EVENT QuestNumber 0/1/2
    Examples:
    E SAVE_EVENT 30 1 ; Will make you start Quest 30. You use Save 1 when you brief them about the quest, once they accept it, it should give them a save 1
    E SAVE_EVENT 30 2 ; Will make their quest count as finished. Once they've gathered all of the requirements for their quest, you do save 2 so they can no longer do that quest anymore
  • REQUEST_PERSONAL_RANK_REWARD
    Gives you your cash reward for being one of the top NP holders
    Use: E REQUEST_PERSONAL_RANK_REWARD
  • ROB_NOAH
    Takes noah from the Character.
    Use: E ROB_NOAH 15000 ; Will take 15,000 noah from the character
  • GIVE_NOAH
    Gives the character Noah.
    Use: E GIVE_NOAH 15000 ; Will give your character 15,000 noah
  • ROB_ITEM
    Will delete the item specified from the inventory.
    Use: E ROB_ITEM ItemIDHere ; Example : E ROB_ITEM 10100000
  • GIVE_ITEM
    Will give the item specified.
    Use: E GIVE_ITEM ItemIDHere ; Example : E GIVE_ITEM 10100000 1
  • RUN_EVENT
    RUN_EVENT Is mainly used for linking one event into multiple ones, will be shown in detail more below.
    Use: E RUN_EVENT 30601



IF / Check Functions
  • CHECK_EMPTY_SLOT
    Used to check if you have an empty slot in your inventory.
    Use: E CHECK_EMPTY_SLOT 0 ; Doing this will check if your inventory is full.
  • CHECK_STAT_TOTAL
    Will let you check how many stat points a person has between two numbers.
    Use: A CHECK_STAT_TOTAL 300 500 ; Will check if the char has between 300 and 500 points
  • CHECK_SKILL_TOTAL
    Will let you check how many stat points a person has between two numbers.
    Use: A CHECK_SKILL_TOTAL 100 110 ; Will check to see if the person has skill points between 100 and 110.
  • CHECK_MANNER
    Used for checking if the user has a certain amount of manner.
    Use: A CHECK_MANNER 500 2100000000 ; Checks if you have at-least 500 Manner points.
  • CHECK_DICE
    Used in conjunction with the ROLL_DICE command, you use the CHECK_DICE to tell it what to do when it lands on that certain dice number
    Use: A CHECK_DICE 1 ; If dice is 1, do this ..
  • CHECK_CLAN_GRADE
    Used to check the clan's grade, can check if they're between Grade 1-3, Grade 4-5 etc.
    Use: A CHECK_CLAN_GRADE 1 3 ; Checks if the clan is between grade 1 and 3.
  • CHECK_LOYALTY
    Checks if you have the right amount of loyalty between the two numbers specified
    Use: A CHECK_LOYALTY 100 1000 ; Checks if you have between 100 and 1000 Loyalty.
  • CHECK_NOCLASS
    Checks to see if you're not in the specified classes
    Use: A CHECK_NOCLASS 107 207 -1 -1 -1 -1 ; Now, the -1's mean a value that's not going to be used, there are 6 possible values for this, and we only specified 2, so we put a -1 where we aren't using anything. This is basically saying, It's checking if you're not a Human or Orc Rogue that's not mastered.
  • CHECK_PROMOTION_ELIGIBLE
    Checks to see if you're eligible to get your masters quest.
    Use: A CHECK_PROMOTION_ELIGIBLE ;
  • CHECK_EXIST_EVENT
    You can use this to check if the quest has been ever been started, been accepted and not finished, or has been completed.
    Use:
    A CHECK_EXIST_EVENT 30 0 ; If event 30 hasn't been received/started, continue..
    A CHECK_EXIST_EVENT 30 1 ; If the event 30 has been received, but not finished, continue..
    A CHECK_EXIST_EVENT 30 2 ; Checks to see if the event 30 has been finished or not.

  • CHECK_NATION
    Used to check a characters nation.
    Use: A CHECK_NATION 1 ; Checks to see if the character is an orc, swap the 1 out for a 2 for checking if the character is a Human.
  • CHECK_NOAH
    Used to check if the character has noah between the two numbers specified
    Use: A CHECK_NOAH 25000 2100000000 ; Will check to see if you have atleast 25,000 Noahs.
  • HOWMUCH_ITEM
    Used to check how much of an item you have, only works for stackable items.
    Use: A HOWMUCH_ITEM 379007000 0 20 ; Will check if you have between 0 and 20 of the Item : 379007000.
    A HOWMUCH_ITEM 379007000 21 9999 ; Will check if you have atleast 21 of the item.

  • CHECK_LV
    Used to check if you're between the levels specified
    Use: A CHECK_LV 1 9 ; Will check if you're between level 1 through 9.
  • CHECK_WEIGHT
    Used to check if you have enough room for the item you want to give.
    Use: A CHECK_WEIGHT 379007000 10 ; Will check if you have enough room for that item with a stacksize of 10.
  • CHECK_CLASS
    Used to check if you're in the specified classes, can specify up to 6 classes.
    Use: A CHECK_CLASS 102 107 108 202 207 208 ; Checks if you're a Beginner Rogue, Rogue, or a Mastered rogue.
    A CHECK_CLASS 107 207 -1 -1 -1 -1 ; Checks if you are a Rogue, Orc or Karus. Since only 2 of the slots are used, we place four -1's.

  • CHECK_NOEXIST_ITEM
    Used to check if you don't have an item.
    Use: A CHECK_NOEXIST_ITEM 205002007 1 ; Checks if you don't have the item : 205002007
  • CHECK_EXIST_ITEM
    Used to check if you have an item.
    Use: A CHECK_EXIST_ITEM 205002007 1 ; Checks if you have the item : 205002007



If I missed some of them above, that means I haven't taken the time to figure out what it does. I'm sure if you spend some time on it you'll be able to figure them all out, but I really couldn't care too much about the rest to bother.
ctgwglzc
2008-10-16 17:28:15
楼主
Examples and Explanations

Okay, lets say we want to make a NPC where you can turn in a Fragment in for some Bifrost items. I'm only going to use one fragment for this demonstration to save me some time and trouble. I'm going to try and explain everything in detail and hopefully you'll be able to understand how everything works.


FOR MORE:http://forum.ragezone.com/f465/guide-depth-evt-coding-462376/
709394
2008-10-16 17:40:23
CT,请问下登陆器哪下?可有单独下登陆器的连接?
ctgwglzc
2008-10-16 19:33:14
楼主
原帖由 709394 于 2008-10-16 17:40 发表
CT,请问下登陆器哪下?可有单独下登陆器的连接?

http://www.91files.com/?4YX69PI4TIDKBQHLZ32U
222333
2008-10-17 05:10:34
请问CT你发的登陆跟别的登陆器有区别的没??
bwzz
2008-10-17 08:22:04
看样子像是个详细的功能介绍。。。可是E文不行啊!那位大大给汉化一下^_^
ctgwglzc
2008-10-17 09:36:58
楼主
原帖由 222333 于 2008-10-17 05:10 发表
请问CT你发的登陆跟别的登陆器有区别的没??

无,只是加了密不会被杀毒软件杀掉
原帖由 bwzz 于 2008-10-17 08:22 发表
看样子像是个详细的功能介绍。。。可是E文不行啊!那位大大给汉化一下^_^

有空再汉化,先转来
ymhuang
2008-10-17 10:46:45
我翻译了部分:

------------------------------------------
Introduction介绍

So, you're probably asking yourself, "what is EVT Coding?" EVT coding is the coding language for any quest-related things to do with Knight Online. It has tons of potential, and I'll be explaining what all the functions/commands do and how you would use them.
所以你可能会疑惑“EVT文件到底是做什么的”,我告诉你, EVT是在KO中用于与"任务"(这下编辑任务脚本有望了!)相关的编程语言。它非常有用,我将详细地介绍他们,以对你有所帮助。

I'm warning you right now, this is a bit of a long read and EVT coding is very time consuming, so unless you've got time, I wouldn't bother.
同时,这篇教程读起来也非常枯燥和耗时,如果你不介意,我也无所谓


Functions/Commands命令

Basic things you should know :
基本知识
A is used anytime you're using a IF / Check function
A 字母用与IF函数
E is used anytime you're using an event function
E 字母用于事件驱动
; is used for commenting - Example
E RUN_EVENT 10601 ; You can write notes here..
;用于注释
-1 is used for noting a space that isn't used, if you're not using one of the supplied spaces you'll have to put a -1.
-1用于标示不用的空格(有的命令或许有参数,如果该参数不输入,则用-1代替
例如 A CHECK_CLASS 107 108 102 207 208 202;有6个参数输入
你只想CHECK107 108两个职业,需要用4个-1来补空参数,A CHECK_CLASS 107 108 -1 -1 -1 -1)
ALL of EVT Coding must be done in capital letters.
全部EVT代码都要使用大写字母!!
------------------------------------------
非常感谢CT,我还有几个问题:
#1 如何添加NPCSAY脚本(我意思是怎么才能使编写好的NPCSAY在游戏里面生效?)
#2 NPCSAY能够编写任务脚本,我理解正确吧?(EVT可以哟,个人理解!)
#3 这些EVT文件,我在map文件夹下面都有看见,我怎么使之在游戏里面生效?(好像是服务端可以自己执行的,主要将EVT文件放在MAP文件下)

谁有ITEM_EXCHANGE表共享一下给我啊,我服务器端数据库里面没有这个表啊

[ 本帖最后由 ymhuang 于 2008-10-17 13:49 编辑 ]
12下一页
高级模式
游客