Secret script commands Description
proc_start, proc_end
proc_start n:
Script starts, n script numbered from 0 to 15
0: The current script is initialized
1: is the entrance of the script.
2 to 15: other process script
proc_end
End script
proc_start and proc_end these two must be paired.
Examples:
proc_start 0
// Initialization script
proc_end
proc_start 1
// Start running script entry
// Do something
jump 2
proc_end
proc_start 2
// Do something
proc_end
=, + =, - =, * =, / =
Setting Variables
x = n
When x is a number
0-5999: Custom Variables (3000 to 5999: Task variables)
n is the value
Note: Players variable range of 0 to 5999 are as follows: -127 ~ + 127
Global variables and temporary variables in the range: - 2147483647 + 2147483647
3000 3000 = 0 // set variable to 0
2000 + 2000 = 3 // variable with the number 3
1000-- = 11 // The variable minus 11, 1000
100 * = 2 // to the 10th variable multiplied by 2
1000 / = 10 // variables except for the 1000 No. 10
When x is a string
Set the current trigger script player's attributes
name = name
Name = Nobunaga
Name can not be more than 15 or 30 alphanumeric characters
HeaderName = captain name
Dlg 0 Your captain is:% s HeaderName
DstPlayerName = target player name
Dlg 0 target player yes yes:% s DstPlayerName
Pos = x coordinate of the y-direction
Pos = 59 128 6
x and y coordinates of the current map coordinates
Direction from 0 to 7 (right, upper right, upper, left, left, left, down, right)
map = map number
Map = 2
model = model number
Model = 5017
Level = Level
Level = 20
Profession = occupation numbers
Profession = 1 (occupation number View <Table 1>)
Sex = gender Number
Sex = 0 (sex # for <Table 1>)
CityMaster = Liang city occupied guild name
BC beam current city occupiers is% s CityMaster
GuildName = Association name
BC you now belong to% s Association GuildName
[key] number of operations
[key] as follows:
money: Money
exp: Experience
skillexp: Skills Experience
con: physique
str: strength
dex: Agility
int: Intelligence
mgc: Magic
lky: Luck
hp: Life quantity
mp: Magic amount
integral: Integral
silver: silver (= invalid, only + = or - =).
Operations are:
+ =: Canada
- =: Less
=: Same
Such as:
money + = 100
hp - = 20
mp + = 10
if, else, endif
if: conditional, which appeared three directives must match
else: turning
endif: end judgment.
If [key] value logical operators
[key]
1) When the [key] is a digital time
For players who variables (0 to 4095)
2) When the [key] is a string
Properties for players (with Set [key] of [key])
Logical Operators
>: Greater than
> =: Greater than or equal
<: Less than
<=: Less than or equal
==: Equal
! =: Not equal
if money> 1000
// Set up the conditions to do
Else
// Condition is not satisfied to do something
endif
call n
Call a number of scripts, when the script is finished, return to local calls, and then continue down
n: number Scripts
call 3
3 Call finished script returns
jump n
Jump to a number of script, the script is finished when the place, do not return calls. (Note the difference and call in)
n: number Scripts
jump 3
3 Call finished script does not return
return
Returns the current script
dlg 0 text $ m
Dialog box is displayed.
Parameters:
The first parameter of 0 indicates there is under sentence of 1 indicates that the last one
The second parameter is the conversation
The third parameter is the variable to N
dlg 0 show "Next" button
dlg 1 shows "close button"
var $ x
$ x = 10
dlg 1 to% s of bread, my name is% s $ x name
NOTE: The next variable will be displayed instead of% s, the results for "bread is 10, my name is WitSun"
Talk time color text
In Active Scripting player screen displays information
time: time display (in milliseconds, 1000 milliseconds = 1 second)
color: the color of the word
text: Information Content
Talk 10000 0xffff0000 you okay :)
TalkAll time color text% s $ n
Displays information on the screen of all players
The meaning of the parameters with "Talk" command
TalkAll 10000 0xffff0000 you have an item $ n% s
TalkTeam time color text% s $ n
In the current ranks of the screen displays information for all players (not just your own team display)
The meaning of the parameters with "Talk" command
TalkTeam 10000 0xffff0000 you have an item $ n% s
TalkArea mapid x y time color text% s $ n
Players of the screen displays information in the designated area
Mapid: Map ID
x, y: coordinates of the region
The meaning of the parameters with "TalkAll" command
TalkArea 0 3 4 10000 0xffff0000 you have an item $ n% s
Tell text
text: Information Content
Players chat box to display information
Tell you okay :)
flytomap id x y
Immediately fly to the designated place,
Id: map number (-1 indicates that the current location map)
x, y: coordinates of the map
Flytomap 1 45 47
1: Map ID
45: x coordinate of the map
47: y coordinates for the map
ask
Arranging a plurality of selection items
[var] = ask the prompts Option 0 Option 1 Option 3 Option n
[var]: for system variables
Var _n
_n = Ask the option to test Shanghai Beijing Shenzhen
if _n == 0
dlg you choose Shanghai
else
endif
if _n == 1
dlg you choose Beijing
else
endif
if _n == 2
dlg you choose Shenzhen
else
endif
RemoveAllEquip
Remove all equipment
RemoveAllItem
Remove all the props
Shop_Item id price mincount maxcount percount x
Set up shop selling goods (used in conjunction with the Shop instructions)
id: Item ID
price: The price of their goods (-1 read from the table into the SLK)
mincount: minimum number of items (inventory)
maxcount: The maximum number of items (inventory)
percount: The number of items sold
X: Items activity (55 to 100)
Shop_Item 5700 10 60 5 80
Said:
5700: Item ID
10: The basic price
60: The maximum number of stock
5: The number of each lot sold
80: 80% activity
Shop id rate type
Trading Directive (Directive conjunction with Shop_Item)
id: store ID, each store has its own unique ID, ranging from planning regulations (ID can not be repeated)
rate: Items refresh period (minutes)
type: NPC recovery type of item (see <Table 1> represents any items to -1)
Shop_Item 5700 10 60 5 80
Shop_Item 7715 100 60 5 80
Shop 1 30 -1
Said: ID5700 shops selling items, and items ID7715
1: Shop unique ID
30: refreshes every 30 minutes store items, if the current is less than 30% of the merchandise, they make up the number, or do not make up
-1: Indicates store any type of recycling materials
HaveThisItem
Determine whether the props
Var _n
_n = HaveThisItem knife
_n: variable, returns the number of
RemoveThisItem
Props removed from the parcel
RemoveThisItem armor 3
3: Remove all the props number
-1 To remove all the props
IsThisItemEquipped
Determine whether the props are equipped
Var _n
_n = IsThisItemEquipped armor
_n: variable, returns the result (return 0 for no, 1 is returned)
IsThisSkillActived
Determine whether the player has the skills
Var _n
_n = IsThisSkillActived 1090 1
1090: Skills ID
1: skill level
_n: variable, returns the result (return 0 for no, 1 is returned)
BC apple number% s $ n
Broadcast content to all players
BC everyone okay
SetBornPoint
Set point of birth
SetBornPoint 1 30 40
1: Map ID
30,40: map coordinates
TeachSkill
Learning Skills
TeachSkill 1000 1001 1001
1000,1001,1002: For skill ID
Up to 64
Add_Item
Players get a certain kind of props
Add_Item sword 1
Broadsword: Props name
1: The number of
Can_get_new_quest
Can I take a new task
Var _n
_n = Can_get_new_quest
_n: variable, return values, one for Yes, 0 for No
Cancel_quest
Cancel mission
Cancel_quest 3000
3000: for task variables
Done_quest
To complete the task
Done_quest 3000
3000: for task variables
Set_quest_state
Set the task status
Set_quest_state 3000 1
3000: for task variables
1: task status, as a system variable, the return value
0: Not to take over the task
-1: Completed tasks
1 to 254: Task process
Get_quest_state
Made the task status
Var _n
_n = Get_quest_state 3000
3000: for task variables
_n: task status
Relate_quest id state enter
Related tasks
id: Task ID
state: task status
enter: script entry
Relate_quest 3000 1 2
3000: for task variables
1: Task Status
2: feet into the entrance
Note:
NPC script task initialization want to "own task state interest" in connection
Such as:
proc_start 0
relate_quest 3000 0
relate_quest 3000 3
proc_end
Var $
Variable declaration
Var $ n
Var $ g_n
$ n: for temporary variables
$ g_n: for system variables
Preceded by a temporary variable identifier '$'
System variables '$ g_' beginning
Such as:
Var $ m
$ m = 100
if $ m == 100
else
endif
RefreshMonster
Brush strange
RefreshMonster n x y m
n: Map ID (when n is -1, said the refresh trigger scripts player or monster strange location map)
x, y: small map number
m: Block ID
Such as:
RefreshMonster 0 3 4 3
No. 0 Map 3,4 numbered blocks 3 brush strange
(To be edited in MonsterConfig.exe in advance)
PlayMusic
Play music
PlayMusic n filename
n:
0: Play time
1: Repeat
-1: Stop playing
filename: Music filenames
Such as:
PlayMusic data / music / 1.mp3
{# FFFF0000 = text #}
The basic format using the "{}" braces
"#" Character represents the hexadecimal
In the "#" followed by eight hexadecimal notation (hexadecimal --0 ~~ F), every 2 represents a color
"00" stands for all through
"FF" on behalf of the real impervious
According to an arbitrary value between "00 ~ FF"
Specify:
2 2 2 2
↓ ↓ ↓ ↓
Transparent channel RGB
Examples: {# FFFF0000 = text #}
The effect is the formation of the "text"
Location: Place Name {# FFFF0000 = text #}
Names: character name {# FFFFFF00 = text #}
Props: Props name {# FF00FF00 = text #}
Event: Event Name {# FFFF9900 = text #}
// Hyperlink
Text h} {h
Examples: {h mayor h}
Forming effect: mayor
MakeItem
Synthesis / refining / strengthening
MakeItem NeworOld rate count id1 id2 ...
NeworOld: 1 is a new synthetic 0 is old (temporarily all to 0. That is all old synthetic!)
rate: NPC additional synthetic odds
count: There are a few behind ID
id1 id2 ...: Each recipe ID
(Up to 32 groups)
Rand
Random value extraction
Rand X X is a variable value (1 to 32767)
Assuming ranging rand 10 (0-9)
Var $ n
$ n = rand 2
if $ n == 0
else
endif
GetCharCount x
Get a quantity x number of players and NPC's map
GetCharCount n
n: Map ID
Var $ n
$ n = GetCharCount 3
// Get the number of players on the 3rd map
if $ n == 0
else
endif
Note: It is (player + NPC) Number
ShowQuestDlg
Task dialog box is displayed
$ n = ShowQuestDlg Do you have anything else?
$ n: the return value
-1: Not available tasks
0: The user does not select a task
Other: The task ID number
proc_start 0
relate_quest 3000 0 1
relate_quest 3000 1 2
relate_quest 3001 1 1
proc_end
proc_start 1
var $ n
$ n = ShowQuestDlg Do you have anything else?
If $ n == -1
No task Dlg 1
Else
Endif
If $ n == 0
Dlg 1 you did not select a task
Else
Endif
If $ n == 3000
Dlg 1 task you choose No. 3000
Else
Endif
proc_end
UseSkill id level
Use skills
Id: Skill ID
Level: Skill level
UseSkill 1024 1
PopNpcList
Displays the current map NPC list
PopNpcList
AddSkill
Adding skills
AddSkill 1000
1000: For skill ID
GetWorldTime time type
Obtaining secret time or real time
time for: Year: Year (2006->?)
Month: month (1 to 12)
Week: Week (0-6)
Day: Day (1 to 31)
Hour: When (0 to 23)
Minute: engraved (0 to 59)
type is: 0: secret time
1: Real Time
Note: For weeks, 0 for Sunday, and the real time is valid only for a week, the secret No week.
var $ n
$ n = GetWorldTime Day 0
GetBirthday type
Players get birthday (secret time)
type is: Year: Year
Month: May
Day: Day
var $ n
$ n = GetBirthday Day
NpcMoveNext
Let NPC to move to the next point
NpcMoveNext
NpcStopMove
Let NPC stop moving
NpcStopMove
NpcStartMove
Let NPC continues to move
NpcStartMove
NpcPlayAnim name count end npcid
Let NPC to do an action (the firing angle of the player's only visible)
Name: Name of the action
Count: The number of times to do this action
End: End action name
npcId: NPC's ID (-1 indicates the current NPC)
NpcPlayAnim sayhello 4 idle -1
NpcPlayAnimForAll name count end npcid
Let NPC to do an action (see all visible players)
Name: Name of the action
Count: The number of times to do this action
End: End action name
npcId: NPC's ID (-1 indicates the current NPC)
NpcPlayAnimForAll sayhello 4 idle -1
CanLearnSkill id level
Determine whether learning a skill
id: Skill ID
level: skill level (from a start!)
Var $ n
$ n = CanLearnSkill 1000 1
ShowBank
Players banks obtain information.
ShowBank
DoRide id
Ride ride
id: horse ID
DoRide 1000
GetRideId
Get mounts ID
-1 Means no mounts
Var $ id
$ id = GetRideId
SetDialogName name
Display name of the dialog box
name: name
SetDialogName bible
SetHotkey index id
Set hotkey
Index: The index to be placed hotkey
Id: Hotkey ID
SetHotkey 0 1000
SetStorage
Players access goods to the warehouse, NPC's name, please fill in the name of the local city to mark the city
SetStorage
LogInfoToDB info
The information stored in the database
Returns: 0 fails, a success
Var $ return
$ return = LogInfoToDB play Po activity (% s-% s-% s-% s) $ a $ b $ c $ d
GetTeamPlayerCount
The number of players to get the team
The return value is at least one person, that is, their own
Var $ count
$ count = GetTeamPlayerCount
GetTeamID
Get the team ID
-1 Is not contingent
Var $ id
$ id = GetTeamID
GetTeamPlayerLevel x
Get the team players level
x: 0: lowest rating
1: The highest level of
Var $ level
$ level = GetTeamPlayerLevel 0
SetTeamVar key var
Setting team variables
Key: variable name
Var: Value
SetTeamVar 500 1
GetTeamPlayerID index
ID to obtain a member of the team
Index: Index members
Note: If this team has three individuals, that index is 0,1,2
And the captain of the index number 0
Var $ count
$ count = GetTeamPlayerCount
If $ count == 2
Var $ id
$ id = GetTeamPlayerID 1
Else
endif
GetCurPlayerID
Get the current script player ID
Var $ id
$ id = GetCurPlayerID
GetPlayerVar id key
Players get variables
Id: Player ID (-1 said he)
Key: Variable
Var $ id
$ id = GetTeamPlayerID 1
Var $ hp
$ hp = GetPlayerVar $ id hp
SetDstPlayer id
Setting the target audience (for display DstPlayerName)
Id: Player ID
Var $ id
$ id = GetTeamPlayerID 1
SetDstPlayer $ id
CreateMonster mapid xyr bodysize index num
Create a monster
Mapid: Map ID (-1 indicates that the current map)
x, y: map coordinates (MapId, X, Y are the coordinates of -1 indicates that the current player)
r: Radius
bodysize: body size
index: Monster Index
num: number of monsters
CreateMonster 0 100 100 20 1 100 2
CreateSpecialMonster mapid xyr bodysize index num
Players create exclusive monster
Mapid: Map ID (-1 indicates that the current map)
x, y: map coordinates (MapId, X, Y are the coordinates of -1 indicates that the current player)
r: Radius
bodysize: body size
index: Monster Index
num: number of monsters
CreateSpecialMonster 0 100 100 20 1 100 2
GetNullItemCount
The number of spaces to get the backpack
Var $ n
$ n = GetNullItemCount
ReleaseMap second
Release copy of the map
Second: start after a few seconds release (0 means no release)
ReleaseMap 60
Sleep time
Late run the following script
time: delay time, in milliseconds
Sleep 5000
GetGuildId
Get guild ID
$ id = GetGuildId
CallScript file scriptid playerid
Call the specified script
file: script file name
scriptid: script entry ID
playerid: Player ID (-1 said he)
CallScript Script \ abc.s 2
CloseDlg
Close the current NPC dialog
CloseDlg
GetMapId
Players get current map ID
Var $ id
$ id = GetMapId
IsInZone name
Determine whether the player within a block area
Name: Block Name
Returns: 1 yes, 0 no
Var $ b
$ b = IsInZone name1
If $ b == 1
Elseif
endif
PlayEffect name
Play effects
Name: effect file
PlayEffect Common / LevelUp.ini
ShowIntonateBar time
Article singing show
time: time (ms)
Dlg 0 111
ShowIntonateBar 3000
Dlg 0 222
GetGuildInfluenceID
Get guild camp ID
-1 Means no camp (eg no guild)
Now the two camps, with a 0
0 Mohist one will be any
Var $ id
$ id = GetGuildInfluenceID
AddPkValue
Increase the value of justice
AddPkValue 10
DecPkValue
Reduce the value of justice
DecPkValue 10
SetPkValue
Set the value of justice
SetPkValue 10
GetPkValue
Get the current value of justice
Var $ value
$ value = GetPkValue
GetPkState
Gets the role of the current status of PK
0 Blue name
An ordinary
2 gray name
3 red name
Var $ value
$ value = GetPkState
OPenClientUI
Open Client section
OPenClientUI value
0 // do not open any UI
// Open a storybook
2 // Open Society icon
3 // Open brothers
4 // open the full-service announcement interface / bc
5 // Open propaganda regional servers squared / h
6 // Open shouting area with full service / sh
7 // Open strengthen interface
8 // Open unbind interface
9 // Open decomposition interface
10 // Open a grapevine interface
11 // Open grapevine interface 2
12 // Open grapevine Interface 3
13 // Open grapevine interface 4
14 // Open grapevine interface 5
15 // Open grapevine interface 6
16 // Open grapevine interface 7
17 // Open grapevine interface 8
18 // Open grapevine interface 9
10 19 // Open grapevine interface
20 // Open strengthen lock screen
21 // Open beasts mountain reward interface
OPenClientUI 0/2 ......
GetPlayerSociety iplayerId nValue
Get and the player who has the appropriate number of relationships
Number of players iplayerId
nValue 0 Friends
A husband and wife
2 brothers
3 master
4 apprentice
Counts = GetPlayerSociety p1_ID 1
Counts of the number of couples, in order to determine whether the player p1_ID this marriage
NotarizationSuccess player1ID player2Id nValue
Player1 player2 as the relationship
nValue 0 Friends
A husband and wife
2 brothers
3 master
4 apprentice
Note unilaterally, if it is necessary to write twice married
NotarizationSuccess p1_ID p2_ID 1
NotarizationSuccess p2_ID p1_ID 1
p1_ID and p2_ID married
GetBagSize
The number of cells obtained backpack
Var $ n
$ n = GetBagSize
AddBagSize n
Adding plaid backpack
n: number of
AddBagSize 1
GetGuildCredit
Honor Society where value
Var $ n
$ n = GetGuildCredit
GetMyGuildOffer
Get your own contribution to the value in the Association of
Var $ n
$ n = GetMyGuildOffer
GetGuildLevel
Get guild rank
Var $ n
$ n = GetGuildLevel
AddGuildCredit n
Increase the guild honor
AddGuildCredit 100
DecGuildCredit n
Reduce guild honor
DecGuildCredit 100
AddMyGuildOffer n
To increase their contribution to the value in the Association of
AddMyGuildOffer 100
DecMyGuildOffer n
Reduce their own contribution to the value in the Association of
DecMyGuildOffer 100
IsGuildMaster
Judge he is not guild
Var $ n
$ n = IsGuildMaster
1: is
0: No
IsNpcPlayAnim npcid name
NPC determine whether it is an action
npcId: NPC's ID (-1 indicates the current NPC)
name: the name of the action (end action with NpcPlayAnim command name)
In return values: 0 is not; 1 is
Var $ n
$ n = IsNpcPlayAnim -1 sayhello
NoticeNotarizationResult iPlayer1 pszAnd iPlayer2 pszText nMapId nX nY time color
Notice player1 and player2 reached what relationship
iPlayer1: 1 Number of players
pszAnd: conjunctions, for example: "and", "and", "right"
iplayer2: 2 Number of players
pszText: Event statement
TalkToAear function reference
nMapId:
nX:
nY:
time:
color
IsEverybodyAllReady iplayId ivalue
Determine whether the captain brought the team standard
iplayId: Captain id
nValue 0 Friends
A husband and wife
2 brothers
3 master
4 apprentice
In return values: 0 is not; 1 is
Var $ b = IsEverybodyAllReady id 5
IsEverybodyAllHere
Determine whether the captain of the team brought in a range of distance 10
In return values: 0 is not; 1 is
Var $ here
$ here = IsEverybodyAllHere
IsMapActive mapid
Determine whether the copy of the map are the players already exist
Mapid: Map ID
Returns: 0 does not exist, an existence
Var $ n
$ n = IsMapActive 9
GetMapCount mapid
Get the current map (a copy of) the number of
Mapid: Map ID
Returns: the number of
Var $ n
$ n = GetMapCount 9
Startloggingmovepath start recording path
stoploggingmovepath end recording path
Video, the two instructions in the game input, with GM directive, the head and tail to be recorded
DoHitch X X1
Video launched, files are automatically saved under the CLIENT, uploaded to the SERVER \ Data \ TrafficRoutePath directory path filled to SERVER \ slk \ traffic.slk in
X: horse ID
X1: 0 starting point; an end
OpenReputeFlag index
Open a player's name, the title of the first three is enabled by default couples, brothers, mentoring, so index must be greater than 3, the specific name in the query reputelist.slk Note: Currently supports up to 27 titles
OpenReputeFlag 5
CreateProtect id
Creating escort blame
Id: Monster index ID
CreateProtect 1000
LostProtect
Lost escort blame
LostProtect
GetProtect
Get escort strange ID,
The return value is -1 indicates no
$ id = GetProtect
SetRankFlag (index, value)
Set a player's title, the specific name in the query ranklist.slk
SetRankFlag 5 8
GetRankLevel (index)
Get a title of a player's current level, the specific name in the query ranklist.slk
$ level = GetRankLevel (3)
RequestGuard [temporary use]
City defenders apply Liang Fang
RequestGuard
RequestAttack [temporary use]
Liang Fang apply to become a city siege
RequestAttack
IsCityMaster
Determine whether the player is not a part of the beam City occupiers
$ ismaster = IsCityMaster
IsGuardGuild
Determine whether the player is not a part of the city defenders Liang Fang
$ isguard = IsGuardGuild
IsAttackGuild
Determine whether the player is not a part of the city siege Liang Fang
$ isattack = IsAttackGuild
RequestGuardFlag
City defenders before war began opening party logo
RequestGuardFlag
RequestAttackFlag
City siege warfare began to open before the party logo
RequestAttackFlag
GetBattleScore
Society has made urban warfare they belong integral currently available
Var $ n
$ n = GetBattleScore
GetAttackGuildNum
At present, the Association has made a successful attack on the registration number of the beam City
BC
GetAttackGuildName
City battle to succeed guild name registration
Name1 = GetAttackGuildName 0
Name2 = GetAttackGuildName 1
BC attack the city's participation in the beam of the Society have% s% s Name1 Name2
BattleStart
City war began
BattleStart
BattleEnd (int Fail)
End urban warfare
BattleEnd 1 city end of the war, the city was broken beams
BattleEnd 0 city war ended, the city has not been broken beams
IsHaveStatus
Determine whether the player has a certain state
Example: the players who determine whether the state preserved egg porridge, preserved egg porridge for state ID 2914
$ status = IsHaveStatus 2914
Note 1: View script variables in the game way in the chat box, enter "/ var variable name."
Such as:
/ var 1000
/ var $ n
Note 2: The range of variables
Role variables (task status and count variable): -127 ~ +127
Temporary variables: -2147483647 ~ +2147483647
System variables: -2147483647 ~ +2147483647
Table 1:
Item type number
0: Recovery Drug
1: Weapon
2: Armor
8: Reel
9: Material
10: Medal
12: Tools
13: Gem
Occupation Number
0: Assassin
1: Warrior
2: Hunter
3: The Alchemist
4: Priest
Sex Number
0: Male
1: Female
Number of weapons
0: fist, the equivalent of unarmed
1: Swords
2: Two-Handed Swords
3: Longbow
4: Guns, Crossbows
5: sticks
6: Dagger
7: Shield
8: Gloves
9: One-Handed Axes
10: Two-Handed Axes
Armor Number
0: Hair
1: Helmet
2: Face
3: Armor
4: Gloves
5: Shoes
6: The left hand goods
7: right items
8: Headwear
9: Shield
10: Shoulders
11: Leggings
12: Ring
13: bracelet
14: Necklace
15: Belt