elbot/config.go

236 lines
5.6 KiB
Go

package main
type serverConfigurations struct {
Ip string
Port int
}
type credentialConfigurations struct {
User string
Password string
}
type configurations struct {
Server serverConfigurations
Credential credentialConfigurations
}
type item struct {
Id int
Text string
Price float64
Quantity int
}
type invPos struct {
Quantity int
Id int
Pos int
}
type webPageData struct {
PageTitle string
Ite []item
}
type tradeStr struct {
Id int
Quantity int
Type int
ImageId int
}
// Money item id
const MONEY = 20
/*
To server communication protocol id's
*/
const MOVE_TO = 1
const SEND_PM = 2
const GET_PLAYER_INFO = 5
const RUN_TO = 6
const SIT_DOWN = 7
const SEND_ME_MY_ACTORS = 8
const SEND_OPENING_SCREEN = 9
const SEND_VERSION = 10
const TURN_LEFT = 11
const TURN_RIGHT = 12
const PING = 13
const HEART_BEAT = 14
const LOCATE_ME = 15
const USE_MAP_OBJECT = 16
const SEND_MY_STATS = 17
const SEND_MY_INVENTORY = 18
const LOOK_AT_INVENTORY_ITEM = 19
const MOVE_INVENTORY_ITEM = 20
const HARVEST = 21
const DROP_ITEM = 22
const PICK_UP_ITEM = 23
const LOOK_AT_GROUND_ITEM = 24
const INSPECT_BAG = 25
const S_CLOSE_BAG = 26
const LOOK_AT_MAP_OBJECT = 27
const TOUCH_PLAYER = 28
const RESPOND_TO_NPC = 29
const MANUFACTURE_THIS = 30
const USE_INVENTORY_ITEM = 31
const TRADE_WITH = 32
const ACCEPT_TRADE = 33
const REJECT_TRADE = 34
const EXIT_TRADE = 35
const PUT_OBJECT_ON_TRADE = 36
const REMOVE_OBJECT_FROM_TRADE = 37
const LOOK_AT_TRADE_ITEM = 38
const CAST_SPELL = 39
const ATTACK_SOMEONE = 40
const GET_KNOWLEDGE_INFO = 41
const ITEM_ON_ITEM = 42
const SEND_BOOK = 43
const GET_STORAGE_CATEGORY = 44
const DEPOSITE_ITEM = 45
const WITHDRAW_ITEM = 46
const LOOK_AT_STORAGE_ITEM = 47
const SPELL_NAME = 48
const SEND_VIDEO_INFO = 49
const POPUP_REPLY = 50
const FIRE_MISSILE_AT_OBJECT = 51
const PING_RESPONSE = 60
const SET_ACTIVE_CHANNEL = 61
const WHAT_QUEST_IS_THIS_ID = 63
const DO_EMOTE = 70
const GET_BUFF_DURATION = 71
const LOG_IN = 140
const CREATE_CHAR = 141
const GET_DATE = 230
const GET_TIME = 231
const SERVER_STATS = 232
const ORIGINAL_IP = 233
/*
From server communication protocol Id's
*/
const ADD_NEW_ACTOR = 1
const ADD_ACTOR_COMMAND = 2
const YOU_ARE = 3
const SYNC_CLOCK = 4
const NEW_MINUTE = 5
const REMOVE_ACTOR = 6
const CHANGE_MAP = 7
const COMBAT_MODE = 8
const KILL_ALL_ACTORS = 9
const GET_TELEPORTERS_LIST = 10
const PONG = 11
const TELEPORT_IN = 12
const TELEPORT_OUT = 13
const PLAY_SOUND = 14
const START_RAIN = 15 //delete later on
const STOP_RAIN = 16 //delete later on
const THUNDER = 17
const HERE_YOUR_STATS = 18
const HERE_YOUR_INVENTORY = 19
const INVENTORY_ITEM_TEXT = 20
const GET_NEW_INVENTORY_ITEM = 21
const REMOVE_ITEM_FROM_INVENTORY = 22
const HERE_YOUR_GROUND_ITEMS = 23
const GET_NEW_GROUND_ITEM = 24
const REMOVE_ITEM_FROM_GROUND = 25
const CLOSE_BAG = 26
const GET_NEW_BAG = 27
const GET_BAGS_LIST = 28
const DESTROY_BAG = 29
const NPC_TEXT = 30
const NPC_OPTIONS_LIST = 31
const CLOSE_NPC_MENU = 32
const SEND_NPC_INFO = 33
const GET_TRADE_INFO = 34 //delete later on
const GET_TRADE_OBJECT = 35
const GET_TRADE_ACCEPT = 36
const GET_TRADE_REJECT = 37
const GET_TRADE_EXIT = 38
const REMOVE_TRADE_OBJECT = 39
const GET_YOUR_TRADEOBJECTS = 40
const GET_TRADE_PARTNER_NAME = 41
const GET_YOUR_SIGILS = 42
const SPELL_ITEM_TEXT = 43
const GET_ACTIVE_SPELL = 44
const GET_ACTIVE_SPELL_LIST = 45
const REMOVE_ACTIVE_SPELL = 46
const GET_ACTOR_DAMAGE = 47
const GET_ACTOR_HEAL = 48
const SEND_PARTIAL_STAT = 49
const SPAWN_BAG_PARTICLES = 50
const ADD_NEW_ENHANCED_ACTOR = 51
const ACTOR_WEAR_ITEM = 52
const ACTOR_UNWEAR_ITEM = 53
const PLAY_MUSIC = 54
const GET_KNOWLEDGE_LIST = 55
const GET_NEW_KNOWLEDGE = 56
const GET_KNOWLEDGE_TEXT = 57
const BUDDY_EVENT = 59
const PING_REQUEST = 60
const FIRE_PARTICLES = 61
const REMOVE_FIRE_AT = 62
const DISPLAY_CLIENT_WINDOW = 63
const OPEN_BOOK = 64
const READ_BOOK = 65
const CLOSE_BOOK = 66
const STORAGE_LIST = 67
const STORAGE_ITEMS = 68
const STORAGE_TEXT = 69
const SPELL_CAST = 70
const GET_ACTIVE_CHANNELS = 71
const MAP_FLAGS = 72
const GET_ACTOR_HEALTH = 73
const GET_3D_OBJ_LIST = 74
const GET_3D_OBJ = 75
const REMOVE_3D_OBJ = 76
const GET_ITEMS_COOLDOWN = 77
const SEND_BUFFS = 78
const SEND_SPECIAL_EFFECT = 79
const REMOVE_MINE = 80
const GET_NEW_MINE = 81
const GET_MINES_LIST = 82
const DISPLAY_POPUP = 83
const MISSILE_AIM_A_AT_B = 84
const MISSILE_AIM_A_AT_XYZ = 85
const MISSILE_FIRE_A_TO_B = 86
const MISSILE_FIRE_A_TO_XYZ = 87
const MISSILE_FIRE_XYZ_TO_B = 88
const ADD_ACTOR_ANIMATION = 89
const SEND_MAP_MARKER = 90
const REMOVE_MAP_MARKER = 91
/* sent: 16 bit quest id for the next npc message */
const NEXT_NPC_MESSAGE_IS_QUEST = 92
/* sent: non null terminated string giving the title of the quest */
const HERE_IS_QUEST_ID = 93
/* sent: 16 bit quest id, this quest should be shown as finished */
const QUEST_FINISHED = 94
/* sent: 5 x 32 bit integers, each active bit is an achievement the last "You see: name" player has */
const SEND_ACHIEVEMENTS = 95
/* sent: 1 single byte buff duration, time remaining in seconds */
const SEND_BUFF_DURATION = 96
const SEND_WEATHER = 100
// reserved for future expansion 220-229, not being used in the server yet
const MAP_SET_OBJECTS = 220
const MAP_STATE_OBJECTS = 221
const UPGRADE_NEW_VERSION = 240 // TODO: Consider combining all this into one packet followed by one byte (plus optional text)
const UPGRADE_TOO_OLD = 241
const REDEFINE_YOUR_COLORS = 248
const YOU_DONT_EXIST = 249
const LOG_IN_OK = 250
const LOG_IN_NOT_OK = 251
const CREATE_CHAR_OK = 252
const CREATE_CHAR_NOT_OK = 253
const RAW_TEXT = 0
const PROXY = 254
const BYE = 255