-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathbot.proto
More file actions
517 lines (459 loc) · 16.9 KB
/
bot.proto
File metadata and controls
517 lines (459 loc) · 16.9 KB
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
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
syntax = "proto3";
import "google/protobuf/empty.proto";
import "google/protobuf/wrappers.proto";
package bot;
service BotService {
// --- Container.h ---
rpc GetItem(bot_GetItemRequest) returns (google.protobuf.UInt64Value);
rpc GetItems(google.protobuf.UInt64Value) returns (bot_Uint64List);
rpc GetItemsCount(google.protobuf.UInt64Value) returns (google.protobuf.Int32Value);
rpc GetSlotPosition(bot_GetSlotPositionRequest) returns (bot_Position);
rpc GetContainerName(google.protobuf.UInt64Value) returns (google.protobuf.StringValue);
rpc GetContainerId(google.protobuf.UInt64Value) returns (google.protobuf.Int32Value);
rpc GetContainerItem(google.protobuf.UInt64Value) returns (google.protobuf.UInt64Value);
rpc HasParent(google.protobuf.UInt64Value) returns (google.protobuf.BoolValue);
rpc GetCapacity(google.protobuf.UInt64Value) returns (google.protobuf.Int32Value);
rpc GetFirstIndex(google.protobuf.UInt64Value) returns (google.protobuf.Int32Value);
// --- Creature.h ---
rpc GetCreatureName(google.protobuf.UInt64Value) returns (google.protobuf.StringValue);
rpc GetManaPercent(google.protobuf.UInt64Value) returns (google.protobuf.UInt32Value);
rpc GetHealthPercent(google.protobuf.UInt64Value) returns (google.protobuf.UInt32Value);
rpc GetSkull(google.protobuf.UInt64Value) returns (google.protobuf.UInt32Value);
rpc GetDirection(google.protobuf.UInt64Value) returns (google.protobuf.Int32Value);
rpc IsDead(google.protobuf.UInt64Value) returns (google.protobuf.BoolValue);
rpc IsWalking(google.protobuf.UInt64Value) returns (google.protobuf.BoolValue);
rpc CanBeSeen(google.protobuf.UInt64Value) returns (google.protobuf.BoolValue);
rpc IsCovered(google.protobuf.UInt64Value) returns (google.protobuf.BoolValue);
rpc CanShoot(bot_CanShootRequest) returns (google.protobuf.BoolValue);
// --- Game.h ---
rpc SafeLogout(google.protobuf.Empty) returns (google.protobuf.Empty);
rpc Walk(google.protobuf.Int32Value) returns (google.protobuf.Empty);
rpc AutoWalkGame(bot_AutoWalkGameRequest) returns (google.protobuf.Empty);
rpc Turn(google.protobuf.Int32Value) returns (google.protobuf.Empty);
rpc Stop(google.protobuf.Empty) returns (google.protobuf.Empty);
rpc Move(bot_MoveRequest) returns (google.protobuf.Empty);
rpc MoveToParentContainer(bot_MoveToParentContainerRequest) returns (google.protobuf.Empty);
rpc Use(google.protobuf.UInt64Value) returns (google.protobuf.Empty);
rpc UseWith(bot_UseWithRequest) returns (google.protobuf.Empty);
rpc UseInventoryItem(google.protobuf.UInt32Value) returns (google.protobuf.Empty);
rpc UseInventoryItemWith(bot_UseInventoryItemWithRequest) returns (google.protobuf.Empty);
rpc FindItemInContainers(bot_FindItemInContainersRequest) returns (google.protobuf.UInt64Value);
rpc Open(bot_OpenRequest) returns (google.protobuf.Int32Value);
rpc OpenParent(google.protobuf.UInt64Value) returns (google.protobuf.Empty);
rpc Close(google.protobuf.UInt64Value) returns (google.protobuf.Empty);
rpc RefreshContainer(google.protobuf.UInt64Value) returns (google.protobuf.Empty);
rpc Attack(bot_AttackRequest) returns (google.protobuf.Empty);
rpc CancelAttack(google.protobuf.Empty) returns (google.protobuf.Empty);
rpc Follow(google.protobuf.UInt64Value) returns (google.protobuf.Empty);
rpc CancelAttackAndFollow(google.protobuf.Empty) returns (google.protobuf.Empty);
rpc Talk(google.protobuf.StringValue) returns (google.protobuf.Empty);
rpc TalkChannel(bot_TalkChannelRequest) returns (google.protobuf.Empty);
rpc TalkPrivate(bot_TalkPrivateRequest) returns (google.protobuf.Empty);
rpc OpenPrivateChannel(google.protobuf.StringValue) returns (google.protobuf.Empty);
rpc GetChaseMode(google.protobuf.Empty) returns (google.protobuf.Int32Value);
rpc GetFightMode(google.protobuf.Empty) returns (google.protobuf.Int32Value);
rpc SetChaseMode(google.protobuf.Int32Value) returns (google.protobuf.Empty);
rpc SetFightMode(google.protobuf.Int32Value) returns (google.protobuf.Empty);
rpc BuyItem(bot_BuyItemRequest) returns (google.protobuf.Empty);
rpc SellItem(bot_SellItemRequest) returns (google.protobuf.Empty);
rpc EquipItem(google.protobuf.UInt64Value) returns (google.protobuf.Empty);
rpc EquipItemId(bot_EquipItemIdRequest) returns (google.protobuf.Empty);
rpc Mount(google.protobuf.BoolValue) returns (google.protobuf.Empty);
rpc ChangeMapAwareRange(bot_ChangeMapAwareRangeRequest) returns (google.protobuf.Empty);
rpc CanPerformGameAction(google.protobuf.Empty) returns (google.protobuf.BoolValue);
rpc IsOnline(google.protobuf.Empty) returns (google.protobuf.BoolValue);
rpc IsAttacking(google.protobuf.Empty) returns (google.protobuf.BoolValue);
rpc IsFollowing(google.protobuf.Empty) returns (google.protobuf.BoolValue);
rpc GetContainer(google.protobuf.Int32Value) returns (google.protobuf.UInt64Value);
rpc GetContainers(google.protobuf.Empty) returns (bot_Uint64List);
rpc GetAttackingCreature(google.protobuf.Empty) returns (google.protobuf.UInt64Value);
rpc GetFollowingCreature(google.protobuf.Empty) returns (google.protobuf.UInt64Value);
rpc GetLocalPlayer(google.protobuf.Empty) returns (google.protobuf.UInt64Value);
rpc GetClientVersion(google.protobuf.Empty) returns (google.protobuf.Int32Value);
rpc GetCharacterName(google.protobuf.Empty) returns (google.protobuf.StringValue);
// --- Item.h ---
rpc GetCount(google.protobuf.UInt64Value) returns (google.protobuf.Int32Value);
rpc GetSubType(google.protobuf.UInt64Value) returns (google.protobuf.Int32Value);
rpc GetItemId(google.protobuf.UInt64Value) returns (google.protobuf.UInt32Value);
rpc GetTooltip(google.protobuf.UInt64Value) returns (google.protobuf.StringValue);
rpc GetDurationTime(google.protobuf.UInt64Value) returns (google.protobuf.UInt32Value);
rpc GetItemName(google.protobuf.UInt64Value) returns (google.protobuf.StringValue);
rpc GetDescription(google.protobuf.UInt64Value) returns (google.protobuf.StringValue);
rpc GetTier(google.protobuf.UInt64Value) returns (google.protobuf.UInt32Value);
rpc GetText(google.protobuf.UInt64Value) returns (google.protobuf.StringValue);
// --- LocalPlayer.h ---
rpc GetStates(google.protobuf.UInt64Value) returns (google.protobuf.UInt32Value);
rpc GetHealth(google.protobuf.UInt64Value) returns (google.protobuf.DoubleValue);
rpc GetMaxHealth(google.protobuf.UInt64Value) returns (google.protobuf.DoubleValue);
rpc GetFreeCapacity(google.protobuf.UInt64Value) returns (google.protobuf.DoubleValue);
rpc GetLevel(google.protobuf.UInt64Value) returns (google.protobuf.UInt32Value);
rpc GetMana(google.protobuf.UInt64Value) returns (google.protobuf.DoubleValue);
rpc GetMaxMana(google.protobuf.UInt64Value) returns (google.protobuf.DoubleValue);
rpc GetManaShield(google.protobuf.UInt64Value) returns (google.protobuf.UInt32Value);
rpc GetSoul(google.protobuf.UInt64Value) returns (google.protobuf.UInt32Value);
rpc GetStamina(google.protobuf.UInt64Value) returns (google.protobuf.UInt32Value);
rpc GetInventoryItem(bot_GetInventoryItemRequest) returns (google.protobuf.UInt64Value);
rpc HasEquippedItemId(bot_HasEquippedItemIdRequest) returns (google.protobuf.BoolValue);
rpc GetInventoryCount(bot_GetInventoryCountRequest) returns (google.protobuf.UInt32Value);
rpc HasSight(bot_HasSightRequest) returns (google.protobuf.BoolValue);
rpc IsAutoWalking(google.protobuf.UInt64Value) returns (google.protobuf.BoolValue);
rpc StopAutoWalk(google.protobuf.UInt64Value) returns (google.protobuf.Empty);
rpc AutoWalk(bot_AutoWalkRequest) returns (google.protobuf.BoolValue);
rpc SetLightHack(bot_SetLightHackRequest) returns (google.protobuf.Empty);
// --- Map.h ---
rpc GetTile(bot_Position) returns (google.protobuf.UInt64Value);
rpc GetSpectators(bot_GetSpectatorsRequest) returns (bot_Uint64List);
rpc FindPath(bot_FindPathRequest) returns (bot_DirectionList);
rpc IsSightClear(bot_IsSightClearRequest) returns (google.protobuf.BoolValue);
// --- Thing.h ---
rpc GetId(google.protobuf.UInt64Value) returns (google.protobuf.UInt32Value);
rpc GetPosition(google.protobuf.UInt64Value) returns (bot_Position);
rpc GetParentContainer(google.protobuf.UInt64Value) returns (google.protobuf.UInt64Value);
rpc IsItem(google.protobuf.UInt64Value) returns (google.protobuf.BoolValue);
rpc IsMonster(google.protobuf.UInt64Value) returns (google.protobuf.BoolValue);
rpc IsNpc(google.protobuf.UInt64Value) returns (google.protobuf.BoolValue);
rpc IsCreature(google.protobuf.UInt64Value) returns (google.protobuf.BoolValue);
rpc IsPlayer(google.protobuf.UInt64Value) returns (google.protobuf.BoolValue);
rpc IsLocalPlayer(google.protobuf.UInt64Value) returns (google.protobuf.BoolValue);
rpc IsContainer(google.protobuf.UInt64Value) returns (google.protobuf.BoolValue);
rpc IsUsable(google.protobuf.UInt64Value) returns (google.protobuf.BoolValue);
rpc IsLyingCorpse(google.protobuf.UInt64Value) returns (google.protobuf.BoolValue);
// --- Tile.h ---
rpc GetTopThing(google.protobuf.UInt64Value) returns (google.protobuf.UInt64Value);
rpc GetTopUseThing(google.protobuf.UInt64Value) returns (google.protobuf.UInt64Value);
rpc GetTileItems(google.protobuf.UInt64Value) returns (bot_Uint64List);
rpc IsWalkable(bot_IsWalkableRequest) returns (google.protobuf.BoolValue);
// --- CustomFunctions.h ---
rpc GetMessages(google.protobuf.UInt32Value) returns (bot_GetMessages);
rpc ClearMessages(google.protobuf.Empty) returns (google.protobuf.Empty);
rpc DropMessages(google.protobuf.UInt32Value) returns (google.protobuf.Empty);
}
// --- Generated Messages ---
message bot_Message {
string name = 1;
uint32 level = 2;
uint32 mode = 3;
string text = 4;
uint32 channel_id = 5;
bot_Position pos = 6;
}
message bot_GetMessages {
repeated bot_Message messages = 1;
}
message bot_GetItemRequest {
uint64 container = 1;
uint32 slot = 2;
}
message bot_GetSlotPositionRequest {
uint64 container = 1;
int32 slot = 2;
}
message bot_WalkRequest {
int32 direction = 1;
}
message bot_CanShootRequest {
uint64 creature = 1;
int32 distance = 2;
}
message bot_AutoWalkGameRequest {
bot_DirectionList direction = 1;
bot_Position startPos = 2;
}
message bot_AutoWalkRequest {
uint64 localPlayer = 1;
bot_Position destination = 2;
bool retry = 3;
}
message bot_SetLightHackRequest {
uint64 localPlayer = 1;
uint32 lightLevel = 2;
}
message bot_LookRequest {
uint64 thing = 1;
bool isBattleList = 2;
}
message bot_MoveRequest {
uint64 thing = 1;
bot_Position toPos = 2;
int32 count = 3;
}
message bot_MoveToParentContainerRequest {
uint64 thing = 1;
int32 count = 2;
}
message bot_UseWithRequest {
uint64 item = 1;
uint64 toThing = 2;
}
message bot_UseInventoryItemWithRequest {
uint32 itemId = 1;
uint64 toThing = 2;
}
message bot_FindItemInContainersRequest {
uint32 itemId = 1;
int32 subType = 2;
int32 tier = 3;
}
message bot_OpenRequest {
uint64 item = 1;
uint64 previousContainer = 2;
}
message bot_AttackRequest {
uint64 creature = 1;
bool cancel = 2;
}
message bot_TalkChannelRequest {
int32 mode = 1;
uint32 channelId = 2;
string message = 3;
}
message bot_TalkPrivateRequest {
int32 msgMode = 1;
string receiver = 2;
string message = 3;
}
message bot_BuyItemRequest {
uint64 item = 1;
uint32 amount = 2;
bool ignoreCapacity = 3;
bool buyWithBackpack = 4;
}
message bot_SellItemRequest {
uint64 item = 1;
uint32 amount = 2;
bool ignoreEquipped = 3;
}
message bot_EquipItemIdRequest {
uint32 itemId = 1;
int32 tier = 2;
}
message bot_ChangeMapAwareRangeRequest {
uint32 xrange = 1;
uint32 yrange = 2;
}
message bot_GetInventoryItemRequest {
uint64 localPlayer = 1;
int32 inventorySlot = 2;
}
message bot_HasEquippedItemIdRequest {
uint64 localPlayer = 1;
uint32 itemId = 2;
int32 tier = 3;
}
message bot_GetInventoryCountRequest {
uint64 localPlayer = 1;
uint32 itemId = 2;
int32 tier = 3;
}
message bot_HasSightRequest {
uint64 localPlayer = 1;
bot_Position pos = 2;
}
message bot_GetSpectatorsRequest {
bot_Position centerPos = 1;
bool multiFloor = 2;
}
message bot_FindPathRequest {
bot_Position startPos = 1;
bot_Position goalPos = 2;
int32 maxComplexity = 3;
int32 flags = 4;
}
message bot_IsWalkableRequest {
uint64 tile = 1;
bool ignoreCreatures = 2;
}
message bot_IsSightClearRequest {
bot_Position fromPos = 1;
bot_Position toPos = 2;
}
message bot_Uint64List {
repeated uint64 items = 1;
}
message bot_DirectionList {
repeated bot_Direction dirs = 1;
}
message bot_Position {
uint32 x = 1;
uint32 y = 2;
uint32 z = 3;
}
// Enums from const.h
enum bot_MessageMode {
MessageNone = 0;
MessageSay = 1;
MessageWhisper = 2;
MessageYell = 3;
MessagePrivateFrom = 4;
MessagePrivateTo = 5;
MessageChannelManagement = 6;
MessageChannel = 7;
MessageChannelHighlight = 8;
MessageSpell = 9;
MessageNpcFrom = 10;
MessageNpcTo = 11;
MessageGamemasterBroadcast = 12;
MessageGamemasterChannel = 13;
MessageGamemasterPrivateFrom = 14;
MessageGamemasterPrivateTo = 15;
MessageLogin = 16;
MessageWarning = 17;
MessageGame = 18;
MessageFailure = 19;
MessageLook = 20;
MessageDamageDealed = 21;
MessageDamageReceived = 22;
MessageHeal = 23;
MessageExp = 24;
MessageDamageOthers = 25;
MessageHealOthers = 26;
MessageExpOthers = 27;
MessageStatus = 28;
MessageLoot = 29;
MessageTradeNpc = 30;
MessageGuild = 31;
MessagePartyManagement = 32;
MessageParty = 33;
MessageBarkLow = 34;
MessageBarkLoud = 35;
MessageReport = 36;
MessageHotkeyUse = 37;
MessageTutorialHint = 38;
MessageThankyou = 39;
MessageMarket = 40;
MessageMana = 41;
MessageBeyondLast = 42;
// deprecated
MessageMonsterYell = 43;
MessageMonsterSay = 44;
MessageRed = 45;
MessageBlue = 46;
MessageRVRChannel = 47;
MessageRVRAnswer = 48;
MessageRVRContinue = 49;
MessageGameHighlight = 50;
MessageNpcFromStartBlock = 51;
LastMessage = 52;
MessageInvalid = 255;
};
enum bot_InventorySlot {
InventorySlot_UNSPECIFIED = 0;
InventorySlotHead = 1;
InventorySlotNecklace = 2;
InventorySlotBackpack = 3;
InventorySlotArmor = 4;
InventorySlotRight = 5;
InventorySlotLeft = 6;
InventorySlotLegs = 7;
InventorySlotFeet = 8;
InventorySlotRing = 9;
InventorySlotAmmo = 10;
InventorySlotPurse = 11;
InventorySlotExt1 = 12;
InventorySlotExt2 = 13;
InventorySlotExt3 = 14;
InventorySlotExt4 = 15;
LastInventorySlot = 16;
};
enum bot_Statistic {
Health = 0;
MaxHealth = 1;
FreeCapacity = 2;
Experience = 3;
Level = 4;
LevelPercent = 5;
Mana = 6;
MaxMana = 7;
MagicLevel = 8;
MagicLevelPercent = 9;
Soul = 10;
Stamina = 11;
LastStatistic = 12;
};
enum bot_Skill {
Fist = 0;
Club = 1;
Sword = 2;
Axe = 3;
Distance = 4;
Shielding = 5;
Fishing = 6;
CriticalChance = 7;
CriticalDamage = 8;
LifeLeechChance = 9;
LifeLeechAmount = 10;
ManaLeechChance = 11;
ManaLeechAmount = 12;
LastSkill = 13;
};
enum bot_Direction {
North = 0;
East = 1;
South = 2;
West = 3;
NorthEast = 4;
SouthEast = 5;
SouthWest = 6;
NorthWest = 7;
InvalidDirection = 8;
};
enum bot_FightModes {
Fight_UNSPECIFIED = 0;
FightOffensive = 1;
FightBalanced = 2;
FightDefensive = 3;
};
enum bot_ChaseModes {
DontChase = 0;
ChaseOpponent = 1;
};
enum bot_PVPModes {
WhiteDove = 0;
WhiteHand = 1;
YellowHand = 2;
RedFist = 3;
};
enum bot_PlayerSkulls {
SkullNone = 0;
SkullYellow = 1;
SkullGreen = 2;
SkullWhite = 3;
SkullRed = 4;
SkullBlack = 5;
SkullOrange = 6;
};
enum bot_PlayerStates {
IconNone = 0;
IconPoison = 1;
IconBurn = 2;
IconEnergy = 4;
IconDrunk = 8;
IconManaShield = 16;
IconParalyze = 32;
IconHaste = 64;
IconSwords = 128;
IconDrowning = 256;
IconFreezing = 512;
IconDazzled = 1024;
IconCursed = 2048;
IconPartyBuff = 4096;
IconPzBlock = 8192;
IconPz = 16384;
IconBleeding = 32768;
IconHungry = 65536;
};
enum bot_PathFindResult {
PathFindResultOk = 0;
PathFindResultSamePosition = 1;
PathFindResultImpossible = 2;
PathFindResultTooFar = 3;
PathFindResultNoWay = 4;
};
enum bot_PathFindFlags {
PathFind_UNSPECIFIED = 0;
PathFindAllowNotSeenTiles = 1;
PathFindAllowCreatures = 2;
PathFindAllowNonPathable = 4;
PathFindAllowNonWalkable = 8;
PathFindIgnoreCreatures = 16;
};