forked from SkyStars/LoE-PrivateServer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
QuestScript.txt
executable file
·99 lines (93 loc) · 4.05 KB
/
QuestScript.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
=> Since I'm a faggot, I'll make my own NPC script and interpreter :
==> Filenames should be XXName where XX is id of the quest. Not mandatory.
==> Have a quest struct wich remembers qstringlist of commands, quest id/name/descr/state and EIP. Each player has a copy
==> EIP should be reset everytime you start a new conversation with a NPC. Don't resume from the last time.
=> Lines starting with # are comments. No midline comments tho.
One command per line, arguments separated by spaces
Commands :
say msg : NPC says message msg
sayName name : The message will be said by this NPC.
sayIcon emotionId : The message will use the avatar/icon for this emotion if it exists.
answer dest msg : Answer for previous message, goto label dest if selected
goto label : Jumps to the label
label name : Creates a label you can jump to. No spaces allowed in the label name.
give itemId qty : Give qty items with this itemId. Can be <0 to take items from the player.
giveBits qty : Give qty bits. Can be <0 to take bits from the player.
hasItem item yes no : Jump to yes or no if player has this item
hasItem item qty yes no : Jump to yes or no if player has qty of item
setQuestState state : set the quest state, will be saved on the savegame
setQuestState state id : set the state of quest id, will be saved on the savegame
gotoIfState state dest : Jumps to dest if the quest's state is state
gotoIfState state id dest : Jumps to dest if the state of the quest with this id is state
gotoAfterState state dest : Jumps to dest if the quest's state is >= state
gotoAfterState state id dest : Jumps to dest if the state of the quest with this id is >= state
hasBits qty yes no : Jumps to yes or no if player has qty bits
questName name : Name of the quest.
questId id : MUST be unique. Used in the savegame and by other quests/npcs.
questDescr txt : Description of the quest.
teleport x y z : Teleport at given pos
teleport x y z rx ry rz rw : Teleport at given pos/rot
teleport x y z scene : Teleport on scene at given pos
teleport x y z rx ry rz rw scene : Teleport on scene at given pos/rot
name txt : Name of the NPC
ponyData data : PonyData of the NPC in base64. Use getPonyData to get it.
scene txt : Scene where the NPC is
pos x y z : Pos of the NPC
rot rx ry rz rw : Rot of the NPC
wear itemId... : Add items to be worn by the NPC
shop itemId... : Add items to be sold by the NPC
end : end of conversation
Special variables. Use these in a 'say' or 'answer' command :
$PLAYERNAME - Name of the player's pony
An 'answer' should always be following a 'say' or another 'answer'.
When reaching a 'say', we send the say and all the answers under it, then wait until the client clicks/answers.
If a 'say' has no answers, we still send it and wait until the client clicks to continue.
And I cannot stress this enough, quest IDs MUST be unique.
If they aren't, somes NPCs may have their scripts mixed up and share the same save, with unexpected consequences.
If you want to add new NPCs, you should give them a high quest ID from the start (e.g. 50 and onward),
so that they won't conflict with the private server's 'official' NPCs even in later updates.
It's a bad idea to create a player with the same name as a NPC.
This will confuse the game, and might break the chat and quests for this player until the name is changed.
List of emotions (emotionId), used with the 'sayIcon' command.
This will only work if there is an actual avatar corresponding to the given emotion and NPC name.
At the moment, there are only avatars for the main NPCs and only certain emotions.
The avatars/icons are in the file resources.assets of the game client.
Afraid = 2
Angry = 3
Blank = 8
Bored = 9
Concerned = 38
Confident = 25
Confused = 20
Covertous = 36
Crazed = 17
@Default/Neutral/None = 0
Depressed = 27
Derp = 32
Disgusted = 15
Drunk = 30
Excited = 10
Flirty = 28
Greedy = 19
Happy = 1
Hopeful = 23
Incredulous = 33
Introspective = 31
Irritated = 16
Lovestruck = 37
Mischievious = 5
Nervous = 14
Paralyzed = 34
Pouty = 18
Proud = 12
Relaxed = 13
Sad = 4
Sarcastic = 29
Serious = 7
Shocked = 21
Sick = 35
Silly = 11
Smug = 24
Sorry = 26
Surprised = 6
Tired = 22