-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathrpg_jobs_core.inc
207 lines (145 loc) · 3.68 KB
/
rpg_jobs_core.inc
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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
#if defined _rpg_jobs_core_included_
#endinput
#endif
#define _rpg_jobs_core_included_
/*
Register a new job - do this OnPluginStart
@Param1 -> char jobname[128]
@Param2 -> char jobdescription[512]
@Param3 -> int maxJobLevels
@Param4 -> int jobExperiencePerLevel
@Param5 -> float jobExperienceIncreasePercentagePerLevel
@return none
*/
native int jobs_registerJob(char jobname[128], char jobdescription[512], int maxJobLevels, int jobExperiencePerLevel, float jobExperienceIncreasePercentagePerLevel);
/*
Gets a clients job
@Param1 -> int client
@Param2 -> char jobBuffer[128]
@return none
*/
native void jobs_getActiveJob(int client, char jobBuffer[128]);
/*
Check if the given job is the Active
@Param1 -> int client
@Param2 -> char job[128]
@return true or false
*/
native bool jobs_isActiveJob(int client, char job[128]);
/*
Get current Job experience
@Param1 -> int client
@return none
*/
native int jobs_getExperience(int client);
/*
add to current job experience
@Param1 -> int client
@Param2 -> int amount
@Param3- > char jobname[128];
@return none
*/
native void jobs_addExperience(int client, int amount, char jobname[128]);
/*
removes experience from the client
@Param1 -> int client
@Param2 -> int amount
@Param3- > char jobname[128];
@return none
*/
native void jobs_removeExperience(int client, int amount, char jobname[128]);
/*
Get current Job level
@Param1 -> int client
@return int current_job_level
*/
native int jobs_getLevel(int client);
/*
Gets the Experience needed for the next level
@Param1 -> int client
@return none
*/
native int jobs_getExperienceForNextLevel(int client);
/*
Starts the progressbar
@Param1 -> int client
@Param2 -> int time
@Param3 -> char info[64]
@return none
*/
native void jobs_startProgressBar(int client, int time, char info[64]);
/*
Returns if the Progressbar is active
@Param1 -> int client
@return true or false
*/
native bool jobs_isInProgressBar(int client);
/*
Gives a Job to a client
@Param1 -> int client
@Param2 -> char jobname[128]
@return none
*/
native void jobs_giveJob(int client, char jobname[128]);
/*
Quits the current job of the client
@Param1 -> int client
@return none
*/
native void jobs_quitJob(int client);
/*
Stops the progressbar
@Param1 -> int client
@return none
*/
native void jobs_stopProgressBar(int client);
/*
Set the Client Job info
@Param1 -> int client
@Param2 -> char info[128]
@return none
*/
native void jobs_setCurrentInfo(int client, char info[128]);
/*
Get the Client Job info
@Param1 -> int client
@Param2 -> char info[128]
@return none
*/
native void jobs_getCurrentInfo(int client, char info[128]);
/*
Forward on Job Accepted
@Param1 -> int client
@Param3 -> char jobname[128]
@return -
*/
forward void jobs_OnJobAccepted(int client, char jobname[128]);
/*
Forward on Job Quit
@Param1 -> int client
@Param3 -> char jobname[128]
@return -
*/
forward void jobs_OnJobQuit(int client, char jobname[128]);
/*
Forward on Client job levelup
@Param1 -> int client
@Param2 -> int newLevel
@Param3 -> char jobname[128]
@return -
*/
forward void jobs_OnJobLevelUp(int client, int newLevel, char jobname[128]);
/*
Forward on Client ProgressBarFinished
@Param1 -> int client
@Param3 -> char info[64]
@return -
*/
forward void jobs_OnProgressBarFinished(int client, char info[64]);
/*
Forward on Client ProgressBarInterrupted
@Param1 -> int client
@Param2 -> char info[64]
@return -
*/
forward void jobs_OnProgressBarInterrupted(int client, char info[64]);