Ir para conteúdo

[Effects] De Otserv


SkyLigh

Posts Recomendados

Iae galera !!

 

Comos Quase Todos Ja Viram Este tutorial

 

http://www.xtibia.com/forum/topic/129140-lista-de-efeitos-854-e-como-usa-los/

 

Eu criei um pareçido com esse !

 

so que o meu e do 8.60

 

e com o numero dos efeitos e o nome tbm ! então vamos la breve irei postar as print's

 

CONST_ME_DRAWBLOOD = 0
CONST_ME_LOSEENERGY = 1
CONST_ME_POFF = 2
CONST_ME_BLOCKHIT = 3
CONST_ME_EXPLOSIONAREA = 4
CONST_ME_EXPLOSIONHIT = 5
CONST_ME_FIREAREA = 6
CONST_ME_YELLOW_RINGS = 7
CONST_ME_GREEN_RINGS = 8
CONST_ME_HITAREA = 9
CONST_ME_TELEPORT = 10
CONST_ME_ENERGYHIT = 11
CONST_ME_MAGIC_BLUE = 12
CONST_ME_MAGIC_RED = 13
CONST_ME_MAGIC_GREEN = 14
CONST_ME_HITBYFIRE = 15
CONST_ME_HITBYPOISON = 16
CONST_ME_MORTAREA = 17
CONST_ME_SOUND_GREEN = 18
CONST_ME_SOUND_RED = 19
CONST_ME_POISONAREA = 20
CONST_ME_SOUND_YELLOW = 21
CONST_ME_SOUND_PURPLE = 22
CONST_ME_SOUND_BLUE = 23
CONST_ME_SOUND_WHITE = 24
CONST_ME_BUBBLES = 25
CONST_ME_CRAPS = 26
CONST_ME_GIFT_WRAPS = 27
CONST_ME_FIREWORK_YELLOW = 28
CONST_ME_FIREWORK_RED = 29
CONST_ME_FIREWORK_BLUE = 30
CONST_ME_STUN = 31
CONST_ME_SLEEP = 32
CONST_ME_WATERCREATURE = 33
CONST_ME_GROUNDSHAKER = 34
CONST_ME_HEARTS = 35
CONST_ME_FIREATTACK = 36
CONST_ME_ENERGYAREA = 37
CONST_ME_SMALLCLOUDS = 38
CONST_ME_HOLYDAMAGE = 39
CONST_ME_BIGCLOUDS = 40
CONST_ME_ICEAREA = 41
CONST_ME_ICETORNADO = 42
CONST_ME_ICEATTACK = 43
CONST_ME_STONES = 44
CONST_ME_SMALLPLANTS = 45
CONST_ME_CARNIPHILA = 46
CONST_ME_PURPLEENERGY = 47
CONST_ME_YELLOWENERGY = 48
CONST_ME_HOLYAREA = 49
CONST_ME_BIGPLANTS = 50
CONST_ME_CAKE = 51
CONST_ME_GIANTICE = 52
CONST_ME_WATERSPLASH = 53
CONST_ME_PLANTATTACK = 54
CONST_ME_TUTORIALARROW = 55
CONST_ME_TUTORIALSQUARE = 56
CONST_ME_MIRRORHORIZONTAL = 57
CONST_ME_MIRRORVERTICAL = 58
CONST_ME_SKULLHORIZONTAL = 59
CONST_ME_SKULLVERTICAL = 60
CONST_ME_ASSASSIN = 61
CONST_ME_STEPSHORIZONTAL = 62
CONST_ME_BLOODYSTEPS = 63
CONST_ME_STEPSVERTICAL = 64
CONST_ME_YALAHARIGHOST = 65
CONST_ME_BATS = 66
CONST_ME_SMOKE = 67
CONST_ME_INSECTS = 68
CONST_ME_DRAGONHEAD = 69
CONST_ME_ORCSHAMAN = 70
CONST_ME_ORCSHAMAN_FIRE = 71
CONST_ME_NONE = 255
CONST_ME_LAST = CONST_ME_ORCSHAMAN_FIRE

 

Entao so isso espero que ajuda alguns

 

se gostou + rep

Link para o comentário
Compartilhar em outros sites

@Skylight

 

Se fosse assim,eu ia anda pelado na rua.

Nao é so isso que tem que faze nao.

Vou tentar fazer uma breve explicaçao

 

---Mini-Tutorial---

Voce precisa editar nas sources tambem para adicionar mais effects,para isso abre o arkivo const.h

apague tudo,e cole isto:

////////////////////////////////////////////////////////////////////////

// OpenTibia - an opensource roleplaying game

////////////////////////////////////////////////////////////////////////

// This program is free software: you can redistribute it and/or modify

// it under the terms of the GNU General Public License as published by

// the Free Software Foundation, either version 3 of the License, or

// (at your option) any later version.

//

// This program is distributed in the hope that it will be useful,

// but WITHOUT ANY WARRANTY; without even the implied warranty of

// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the

// GNU General Public License for more details.

//

// You should have received a copy of the GNU General Public License

// along with this program. If not, see <http://www.gnu.org/licenses/>.

////////////////////////////////////////////////////////////////////////

 

#ifndef __CONST__

#define __CONST__

#include "definitions.h"

 

enum MagicEffect_t

{

MAGIC_EFFECT_DRAW_BLOOD = 0x00,

MAGIC_EFFECT_LOSE_ENERGY = 0x01,

MAGIC_EFFECT_POFF = 0x02,

MAGIC_EFFECT_BLOCKHIT = 0x03,

MAGIC_EFFECT_EXPLOSION_AREA = 0x04,

MAGIC_EFFECT_EXPLOSION_DAMAGE = 0x05,

MAGIC_EFFECT_FIRE_AREA = 0x06,

MAGIC_EFFECT_YELLOW_RINGS = 0x07,

MAGIC_EFFECT_POISON_RINGS = 0x08,

MAGIC_EFFECT_HIT_AREA = 0x09,

MAGIC_EFFECT_TELEPORT = 0x0A, //10

MAGIC_EFFECT_ENERGY_DAMAGE = 0x0B, //11

MAGIC_EFFECT_WRAPS_BLUE = 0x0C, //12

MAGIC_EFFECT_WRAPS_RED = 0x0D, //13

MAGIC_EFFECT_WRAPS_GREEN = 0x0E, //14

MAGIC_EFFECT_HITBY_FIRE = 0x0F, //15

MAGIC_EFFECT_POISON = 0x10, //16

MAGIC_EFFECT_MORT_AREA = 0x11, //17

MAGIC_EFFECT_SOUND_GREEN = 0x12, //18

MAGIC_EFFECT_SOUND_RED = 0x13, //19

MAGIC_EFFECT_POISON_AREA = 0x14, //20

MAGIC_EFFECT_SOUND_YELLOW = 0x15, //21

MAGIC_EFFECT_SOUND_PURPLE = 0x16, //22

MAGIC_EFFECT_SOUND_BLUE = 0x17, //23

MAGIC_EFFECT_SOUND_WHITE = 0x18, //24

MAGIC_EFFECT_BUBBLES = 0x19, //25

MAGIC_EFFECT_CRAPS = 0x1A, //26

MAGIC_EFFECT_GIFT_WRAPS = 0x1B, //27

MAGIC_EFFECT_FIREWORK_YELLOW = 0x1C, //28

MAGIC_EFFECT_FIREWORK_RED = 0x1D, //29

MAGIC_EFFECT_FIREWORK_BLUE = 0x1E, //30

MAGIC_EFFECT_STUN = 0x1F, //31

MAGIC_EFFECT_SLEEP = 0x20, //32

MAGIC_EFFECT_WATERCREATURE = 0x21, //33

MAGIC_EFFECT_GROUNDSHAKER = 0x22, //34

MAGIC_EFFECT_HEARTS = 0x23, //35

MAGIC_EFFECT_FIREATTACK = 0x24, //36

MAGIC_EFFECT_ENERGY_AREA = 0x25, //37

MAGIC_EFFECT_SMALLCLOUDS = 0x26, //38

MAGIC_EFFECT_HOLYDAMAGE = 0x27, //39

MAGIC_EFFECT_BIGCLOUDS = 0x28, //40

MAGIC_EFFECT_ICEAREA = 0x29, //41

MAGIC_EFFECT_ICETORNADO = 0x2A, //42

MAGIC_EFFECT_ICEATTACK = 0x2B, //43

MAGIC_EFFECT_STONES = 0x2C, //44

MAGIC_EFFECT_SMALLPLANTS = 0x2D, //45

MAGIC_EFFECT_CARNIPHILA = 0x2E, //46

MAGIC_EFFECT_PURPLEENERGY = 0x2F, //47

MAGIC_EFFECT_YELLOWENERGY = 0x30, //48

MAGIC_EFFECT_HOLYAREA = 0x31, //49

MAGIC_EFFECT_BIGPLANTS = 0x32, //50

MAGIC_EFFECT_CAKE = 0x33, //51

MAGIC_EFFECT_GIANTICE = 0x34, //52

MAGIC_EFFECT_WATERSPLASH = 0x35, //53

MAGIC_EFFECT_PLANTATTACK = 0x36, //54

MAGIC_EFFECT_TUTORIALARROW = 0x37, //55

MAGIC_EFFECT_TUTORIALSQUARE = 0x38, //56

MAGIC_EFFECT_MIRRORHORIZONTAL = 0x39, //57

MAGIC_EFFECT_MIRRORVERTICAL = 0x3A, //58

MAGIC_EFFECT_SKULLHORIZONTAL = 0x3B, //59

MAGIC_EFFECT_SKULLVERTICAL = 0x3C, //60

MAGIC_EFFECT_ASSASSIN = 0x3D, //61

MAGIC_EFFECT_STEPSHORIZONTAL = 0x3E, //62

MAGIC_EFFECT_BLOODYSTEPS = 0x3F, //63

MAGIC_EFFECT_STEPSVERTICAL = 0x40, //64

MAGIC_EFFECT_YALAHARIGHOST = 0x41, //65

MAGIC_EFFECT_BATS = 0x42, //66

MAGIC_EFFECT_SMOKE = 0x43, //67

MAGIC_EFFECT_INSECTS = 0x44, //68

MAGIC_EFFECT_PINK = 0x45, //69

MAGIC_EFFECT_RED = 0x46, //70

MAGIC_EFFECT_BLUEK = 0x47, //71

MAGIC_EFFECT_BLUEKI = 0x48, //72

MAGIC_EFFECT_BLUEB = 0x49, //73

MAGIC_EFFECT_KAMEBLUE = 0x4A, //74

MAGIC_EFFECT_GENERIK = 0x4B, //75

MAGIC_EFFECT_GENERIKB = 0x4C, //76

MAGIC_EFFECT_GENERIKA = 0x4D, //77

MAGIC_EFFECT_GENERIKGREEN = 0x4E, //78

MAGIC_EFFECT_GREENONE = 0x4F, //79

MAGIC_EFFECT_GREENTWO = 0x50, //80

MAGIC_EFFECT_GREENTHREE = 0x51, //81

MAGIC_EFFECT_GREENFOUR = 0x52, //82

MAGIC_EFFECT_GREENFIVE = 0x53, //83

MAGIC_EFFECT_ORANGE = 0x54, //84

MAGIC_EFFECT_ORANGEONE = 0x55, //85

MAGIC_EFFECT_ORANGETWO = 0x56, //86

MAGIC_EFFECT_ORANGETHREE = 0x57, //87

MAGIC_EFFECT_ORANGEFOUR = 0x58, //88

MAGIC_EFFECT_ORANGEFIVE = 0x59, //89

MAGIC_EFFECT_PINKB = 0x5A, //90

MAGIC_EFFECT_PINKONE = 0x5B, //91

MAGIC_EFFECT_PINKTWO = 0x5C, //92

MAGIC_EFFECT_PINKTHREE = 0x5D, //93

MAGIC_EFFECT_PINKFOUR = 0x5E, //94

MAGIC_EFFECT_YELLOWB = 0x5F, //95

MAGIC_EFFECT_YELLOWONE = 0x60, //96

MAGIC_EFFECT_YELLOWTWO = 0x61, //97

MAGIC_EFFECT_YELLOWTHREE = 0x62, //98

MAGIC_EFFECT_YELLOWFOUR = 0x63, //99

MAGIC_EFFECT_YELLOWFIVE = 0x64, //100

MAGIC_EFFECT_YELLOWSIX = 0x65, //101

MAGIC_EFFECT_YELLOWSEVEN = 0x66, //102

MAGIC_EFFECT_YELLOWEIGHT = 0x67, //103

MAGIC_EFFECT_YELLOWNINE = 0x68, //104

MAGIC_EFFECT_YELLOWTEN = 0x69, //105

MAGIC_EFFECT_YELLOWELEVEN = 0x6A, //106

MAGIC_EFFECT_PINKA = 0x6B, //107

MAGIC_EFFECT_PINKC = 0x6C, //108

MAGIC_EFFECT_PINKD = 0x6D, //109

MAGIC_EFFECT_PINKE = 0x6E, //110

MAGIC_EFFECT_PINKF = 0x6F, //111

MAGIC_EFFECT_PINKG = 0x70, //112

MAGIC_EFFECT_PINKH = 0x71, //113

MAGIC_EFFECT_PINKI = 0x72, //114

MAGIC_EFFECT_PINKJ = 0x73, //115

MAGIC_EFFECT_PINKL = 0x74, //116

MAGIC_EFFECT_PINKM = 0x75, //117

MAGIC_EFFECT_PINKN = 0x76, //118

MAGIC_EFFECT_PINKO = 0x77, //119

MAGIC_EFFECT_PINKP = 0x78, //120

MAGIC_EFFECT_PINKQ = 0x79, //121

MAGIC_EFFECT_PINKR = 0x7A, //122

MAGIC_EFFECT_PINKS = 0x7B, //123

MAGIC_EFFECT_PINKT = 0x7C, //124

MAGIC_EFFECT_PINKU = 0x7D, //125

MAGIC_EFFECT_PINKV = 0x7E, //126

MAGIC_EFFECT_PINKX = 0x7F, //127

MAGIC_EFFECT_PINKZ = 0x80, //128

MAGIC_EFFECT_GRAYA = 0x81, //129

MAGIC_EFFECT_GRAYB = 0x82, //130

MAGIC_EFFECT_GRAYC = 0x83, //131

MAGIC_EFFECT_GRAYD = 0x84, //132

MAGIC_EFFECT_GRAYE = 0x85, //133

MAGIC_EFFECT_GRAYF = 0x86, //134

MAGIC_EFFECT_GRAYG = 0x87, //135

MAGIC_EFFECT_GRAYH = 0x88, //136

MAGIC_EFFECT_GRAYI = 0x89, //137

MAGIC_EFFECT_GRAYJ = 0x8A, //138

MAGIC_EFFECT_GRAYL = 0x8B, //139

MAGIC_EFFECT_GRAYM = 0x8C, //140

MAGIC_EFFECT_GRAYN = 0x8D, //141

MAGIC_EFFECT_GRAYO = 0x8E, //142

MAGIC_EFFECT_GRAYP = 0x8F, //143

MAGIC_EFFECT_GRAYQ = 0x90, //144

MAGIC_EFFECT_GRAYR = 0x91, //145

MAGIC_EFFECT_GRAYS = 0x92, //146

MAGIC_EFFECT_GRAYT = 0x93, //147

MAGIC_EFFECT_GRAYU = 0x94, //148

MAGIC_EFFECT_GRAYV = 0x95, //149

MAGIC_EFFECT_GRAYX = 0x96, //150

MAGIC_EFFECT_GRAYZ = 0x97, //151

MAGIC_EFFECT_BLACKA = 0x98, //152

MAGIC_EFFECT_BLACKB = 0x99, //153

MAGIC_EFFECT_BLACKC = 0x9A, //154

MAGIC_EFFECT_BLACKD = 0x9B, //155

MAGIC_EFFECT_BLACKE = 0x9C, //156

MAGIC_EFFECT_BLACKF = 0x9D, //157

MAGIC_EFFECT_BLACKG = 0x9E, //158

MAGIC_EFFECT_BLACKH = 0x9F, //159

MAGIC_EFFECT_BLACKJ = 0xA0, //160

MAGIC_EFFECT_BLACKL = 0xA1, //161

MAGIC_EFFECT_BLACKM = 0xA2, //162

MAGIC_EFFECT_BLACKN = 0xA3, //163

MAGIC_EFFECT_BLACKO = 0xA4, //164

MAGIC_EFFECT_BLACKP = 0xA5, //165

MAGIC_EFFECT_BLACKQ = 0xA6, //166

MAGIC_EFFECT_BLACKR = 0xA7, //167

MAGIC_EFFECT_BLACKS = 0xA8, //168

MAGIC_EFFECT_BLACKT = 0xA9, //169

MAGIC_EFFECT_BLACKU = 0xAA, //170

MAGIC_EFFECT_BLACKV = 0xAB, //171

MAGIC_EFFECT_BLACKX = 0xAC, //172

MAGIC_EFFECT_BLACKZ = 0xAD, //173

MAGIC_EFFECT_SKYA = 0xAE, //174

MAGIC_EFFECT_SKYB = 0xAF, //175

MAGIC_EFFECT_SKYC = 0xB0, //176

MAGIC_EFFECT_SKYD = 0xB1, //177

MAGIC_EFFECT_SKYE = 0xB2, //178

MAGIC_EFFECT_SKYF = 0xB3, //179

MAGIC_EFFECT_SKYG = 0xB4, //180

MAGIC_EFFECT_SKYH = 0xB5, //181

MAGIC_EFFECT_SKYI = 0xB6, //182

MAGIC_EFFECT_SKYJ = 0xB7, //183

MAGIC_EFFECT_SKYL = 0xB8, //184

MAGIC_EFFECT_SKYM = 0xB9, //185

MAGIC_EFFECT_SKYN = 0xBA, //186

MAGIC_EFFECT_SKYO = 0xBB, //187

MAGIC_EFFECT_SKYP = 0xBC, //188

MAGIC_EFFECT_SKYQ = 0xBD, //189

MAGIC_EFFECT_SKYR = 0xBE, //190

MAGIC_EFFECT_SKYS = 0xBF, //191

MAGIC_EFFECT_SKYT = 0xC0, //192

MAGIC_EFFECT_SKYU = 0xC1, //193

MAGIC_EFFECT_SKYV = 0xC2, //194

MAGIC_EFFECT_SKYX = 0xC3, //195

MAGIC_EFFECT_SKYZ = 0xC4, //196

MAGIC_EFFECT_FIGHTA = 0xC5, //197

MAGIC_EFFECT_FIGHTB = 0xC6, //198

MAGIC_EFFECT_FIGHTC = 0xC7, //199

MAGIC_EFFECT_FIGHTD = 0xC8, //200

MAGIC_EFFECT_FIGHTE = 0xC9, //201

MAGIC_EFFECT_FIGHTF = 0xCA, //202

MAGIC_EFFECT_FIGHTG = 0xCB, //203

MAGIC_EFFECT_FIGHTH = 0xCC, //204

MAGIC_EFFECT_FIGHTI = 0xCD, //205

MAGIC_EFFECT_REDSTORM = 0xCE, //206

MAGIC_EFFECT_BURNINGR = 0xCF, //207

MAGIC_EFFECT_BLUESTORMZ = 0xD0, //208

MAGIC_EFFECT_BLACKSTORMZ = 0xD1, //209

MAGIC_EFFECT_GOLDENSTORMZ = 0xD2, //210

MAGIC_EFFECT_DARKSTORMZ = 0xD3, //211

MAGIC_EFFECT_CELLTRANSFORMZ = 0xD4, //212

MAGIC_EFFECT_BROLLYTRANSFORMZ = 0xD5, //213

MAGIC_EFFECT_FABIOUM = 0xD6, //214

MAGIC_EFFECT_FABIODOIS = 0xD7, //215

MAGIC_EFFECT_FABIOTRES = 0xD8, //216

MAGIC_EFFECT_FABIOQUATRO = 0xD9, //217

MAGIC_EFFECT_FABIOCINCO = 0xDA, //218

MAGIC_EFFECT_FABIOSEIS = 0xDB, //219

MAGIC_EFFECT_FABIOSETE = 0xDC, //220

MAGIC_EFFECT_FABIOOITO = 0xDD, //221

MAGIC_EFFECT_FABIONOVE = 0xDE, //222

MAGIC_EFFECT_FABIODEZ = 0xDF, //223

MAGIC_EFFECT_FABIOONZE = 0xE0, //224

MAGIC_EFFECT_FABIODOZE = 0xE1, //225

MAGIC_EFFECT_FABIOTREZE = 0xE2, //226

MAGIC_EFFECT_FABIOQUATORZE = 0xE3, //227

MAGIC_EFFECT_FABIOQUINZE = 0xE4, //228

MAGIC_EFFECT_FABIODEZESEIS = 0xE5, //229

MAGIC_EFFECT_FABIODEZESETE = 0xE6, //230

MAGIC_EFFECT_FABIODEZOITO = 0xE7, //231

MAGIC_EFFECT_FABIOSKY = 0xE8, //232

MAGIC_EFFECT_FABIODEZENOVE = 0xE9, //233

MAGIC_EFFECT_FABIOVINTE = 0xEA, //234

MAGIC_EFFECT_FABIONUYS= 0xEB, //235

MAGIC_EFFECT_FABIOSEXYNUYS= 0xEC, //236

MAGIC_EFFECT_FABIOTRINTA= 0xED, //237

MAGIC_EFFECT_FABIOTRINTADOIS= 0xEE, //238

MAGIC_EFFECT_FABIOTRINTATRES= 0xEF, //239

MAGIC_EFFECT_FABIOTRINTAQUATRO= 0xF0, //240

MAGIC_EFFECT_FABIOTRINTACINCO= 0xF1, //241

MAGIC_EFFECT_FABIOTRINTASEIS= 0xF2, //242

MAGIC_EFFECT_FABIOTRINTASETE= 0xF3, //243

MAGIC_EFFECT_FABIOTRINTAOITO= 0xF4, //244

MAGIC_EFFECT_FABIOTRINTANOVE= 0xF5, //245

MAGIC_EFFECT_FABIOQUARENTA= 0xF6, //246

MAGIC_EFFECT_FABIOQUARENTAUM= 0xF7, //247

MAGIC_EFFECT_FABIOQUARENTADOIS= 0xF8, //248

MAGIC_EFFECT_FABIOQUARENTATRES= 0xF9, //249

MAGIC_EFFECT_FABIOQUARENTAQUATRO= 0xFA, //250

MAGIC_EFFECT_FABIOQUARENTACINCO= 0xFB, //251

MAGIC_EFFECT_FABIOQUARENTASEIS= 0xFC, //252

MAGIC_EFFECT_FABIOQUARENTASETE= 0xFD, //253

MAGIC_EFFECT_FABIOQUARENTAOITO= 0xFE, //254

MAGIC_EFFECT_LAST = MAGIC_EFFECT_FABIOQUARENTAOITO,

 

//for internal use, dont send to client

MAGIC_EFFECT_NONE = 0xFF,

MAGIC_EFFECT_UNKNOWN = 0xFFFF

};

 

enum ShootEffect_t

{

SHOOT_EFFECT_SPEAR = 0x00,

SHOOT_EFFECT_BOLT = 0x01,

SHOOT_EFFECT_ARROW = 0x02,

SHOOT_EFFECT_FIRE = 0x03,

SHOOT_EFFECT_ENERGY = 0x04,

SHOOT_EFFECT_POISONARROW = 0x05,

SHOOT_EFFECT_BURSTARROW = 0x06,

SHOOT_EFFECT_THROWINGSTAR = 0x07,

SHOOT_EFFECT_THROWINGKNIFE = 0x08,

SHOOT_EFFECT_SMALLSTONE = 0x09,

SHOOT_EFFECT_DEATH = 0x0A, //10

SHOOT_EFFECT_LARGEROCK = 0x0B, //11

SHOOT_EFFECT_SNOWBALL = 0x0C, //12

SHOOT_EFFECT_POWERBOLT = 0x0D, //13

SHOOT_EFFECT_POISONFIELD = 0x0E, //14

SHOOT_EFFECT_INFERNALBOLT = 0x0F, //15

SHOOT_EFFECT_HUNTINGSPEAR = 0x10, //16

SHOOT_EFFECT_ENCHANTEDSPEAR = 0x11, //17

SHOOT_EFFECT_REDSTAR = 0x12, //18

SHOOT_EFFECT_GREENSTAR = 0x13, //19

SHOOT_EFFECT_ROYALSPEAR = 0x14, //20

SHOOT_EFFECT_SNIPERARROW = 0x15, //21

SHOOT_EFFECT_ONYXARROW = 0x16, //22

SHOOT_EFFECT_PIERCINGBOLT = 0x17, //23

SHOOT_EFFECT_WHIRLWINDSWORD = 0x18, //24

SHOOT_EFFECT_WHIRLWINDAXE = 0x19, //25

SHOOT_EFFECT_WHIRLWINDCLUB = 0x1A, //26

SHOOT_EFFECT_ETHEREALSPEAR = 0x1B, //27

SHOOT_EFFECT_ICE = 0x1C, //28

SHOOT_EFFECT_EARTH = 0x1D, //29

SHOOT_EFFECT_HOLY = 0x1E, //30

SHOOT_EFFECT_SUDDENDEATH = 0x1F, //31

SHOOT_EFFECT_FLASHARROW = 0x20, //32

SHOOT_EFFECT_FLAMMINGARROW = 0x21, //33

SHOOT_EFFECT_SHIVERARROW = 0x22, //34

SHOOT_EFFECT_ENERGYBALL = 0x23, //35

SHOOT_EFFECT_SMALLICE = 0x24, //36

SHOOT_EFFECT_SMALLHOLY = 0x25, //37

SHOOT_EFFECT_SMALLEARTH = 0x26, //38

SHOOT_EFFECT_EARTHARROW = 0x27, //39

SHOOT_EFFECT_EXPLOSION = 0x28, //40

SHOOT_EFFECT_CAKE = 0x29, //41

SHOOT_EFFECT_LAST = SHOOT_EFFECT_CAKE,

 

//for internal use, dont send to client

SHOOT_EFFECT_WEAPONTYPE = 0xFE, //254

SHOOT_EFFECT_NONE = 0xFF,

SHOOT_EFFECT_UNKNOWN = 0xFFFF

};

 

enum SpeakClasses

{

SPEAK_CLASS_NONE = 0x00,

SPEAK_CLASS_FIRST = 0x01,

SPEAK_SAY = SPEAK_CLASS_FIRST,

SPEAK_WHISPER = 0x02,

SPEAK_YELL = 0x03,

SPEAK_PRIVATE_PN = 0x04,

SPEAK_PRIVATE_NP = 0x05,

SPEAK_PRIVATE = 0x06,

SPEAK_CHANNEL_Y = 0x07,

SPEAK_CHANNEL_W = 0x08,

SPEAK_RVR_CHANNEL = 0x09,

SPEAK_RVR_ANSWER = 0x0A,

SPEAK_RVR_CONTINUE = 0x0B,

SPEAK_BROADCAST = 0x0C,

SPEAK_CHANNEL_RN = 0x0D, //red - #c text

SPEAK_PRIVATE_RED = 0x0E, //@name@text

SPEAK_CHANNEL_O = 0x0F,

//SPEAK_UNKNOWN_1 = 0x10,

SPEAK_CHANNEL_RA = 0x11, //red anonymous - #d text

//SPEAK_UNKNOWN_2 = 0x12,

SPEAK_MONSTER_SAY = 0x13,

SPEAK_MONSTER_YELL = 0x14,

SPEAK_CLASS_LAST = SPEAK_MONSTER_YELL

};

 

enum MessageClasses

{

MSG_CLASS_FIRST = 0x12,

MSG_STATUS_CONSOLE_RED = MSG_CLASS_FIRST, /*Red message in the console*/

MSG_EVENT_ORANGE = 0x13, /*Orange message in the console*/

MSG_STATUS_CONSOLE_ORANGE = 0x14, /*Orange message in the console*/

MSG_STATUS_WARNING = 0x15, /*Red message in game window and in the console*/

MSG_EVENT_ADVANCE = 0x16, /*White message in game window and in the console*/

MSG_EVENT_DEFAULT = 0x17, /*White message at the bottom of the game window and in the console*/

MSG_STATUS_DEFAULT = 0x18, /*White message at the bottom of the game window and in the console*/

MSG_INFO_DESCR = 0x19, /*Green message in game window and in the console*/

MSG_STATUS_SMALL = 0x1A, /*White message at the bottom of the game window"*/

MSG_STATUS_CONSOLE_BLUE = 0x1B, /*Blue message in the console*/

MSG_CLASS_LAST = MSG_STATUS_CONSOLE_BLUE

};

 

enum MapMarks_t

{

MAPMARK_TICK = 0x00,

MAPMARK_QUESTION = 0x01,

MAPMARK_EXCLAMATION = 0x02,

MAPMARK_STAR = 0x03,

MAPMARK_CROSS = 0x04,

MAPMARK_TEMPLE = 0x05,

MAPMARK_KISS = 0x06,

MAPMARK_SHOVEL = 0x07,

MAPMARK_SWORD = 0x08,

MAPMARK_FLAG = 0x09,

MAPMARK_LOCK = 0x0A,

MAPMARK_BAG = 0x0B,

MAPMARK_SKULL = 0x0C,

MAPMARK_DOLLAR = 0x0D,

MAPMARK_REDNORTH = 0x0E,

MAPMARK_REDSOUTH = 0x0F,

MAPMARK_REDEAST = 0x10,

MAPMARK_REDWEST = 0x11,

MAPMARK_GREENNORTH = 0x12,

MAPMARK_GREENSOUTH = 0x13

};

 

enum FluidColors_t

{

FLUID_EMPTY = 0x00,

FLUID_BLUE = 0x01,

FLUID_RED = 0x02,

FLUID_BROWN = 0x03,

FLUID_GREEN = 0x04,

FLUID_YELLOW = 0x05,

FLUID_WHITE = 0x06,

FLUID_PURPLE = 0x07

};

 

enum FluidTypes_t

{

FLUID_NONE = FLUID_EMPTY,

FLUID_WATER = FLUID_BLUE,

FLUID_BLOOD = FLUID_RED,

FLUID_BEER = FLUID_BROWN,

FLUID_SLIME = FLUID_GREEN,

FLUID_LEMONADE = FLUID_YELLOW,

FLUID_MILK = FLUID_WHITE,

FLUID_MANA = FLUID_PURPLE,

 

FLUID_LIFE = FLUID_RED + 8,

FLUID_OIL = FLUID_BROWN + 8,

FLUID_URINE = FLUID_YELLOW + 8,

FLUID_COCONUTMILK = FLUID_WHITE + 8,

FLUID_WINE = FLUID_PURPLE + 8,

 

FLUID_MUD = FLUID_BROWN + 16,

FLUID_FRUITJUICE = FLUID_YELLOW + 16,

 

FLUID_LAVA = FLUID_RED + 24,

FLUID_RUM = FLUID_BROWN + 24,

FLUID_SWAMP = FLUID_GREEN + 24,

};

 

const uint8_t reverseFluidMap[] =

{

FLUID_EMPTY,

FLUID_WATER,

FLUID_MANA,

FLUID_BEER,

FLUID_EMPTY,

FLUID_BLOOD,

FLUID_SLIME,

FLUID_EMPTY,

FLUID_LEMONADE,

FLUID_MILK

};

 

enum ClientFluidTypes_t

{

CLIENTFLUID_EMPTY = 0x00,

CLIENTFLUID_BLUE = 0x01,

CLIENTFLUID_PURPLE = 0x02,

CLIENTFLUID_BROWN_1 = 0x03,

CLIENTFLUID_BROWN_2 = 0x04,

CLIENTFLUID_RED = 0x05,

CLIENTFLUID_GREEN = 0x06,

CLIENTFLUID_BROWN = 0x07,

CLIENTFLUID_YELLOW = 0x08,

CLIENTFLUID_WHITE = 0x09

};

 

const uint8_t fluidMap[] =

{

CLIENTFLUID_EMPTY,

CLIENTFLUID_BLUE,

CLIENTFLUID_RED,

CLIENTFLUID_BROWN_1,

CLIENTFLUID_GREEN,

CLIENTFLUID_YELLOW,

CLIENTFLUID_WHITE,

CLIENTFLUID_PURPLE

};

 

enum SquareColor_t

{

SQ_COLOR_NONE = 256,

SQ_COLOR_BLACK = 0,

};

 

enum TextColor_t

{

TEXTCOLOR_BLUE = 5,

TEXTCOLOR_GREEN = 18,

TEXTCOLOR_TEAL = 35,

TEXTCOLOR_LIGHTGREEN = 66,

TEXTCOLOR_DARKBROWN = 78,

TEXTCOLOR_LIGHTBLUE = 89,

TEXTCOLOR_DARKPURPLE = 112,

TEXTCOLOR_BROWN = 120,

TEXTCOLOR_GREY = 129,

TEXTCOLOR_DARKRED = 144,

TEXTCOLOR_DARKPINK = 152,

TEXTCOLOR_PURPLE = 154,

TEXTCOLOR_DARKORANGE = 156,

TEXTCOLOR_RED = 180,

TEXTCOLOR_PINK = 190,

TEXTCOLOR_ORANGE = 192,

TEXTCOLOR_DARKYELLOW = 205,

TEXTCOLOR_YELLOW = 210,

TEXTCOLOR_WHITE = 215,

 

TEXTCOLOR_NONE = 255,

TEXTCOLOR_UNKNOWN = 256

};

 

enum Icons_t

{

ICON_NONE = 0,

ICON_POISON = 1 << 0,

ICON_BURN = 1 << 1,

ICON_ENERGY = 1 << 2,

ICON_DRUNK = 1 << 3,

ICON_MANASHIELD = 1 << 4,

ICON_PARALYZE = 1 << 5,

ICON_HASTE = 1 << 6,

ICON_SWORDS = 1 << 7,

ICON_DROWNING = 1 << 8,

ICON_FREEZING = 1 << 9,

ICON_DAZZLED = 1 << 10,

ICON_CURSED = 1 << 11,

ICON_BUFF = 1 << 12,

ICON_PZ = 1 << 13,

ICON_PROTECTIONZONE = 1 << 14

};

 

enum WeaponType_t

{

WEAPON_NONE = 0,

WEAPON_SWORD = 1,

WEAPON_CLUB = 2,

WEAPON_AXE = 3,

WEAPON_SHIELD = 4,

WEAPON_DIST = 5,

WEAPON_WAND = 6,

WEAPON_AMMO = 7,

WEAPON_FIST = 8

};

 

enum Ammo_t

{

AMMO_NONE = 0,

AMMO_BOLT = 1,

AMMO_ARROW = 2,

AMMO_SPEAR = 3,

AMMO_THROWINGSTAR = 4,

AMMO_THROWINGKNIFE = 5,

AMMO_STONE = 6,

AMMO_SNOWBALL = 7

};

 

enum AmmoAction_t

{

AMMOACTION_NONE,

AMMOACTION_REMOVECOUNT,

AMMOACTION_REMOVECHARGE,

AMMOACTION_MOVE,

AMMOACTION_MOVEBACK

};

 

enum WieldInfo_t

{

WIELDINFO_LEVEL = 1,

WIELDINFO_MAGLV = 2,

WIELDINFO_VOCREQ = 4,

WIELDINFO_PREMIUM = 8

};

 

enum Skulls_t

{

SKULL_NONE = 0,

SKULL_YELLOW = 1,

SKULL_GREEN = 2,

SKULL_WHITE = 3,

SKULL_RED = 4,

SKULL_BLACK = 5,

SKULL_LAST = SKULL_BLACK

};

 

enum PartyShields_t

{

SHIELD_NONE = 0,

SHIELD_WHITEYELLOW = 1,

SHIELD_WHITEBLUE = 2,

SHIELD_BLUE = 3,

SHIELD_YELLOW = 4,

SHIELD_BLUE_SHAREDEXP = 5,

SHIELD_YELLOW_SHAREDEXP = 6,

SHIELD_BLUE_NOSHAREDEXP_BLINK = 7,

SHIELD_YELLOW_NOSHAREDEXP_BLINK = 8,

SHIELD_BLUE_NOSHAREDEXP = 9,

SHIELD_YELLOW_NOSHAREDEXP = 10,

SHIELD_LAST = SHIELD_YELLOW_NOSHAREDEXP

};

 

enum item_t

{

ITEM_FIREFIELD = 1492,

ITEM_FIREFIELD_SAFE = 1500,

 

ITEM_POISONFIELD = 1496,

ITEM_POISONFIELD_SAFE = 1503,

 

ITEM_ENERGYFIELD = 1495,

ITEM_ENERGYFIELD_SAFE = 1504,

 

ITEM_MAGICWALL = 1497,

ITEM_MAGICWALL_SAFE = 11095,

 

ITEM_WILDGROWTH = 1499,

ITEM_WILDGROWTH_SAFE = 11096,

 

ITEM_DEPOT = 2594,

ITEM_LOCKER = 2589,

ITEM_GLOWING_SWITCH = 11060,

 

ITEM_MALE_CORPSE = 6080,

ITEM_FEMALE_CORPSE = 6081,

 

ITEM_MEAT = 2666,

ITEM_HAM = 2671,

ITEM_GRAPE = 2681,

ITEM_APPLE = 2674,

ITEM_BREAD = 2689,

ITEM_ROLL = 2690,

ITEM_CHEESE = 2696,

 

ITEM_FULLSPLASH = 2016,

ITEM_SMALLSPLASH = 2019,

 

ITEM_PARCEL = 2595,

ITEM_PARCEL_STAMPED = 2596,

ITEM_LETTER = 2597,

ITEM_LETTER_STAMPED = 2598,

ITEM_LABEL = 2599,

 

ITEM_WATERBALL_SPLASH = 7711,

ITEM_WATERBALL = 7956,

 

ITEM_HOUSE_TRANSFER = 1968 //read-only

};

 

enum PlayerFlags

{

PlayerFlag_CannotUseCombat = 0, //2^0 = 1

PlayerFlag_CannotAttackPlayer, //2^1 = 2

PlayerFlag_CannotAttackMonster, //2^2 = 4

PlayerFlag_CannotBeAttacked, //2^3 = 8

PlayerFlag_CanConvinceAll, //2^4 = 16

PlayerFlag_CanSummonAll, //2^5 = 32

PlayerFlag_CanIllusionAll, //2^6 = 64

PlayerFlag_CanSenseInvisibility, //2^7 = 128

PlayerFlag_IgnoredByMonsters, //2^8 = 256

PlayerFlag_NotGainInFight, //2^9 = 512

PlayerFlag_HasInfiniteMana, //2^10 = 1024

PlayerFlag_HasInfiniteSoul, //2^11 = 2048

PlayerFlag_HasNoExhaustion, //2^12 = 4096

PlayerFlag_CannotUseSpells, //2^13 = 8192

PlayerFlag_CannotPickupItem, //2^14 = 16384

PlayerFlag_CanAlwaysLogin, //2^15 = 32768

PlayerFlag_CanBroadcast, //2^16 = 65536

PlayerFlag_CanEditHouses, //2^17 = 131072

PlayerFlag_CannotBeBanned, //2^18 = 262144

PlayerFlag_CannotBePushed, //2^19 = 524288

PlayerFlag_HasInfiniteCapacity, //2^20 = 1048576

PlayerFlag_CanPushAllCreatures, //2^21 = 2097152

PlayerFlag_CanTalkRedPrivate, //2^22 = 4194304

PlayerFlag_CanTalkRedChannel, //2^23 = 8388608

PlayerFlag_TalkOrangeHelpChannel, //2^24 = 16777216

PlayerFlag_NotGainExperience, //2^25 = 33554432

PlayerFlag_NotGainMana, //2^26 = 67108864

PlayerFlag_NotGainHealth, //2^27 = 134217728

PlayerFlag_NotGainSkill, //2^28 = 268435456

PlayerFlag_SetMaxSpeed, //2^29 = 536870912

PlayerFlag_SpecialVIP, //2^30 = 1073741824

PlayerFlag_NotGenerateLoot, //2^31 = 2147483648

PlayerFlag_CanTalkRedChannelAnonymous, //2^32 = 4294967296

PlayerFlag_IgnoreProtectionZone, //2^33 = 8589934592

PlayerFlag_IgnoreSpellCheck, //2^34 = 17179869184

PlayerFlag_IgnoreEquipCheck, //2^35 = 34359738368

PlayerFlag_CannotBeMuted, //2^36 = 68719476736

PlayerFlag_IsAlwaysPremium, //2^37 = 137438953472

PlayerFlag_CanAnswerRuleViolations, //2^38 = 274877906944

PlayerFlag_39, //ignore //2^39 = 549755813888 //not used by us

PlayerFlag_ShowGroupNameInsteadOfVocation, //2^40 = 1099511627776

PlayerFlag_HasInfiniteStamina, //2^41 = 2199023255552

PlayerFlag_CannotMoveItems, //2^42 = 4398046511104

PlayerFlag_CannotMoveCreatures, //2^43 = 8796093022208

PlayerFlag_CanReportBugs, //2^44 = 17592186044416

PlayerFlag_45, //ignore //2^45 = 35184372088832 //not used by us

PlayerFlag_CannotBeSeen, //2^46 = 70368744177664

 

PlayerFlag_LastFlag

};

 

enum PlayerCustomFlags

{

PlayerCustomFlag_AllowIdle = 0, //2^0 = 1

PlayerCustomFlag_CanSeePosition, //2^1 = 2

PlayerCustomFlag_CanSeeItemDetails, //2^2 = 4

PlayerCustomFlag_CanSeeCreatureDetails, //2^3 = 8

PlayerCustomFlag_NotSearchable, //2^4 = 16

PlayerCustomFlag_GamemasterPrivileges, //2^5 = 32

PlayerCustomFlag_CanThrowAnywhere, //2^6 = 64

PlayerCustomFlag_CanPushAllItems, //2^7 = 128

PlayerCustomFlag_CanMoveAnywhere, //2^8 = 256

PlayerCustomFlag_CanMoveFromFar, //2^9 = 512

PlayerCustomFlag_CanLoginMultipleCharacters, //2^10 = 1024 (account flag)

PlayerCustomFlag_HasFullLight, //2^11 = 2048

PlayerCustomFlag_CanLogoutAnytime, //2^12 = 4096 (account flag)

PlayerCustomFlag_HideLevel, //2^13 = 8192

PlayerCustomFlag_IsProtected, //2^14 = 16384

PlayerCustomFlag_IsImmune, //2^15 = 32768

PlayerCustomFlag_NotGainSkull, //2^16 = 65536

PlayerCustomFlag_NotGainUnjustified, //2^17 = 131072

PlayerCustomFlag_IgnorePacification, //2^18 = 262144

PlayerCustomFlag_IgnoreLoginDelay, //2^19 = 524288

PlayerCustomFlag_CanStairhop, //2^20 = 1048576

PlayerCustomFlag_CanTurnhop, //2^21 = 2097152

PlayerCustomFlag_IgnoreHouseRent, //2^22 = 4194304

PlayerCustomFlag_CanWearAllAddons, //2^23 = 8388608

 

PlayerCustomFlag_LastFlag

};

 

//Reserved player storage key ranges

//[10000000 - 20000000]

#define PSTRG_RESERVED_RANGE_START 10000000

#define PSTRG_RESERVED_RANGE_SIZE 10000000

 

//[1000 - 1500]

#define PSTRG_OUTFITS_RANGE_START (PSTRG_RESERVED_RANGE_START + 1000)

#define PSTRG_OUTFITS_RANGE_SIZE 500

 

//[1500 - 2000]

#define PSTRG_OUTFITSID_RANGE_START (PSTRG_RESERVED_RANGE_START + 1500)

#define PSTRG_OUTFITSID_RANGE_SIZE 500

 

#define NETWORKMESSAGE_MAXSIZE 15360

#define IPBAN_FLAG 128

#define LOCALHOST 2130706433

 

#define IS_IN_KEYRANGE(key, range) (key >= PSTRG_##range##_START && ((key - PSTRG_##range##_START) < PSTRG_##range##_SIZE))

#endif

 

 

salve e abre o arquivo,tolls.cpp.

apague e adicione isto:

////////////////////////////////////////////////////////////////////////

// OpenTibia - an opensource roleplaying game

////////////////////////////////////////////////////////////////////////

// This program is free software: you can redistribute it and/or modify

// it under the terms of the GNU General Public License as published by

// the Free Software Foundation, either version 3 of the License, or

// (at your option) any alater version.

//

// This program is distributed in the hope that it will be useful,

// but WITHOUT ANY WARRANTY; without even the implied warranty of

// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the

// GNU General Public License for more details.

//

// You should have received a copy of the GNU General Public License

// along with this program. If not, see <http://www.gnu.org/licenses/>.

////////////////////////////////////////////////////////////////////////

#include "otpch.h"

#include <iostream>

#include <iomanip>

 

#include "tools.h"

#include "md5.h"

#include "sha1.h"

 

#include "vocation.h"

#include "configmanager.h"

extern ConfigManager g_config;

 

std::string transformToSHA1(std::string plainText, bool upperCase)

{

SHA1 sha1;

unsigned sha1Hash[5];

std::stringstream hexStream;

 

sha1.Input((const uint8_t*)plainText.c_str(), plainText.length());

sha1.Result(sha1Hash);

 

hexStream.flags(std::ios::hex | std::ios::uppercase);

for(uint32_t i = 0; i < 5; ++i)

hexStream << std::setw(8) << std::setfill('0') << (uint32_t)sha1Hash;

 

std::string hexStr = hexStream.str();

if(!upperCase)

toLowerCaseString(hexStr);

 

return hexStr;

}

 

std::string transformToMD5(std::string plainText, bool upperCase)

{

MD5_CTX m_md5;

std::stringstream hexStream;

 

MD5Init(&m_md5, 0);

MD5Update(&m_md5, (const uint8_t*)plainText.c_str(), plainText.length());

MD5Final(&m_md5);

 

hexStream.flags(std::ios::hex | std::ios::uppercase);

for(uint32_t i = 0; i < 16; ++i)

hexStream << std::setw(2) << std::setfill('0') << (uint32_t)m_md5.digest;

 

std::string hexStr = hexStream.str();

if(!upperCase)

toLowerCaseString(hexStr);

 

return hexStr;

}

 

void _encrypt(std::string& str, bool upperCase)

{

switch(g_config.getNumber(ConfigManager::ENCRYPTION))

{

case ENCRYPTION_MD5:

str = transformToMD5(str, upperCase);

break;

case ENCRYPTION_SHA1:

str = transformToSHA1(str, upperCase);

break;

default:

{

if(upperCase)

std::transform(str.begin(), str.end(), str.begin(), upchar);

 

break;

}

}

}

 

bool encryptTest(std::string plain, std::string& hash)

{

std::transform(hash.begin(), hash.end(), hash.begin(), upchar);

_encrypt(plain, true);

return plain == hash;

}

 

void replaceString(std::string& text, const std::string key, const std::string value)

{

if(value.find(key) != std::string::npos) //don't allow infinite loops

return;

 

for(std::string::size_type keyStart = text.find(key); keyStart

!= std::string::npos; keyStart = text.find(key))

text.replace(keyStart, key.size(), value);

}

 

void trim_right(std::string& source, const std::string& t)

{

source.erase(source.find_last_not_of(t)+1);

}

 

void trim_left(std::string& source, const std::string& t)

{

source.erase(0, source.find_first_not_of(t));

}

 

void toLowerCaseString(std::string& source)

{

std::transform(source.begin(), source.end(), source.begin(), tolower);

}

 

void toUpperCaseString(std::string& source)

{

std::transform(source.begin(), source.end(), source.begin(), upchar);

}

 

std::string asLowerCaseString(const std::string& source)

{

std::string s = source;

toLowerCaseString(s);

return s;

}

 

std::string asUpperCaseString(const std::string& source)

{

std::string s = source;

toUpperCaseString(s);

return s;

}

 

bool booleanString(std::string source)

{

toLowerCaseString(source);

return (source == "yes" || source == "true" || atoi(source.c_str()) > 0);

}

 

bool readXMLInteger(xmlNodePtr node, const char* tag, int& value)

{

char* nodeValue = (char*)xmlGetProp(node, (xmlChar*)tag);

if(!nodeValue)

return false;

 

value = atoi(nodeValue);

xmlFree(nodeValue);

return true;

}

 

#if defined WINDOWS && !defined __GNUC__

bool readXMLInteger(xmlNodePtr node, const char* tag, int32_t& value)

{

char* nodeValue = (char*)xmlGetProp(node, (xmlChar*)tag);

if(!nodeValue)

return false;

 

value = atoi(nodeValue);

xmlFree(nodeValue);

return true;

}

#endif

 

bool readXMLInteger64(xmlNodePtr node, const char* tag, int64_t& value)

{

char* nodeValue = (char*)xmlGetProp(node, (xmlChar*)tag);

if(!nodeValue)

return false;

 

value = atoll(nodeValue);

xmlFree(nodeValue);

return true;

}

 

bool readXMLFloat(xmlNodePtr node, const char* tag, float& value)

{

char* nodeValue = (char*)xmlGetProp(node, (xmlChar*)tag);

if(!nodeValue)

return false;

 

value = atof(nodeValue);

xmlFree(nodeValue);

return true;

}

 

bool readXMLString(xmlNodePtr node, const char* tag, std::string& value)

{

char* nodeValue = (char*)xmlGetProp(node, (xmlChar*)tag);

if(!nodeValue)

return false;

 

if(!utf8ToLatin1(nodeValue, value))

value = nodeValue;

 

xmlFree(nodeValue);

return true;

}

 

bool readXMLContentString(xmlNodePtr node, std::string& value)

{

char* nodeValue = (char*)xmlNodeGetContent(node);

if(!nodeValue)

return false;

 

if(!utf8ToLatin1(nodeValue, value))

value = nodeValue;

 

xmlFree(nodeValue);

return true;

}

 

bool parseXMLContentString(xmlNodePtr node, std::string& value)

{

bool result = false;

std::string compareValue;

while(node)

{

if(xmlStrcmp(node->name, (const xmlChar*)"text") && node->type != XML_CDATA_SECTION_NODE)

{

node = node->next;

continue;

}

 

if(!readXMLContentString(node, compareValue))

{

node = node->next;

continue;

}

 

trim_left(compareValue, "\r");

trim_left(compareValue, "\n");

trim_left(compareValue, " ");

if(compareValue.length() > value.length())

{

value = compareValue;

if(!result)

result = true;

}

 

node = node->next;

}

 

return result;

}

 

std::string getLastXMLError()

{

std::stringstream ss;

xmlErrorPtr lastError = xmlGetLastError();

if(lastError->line)

ss << "Line: " << lastError->line << ", ";

 

ss << "Info: " << lastError->message << std::endl;

return ss.str();

}

 

bool utf8ToLatin1(char* intext, std::string& outtext)

{

outtext = "";

if(!intext)

return false;

 

int32_t inlen = strlen(intext);

if(!inlen)

return false;

 

int32_t outlen = inlen * 2;

uint8_t* outbuf = new uint8_t[outlen];

 

int32_t res = UTF8Toisolat1(outbuf, &outlen, (uint8_t*)intext, &inlen);

if(res < 0)

{

delete[] outbuf;

return false;

}

 

outbuf[outlen] = '\0';

outtext = (char*)outbuf;

 

delete[] outbuf;

return true;

}

 

StringVec explodeString(const std::string& string, const std::string& separator)

{

StringVec returnVector;

size_t start = 0, end = 0;

while((end = string.find(separator, start)) != std::string::npos)

{

returnVector.push_back(string.substr(start, end - start));

start = end + separator.size();

}

 

returnVector.push_back(string.substr(start));

return returnVector;

}

 

IntegerVec vectorAtoi(StringVec stringVector)

{

IntegerVec returnVector;

for(StringVec::iterator it = stringVector.begin(); it != stringVector.end(); ++it)

returnVector.push_back(atoi((*it).c_str()));

 

return returnVector;

}

 

bool hasBitSet(uint32_t flag, uint32_t flags)

{

return ((flags & flag) == flag);

}

 

int32_t round(float v)

{

int32_t t = (int32_t)std::floor(v);

if((v - t) > 0.5)

return t + 1;

 

return t;

}

 

uint32_t rand24b()

{

return ((rand() << 12) ^ (rand())) & (0xFFFFFF);

}

 

float box_muller(float m, float s)

{

// normal random variate generator

// mean m, standard deviation s

float x1, x2, w, y1;

static float y2;

 

static bool useLast = false;

if(useLast) // use value from previous call

{

y1 = y2;

useLast = false;

return (m + y1 * s);

}

 

do

{

double r1 = (((float)(rand()) / RAND_MAX));

double r2 = (((float)(rand()) / RAND_MAX));

 

x1 = 2.0 * r1 - 1.0;

x2 = 2.0 * r2 - 1.0;

w = x1 * x1 + x2 * x2;

}

while(w >= 1.0);

w = sqrt((-2.0 * log(w)) / w);

 

y1 = x1 * w;

y2 = x2 * w;

 

useLast = true;

return (m + y1 * s);

}

 

int32_t random_range(int32_t lowestNumber, int32_t highestNumber, DistributionType_t type /*= DISTRO_UNIFORM*/)

{

if(highestNumber == lowestNumber)

return lowestNumber;

 

if(lowestNumber > highestNumber)

std::swap(lowestNumber, highestNumber);

 

switch(type)

{

case DISTRO_UNIFORM:

return (lowestNumber + ((int32_t)rand24b() % (highestNumber - lowestNumber + 1)));

case DISTRO_NORMAL:

return (lowestNumber + int32_t(float(highestNumber - lowestNumber) * (float)std::min((float)1, std::max((float)0, box_muller(0.5, 0.25)))));

default:

break;

}

 

const float randMax = 16777216;

return (lowestNumber + int32_t(float(highestNumber - lowestNumber) * float(1.f - sqrt((1.f * rand24b()) / randMax))));

}

 

char upchar(char character)

{

if((character >= 97 && character <= 122) || (character <= -1 && character >= -32))

character -= 32;

 

return character;

}

 

bool isNumber(char character)

{

return (character >= 48 && character <= 57);

}

 

bool isLowercaseLetter(char character)

{

return (character >= 97 && character <= 122);

}

 

bool isUppercaseLetter(char character)

{

return (character >= 65 && character <= 90);

}

 

bool isPasswordCharacter(char character)

{

return ((character >= 33 && character <= 47) || (character >= 58 && character <= 64) || (character >= 91 && character <= 96) || (character >= 123 && character <= 126));

}

 

bool isValidAccountName(std::string text)

{

toLowerCaseString(text);

 

uint32_t textLength = text.length();

for(uint32_t size = 0; size < textLength; size++)

{

if(!isLowercaseLetter(text) && !isNumber(text))

return false;

}

 

return true;

}

 

bool isValidPassword(std::string text)

{

toLowerCaseString(text);

 

uint32_t textLength = text.length();

for(uint32_t size = 0; size < textLength; size++)

{

if(!isLowercaseLetter(text) && !isNumber(text) && !isPasswordCharacter(text))

return false;

}

 

return true;

}

 

bool isValidName(std::string text, bool forceUppercaseOnFirstLetter/* = true*/)

{

uint32_t textLength = text.length(), lenBeforeSpace = 1, lenBeforeQuote = 1, lenBeforeDash = 1, repeatedCharacter = 0;

char lastChar = 32;

if(forceUppercaseOnFirstLetter)

{

if(!isUppercaseLetter(text[0]))

return false;

}

else if(!isLowercaseLetter(text[0]) && !isUppercaseLetter(text[0]))

return false;

 

for(uint32_t size = 1; size < textLength; size++)

{

if(text != 32)

{

lenBeforeSpace++;

 

if(text != 39)

lenBeforeQuote++;

else

{

if(lenBeforeQuote <= 1 || size == textLength - 1 || text == 32)

return false;

 

lenBeforeQuote = 0;

}

 

if(text != 45)

lenBeforeDash++;

else

{

if(lenBeforeDash <= 1 || size == textLength - 1 || text == 32)

return false;

 

lenBeforeDash = 0;

}

 

if(text == lastChar)

{

repeatedCharacter++;

if(repeatedCharacter > 2)

return false;

}

else

repeatedCharacter = 0;

 

lastChar = text;

}

else

{

if(lenBeforeSpace <= 1 || size == textLength - 1 || text == 32)

return false;

 

lenBeforeSpace = lenBeforeQuote = lenBeforeDash = 0;

}

 

if(!(isLowercaseLetter(text) || text == 32 || text == 39 || text == 45

|| (isUppercaseLetter(text) && text == 32)))

return false;

}

 

return true;

}

 

bool isNumbers(std::string text)

{

uint32_t textLength = text.length();

for(uint32_t size = 0; size < textLength; size++)

{

if(!isNumber(text))

return false;

}

 

return true;

}

 

bool checkText(std::string text, std::string str)

{

trimString(text);

return asLowerCaseString(text) == str;

}

 

std::string generateRecoveryKey(int32_t fieldCount, int32_t fieldLenght)

{

std::stringstream key;

int32_t i = 0, j = 0, lastNumber = 99, number = 0;

 

char character = 0, lastCharacter = 0;

bool madeNumber = false, madeCharacter = false;

do

{

do

{

madeNumber = madeCharacter = false;

if((bool)random_range(0, 1))

{

number = random_range(2, 9);

if(number != lastNumber)

{

key << number;

lastNumber = number;

madeNumber = true;

}

}

else

{

character = (char)random_range(65, 90);

if(character != lastCharacter)

{

key << character;

lastCharacter = character;

madeCharacter = true;

}

}

}

while((!madeCharacter && !madeNumber) ? true : (++j && j < fieldLenght));

lastCharacter = character = number = j = 0;

 

lastNumber = 99;

if(i < fieldCount - 1)

key << "-";

}

while(++i && i < fieldCount);

return key.str();

}

 

std::string trimString(std::string& str)

{

str.erase(str.find_last_not_of(" ") + 1);

return str.erase(0, str.find_first_not_of(" "));

}

 

std::string parseParams(tokenizer::iterator &it, tokenizer::iterator end)

{

if(it == end)

return "";

 

std::string tmp = (*it);

++it;

if(tmp[0] == '"')

{

tmp.erase(0, 1);

while(it != end && tmp[tmp.length() - 1] != '"')

{

tmp += " " + (*it);

++it;

}

 

if(tmp.length() > 0 && tmp[tmp.length() - 1] == '"')

tmp.erase(tmp.length() - 1);

}

 

return tmp;

}

 

std::string formatDate(time_t _time/* = 0*/)

{

char buffer[21];

if(!_time)

_time = time(NULL);

 

const tm* tms = localtime(&_time);

if(tms)

sprintf(buffer, "%02d/%02d/%04d %02d:%02d:%02d", tms->tm_mday, tms->tm_mon + 1, tms->tm_year + 1900, tms->tm_hour, tms->tm_min, tms->tm_sec);

else

sprintf(buffer, "UNIX Time: %d", (int32_t)_time);

 

return buffer;

}

 

std::string formatDateShort(time_t _time, bool detailed/* = false*/)

{

char buffer[21];

if(!_time)

_time = time(NULL);

 

const tm* tms = localtime(&_time);

if(tms)

{

std::string format = "%d %b %Y";

if(detailed)

format += " %H:%M:%S";

 

strftime(buffer, 25, format.c_str(), tms);

}

else

sprintf(buffer, "UNIX Time: %d", (int32_t)_time);

 

return buffer;

}

 

std::string formatTime(int32_t hours, int32_t minutes)

{

std::stringstream time;

if(hours)

time << hours << " " << (hours > 1 ? "hours" : "hour") << (minutes ? " and " : "");

 

if(minutes)

time << minutes << " " << (minutes > 1 ? "minutes" : "minute");

 

return time.str();

}

 

std::string convertIPAddress(uint32_t ip)

{

char buffer[17];

sprintf(buffer, "%d.%d.%d.%d", ip & 0xFF, (ip >> 8) & 0xFF, (ip >> 16) & 0xFF, (ip >> 24));

return buffer;

}

 

Skulls_t getSkull(std::string strValue)

{

std::string tmpStrValue = asLowerCaseString(strValue);

if(tmpStrValue == "black" || tmpStrValue == "5")

return SKULL_BLACK;

else if(tmpStrValue == "red" || tmpStrValue == "4")

return SKULL_RED;

else if(tmpStrValue == "white" || tmpStrValue == "3")

return SKULL_WHITE;

else if(tmpStrValue == "green" || tmpStrValue == "2")

return SKULL_GREEN;

else if(tmpStrValue == "yellow" || tmpStrValue == "1")

return SKULL_YELLOW;

 

return SKULL_NONE;

}

 

PartyShields_t getPartyShield(std::string strValue)

{

std::string tmpStrValue = asLowerCaseString(strValue);

if(tmpStrValue == "whitenoshareoff" || tmpStrValue == "10")

return SHIELD_YELLOW_NOSHAREDEXP;

else if(tmpStrValue == "blueshareoff" || tmpStrValue == "9")

return SHIELD_BLUE_NOSHAREDEXP;

else if(tmpStrValue == "yellowshareblink" || tmpStrValue == "8")

return SHIELD_YELLOW_NOSHAREDEXP_BLINK;

else if(tmpStrValue == "blueshareblink" || tmpStrValue == "7")

return SHIELD_BLUE_NOSHAREDEXP_BLINK;

else if(tmpStrValue == "yellowshareon" || tmpStrValue == "6")

return SHIELD_YELLOW_SHAREDEXP;

else if(tmpStrValue == "blueshareon" || tmpStrValue == "5")

return SHIELD_BLUE_SHAREDEXP;

else if(tmpStrValue == "yellow" || tmpStrValue == "4")

return SHIELD_YELLOW;

else if(tmpStrValue == "blue" || tmpStrValue == "3")

return SHIELD_BLUE;

else if(tmpStrValue == "whiteyellow" || tmpStrValue == "2")

return SHIELD_WHITEYELLOW;

else if(tmpStrValue == "whiteblue" || tmpStrValue == "1")

return SHIELD_WHITEBLUE;

 

return SHIELD_NONE;

}

 

Direction getDirection(std::string string)

{

if(string == "north" || string == "n" || string == "0")

return NORTH;

else if(string == "east" || string == "e" || string == "1")

return EAST;

else if(string == "south" || string == "s" || string == "2")

return SOUTH;

else if(string == "west" || string == "w" || string == "3")

return WEST;

else if(string == "southwest" || string == "south west" || string == "south-west" || string == "sw" || string == "4")

return SOUTHWEST;

else if(string == "southeast" || string == "south east" || string == "south-east" || string == "se" || string == "5")

return SOUTHEAST;

else if(string == "northwest" || string == "north west" || string == "north-west" || string == "nw" || string == "6")

return NORTHWEST;

else if(string == "northeast" || string == "north east" || string == "north-east" || string == "ne" || string == "7")

return NORTHEAST;

 

return SOUTH;

}

 

Direction getDirectionTo(Position pos1, Position pos2, bool extended/* = true*/)

{

Direction direction = NORTH;

if(pos1.x > pos2.x)

{

direction = WEST;

if(extended)

{

if(pos1.y > pos2.y)

direction = NORTHWEST;

else if(pos1.y < pos2.y)

direction = SOUTHWEST;

}

}

else if(pos1.x < pos2.x)

{

direction = EAST;

if(extended)

{

if(pos1.y > pos2.y)

direction = NORTHEAST;

else if(pos1.y < pos2.y)

direction = SOUTHEAST;

}

}

else

{

if(pos1.y > pos2.y)

direction = NORTH;

else if(pos1.y < pos2.y)

direction = SOUTH;

}

 

return direction;

}

 

Direction getReverseDirection(Direction dir)

{

switch(dir)

{

case NORTH:

return SOUTH;

case SOUTH:

return NORTH;

case WEST:

return EAST;

case EAST:

return WEST;

case SOUTHWEST:

return NORTHEAST;

case NORTHWEST:

return SOUTHEAST;

case NORTHEAST:

return SOUTHWEST;

case SOUTHEAST:

return NORTHWEST;

}

 

return SOUTH;

}

 

Position getNextPosition(Direction direction, Position pos)

{

switch(direction)

{

case NORTH:

pos.y--;

break;

case SOUTH:

pos.y++;

break;

case WEST:

pos.x--;

break;

case EAST:

pos.x++;

break;

case SOUTHWEST:

pos.x--;

pos.y++;

break;

case NORTHWEST:

pos.x--;

pos.y--;

break;

case SOUTHEAST:

pos.x++;

pos.y++;

break;

case NORTHEAST:

pos.x++;

pos.y--;

break;

}

 

return pos;

}

 

struct AmmoTypeNames

{

const char* name;

Ammo_t ammoType;

};

 

struct MagicEffectNames

{

const char* name;

MagicEffect_t magicEffect;

};

 

struct ShootTypeNames

{

const char* name;

ShootEffect_t shootType;

};

 

struct CombatTypeNames

{

const char* name;

CombatType_t combatType;

};

 

struct AmmoActionNames

{

const char* name;

AmmoAction_t ammoAction;

};

 

struct FluidTypeNames

{

const char* name;

FluidTypes_t fluidType;

};

 

struct SkillIdNames

{

const char* name;

skills_t skillId;

};

 

MagicEffectNames magicEffectNames[] =

{

{"redspark", MAGIC_EFFECT_DRAW_BLOOD},

{"bluebubble", MAGIC_EFFECT_LOSE_ENERGY},

{"poff", MAGIC_EFFECT_POFF},

{"yellowspark", MAGIC_EFFECT_BLOCKHIT},

{"explosionarea", MAGIC_EFFECT_EXPLOSION_AREA},

{"explosion", MAGIC_EFFECT_EXPLOSION_DAMAGE},

{"firearea", MAGIC_EFFECT_FIRE_AREA},

{"yellowbubble", MAGIC_EFFECT_YELLOW_RINGS},

{"greenbubble", MAGIC_EFFECT_POISON_RINGS},

{"blackspark", MAGIC_EFFECT_HIT_AREA},

{"teleport", MAGIC_EFFECT_TELEPORT},

{"energy", MAGIC_EFFECT_ENERGY_DAMAGE},

{"blueshimmer", MAGIC_EFFECT_WRAPS_BLUE},

{"redshimmer", MAGIC_EFFECT_WRAPS_RED},

{"greenshimmer", MAGIC_EFFECT_WRAPS_GREEN},

{"fire", MAGIC_EFFECT_HITBY_FIRE},

{"greenspark", MAGIC_EFFECT_POISON},

{"mortarea", MAGIC_EFFECT_MORT_AREA},

{"greennote", MAGIC_EFFECT_SOUND_GREEN},

{"rednote", MAGIC_EFFECT_SOUND_RED},

{"poison", MAGIC_EFFECT_POISON_AREA},

{"yellownote", MAGIC_EFFECT_SOUND_YELLOW},

{"purplenote", MAGIC_EFFECT_SOUND_PURPLE},

{"bluenote", MAGIC_EFFECT_SOUND_BLUE},

{"whitenote", MAGIC_EFFECT_SOUND_WHITE},

{"bubbles", MAGIC_EFFECT_BUBBLES},

{"dice", MAGIC_EFFECT_CRAPS},

{"giftwraps", MAGIC_EFFECT_GIFT_WRAPS},

{"yellowfirework", MAGIC_EFFECT_FIREWORK_YELLOW},

{"redfirework", MAGIC_EFFECT_FIREWORK_RED},

{"bluefirework", MAGIC_EFFECT_FIREWORK_BLUE},

{"stun", MAGIC_EFFECT_STUN},

{"sleep", MAGIC_EFFECT_SLEEP},

{"watercreature", MAGIC_EFFECT_WATERCREATURE},

{"groundshaker", MAGIC_EFFECT_GROUNDSHAKER},

{"hearts", MAGIC_EFFECT_HEARTS},

{"fireattack", MAGIC_EFFECT_FIREATTACK},

{"energyarea", MAGIC_EFFECT_ENERGY_AREA},

{"smallclouds", MAGIC_EFFECT_SMALLCLOUDS},

{"holydamage", MAGIC_EFFECT_HOLYDAMAGE},

{"bigclouds", MAGIC_EFFECT_BIGCLOUDS},

{"icearea", MAGIC_EFFECT_ICEAREA},

{"icetornado", MAGIC_EFFECT_ICETORNADO},

{"iceattack", MAGIC_EFFECT_ICEATTACK},

{"stones", MAGIC_EFFECT_STONES},

{"smallplants", MAGIC_EFFECT_SMALLPLANTS},

{"carniphila", MAGIC_EFFECT_CARNIPHILA},

{"purpleenergy", MAGIC_EFFECT_PURPLEENERGY},

{"yellowenergy", MAGIC_EFFECT_YELLOWENERGY},

{"holyarea", MAGIC_EFFECT_HOLYAREA},

{"bigplants", MAGIC_EFFECT_BIGPLANTS},

{"cake", MAGIC_EFFECT_CAKE},

{"giantice", MAGIC_EFFECT_GIANTICE},

{"watersplash", MAGIC_EFFECT_WATERSPLASH},

{"plantattack", MAGIC_EFFECT_PLANTATTACK},

{"tutorialarrow", MAGIC_EFFECT_TUTORIALARROW},

{"tutorialsquare", MAGIC_EFFECT_TUTORIALSQUARE},

{"mirrorhorizontal", MAGIC_EFFECT_MIRRORHORIZONTAL},

{"mirrorvertical", MAGIC_EFFECT_MIRRORVERTICAL},

{"skullhorizontal", MAGIC_EFFECT_SKULLHORIZONTAL},

{"skullvertical", MAGIC_EFFECT_SKULLVERTICAL},

{"assassin", MAGIC_EFFECT_ASSASSIN},

{"stepshorizontal", MAGIC_EFFECT_STEPSHORIZONTAL},

{"bloodysteps", MAGIC_EFFECT_BLOODYSTEPS},

{"stepsvertical", MAGIC_EFFECT_STEPSVERTICAL},

{"yalaharighost", MAGIC_EFFECT_YALAHARIGHOST},

{"bats", MAGIC_EFFECT_BATS},

{"smoke", MAGIC_EFFECT_SMOKE},

{"insects", MAGIC_EFFECT_INSECTS},

{"pink", MAGIC_EFFECT_PINK},

{"red", MAGIC_EFFECT_RED},

{"bluek", MAGIC_EFFECT_BLUEK},

{"blueki", MAGIC_EFFECT_BLUEKI},

{"blueb", MAGIC_EFFECT_BLUEB},

{"kameblue", MAGIC_EFFECT_KAMEBLUE},

{"generiki", MAGIC_EFFECT_GENERIK},

{"generikib", MAGIC_EFFECT_GENERIKB},

{"generikia", MAGIC_EFFECT_GENERIKA},

{"generikigreen", MAGIC_EFFECT_GENERIKGREEN},

{"greenone", MAGIC_EFFECT_GREENONE},

{"greentwo", MAGIC_EFFECT_GREENTWO},

{"greenthree", MAGIC_EFFECT_GREENTHREE},

{"greenfour", MAGIC_EFFECT_GREENFOUR},

{"greenfive", MAGIC_EFFECT_GREENFIVE},

{"orange", MAGIC_EFFECT_ORANGE},

{"orangeone", MAGIC_EFFECT_ORANGEONE},

{"orangetwo", MAGIC_EFFECT_ORANGETWO},

{"orangethree", MAGIC_EFFECT_ORANGETHREE},

{"orangefour", MAGIC_EFFECT_ORANGEFOUR},

{"orangefive", MAGIC_EFFECT_ORANGEFIVE},

{"pinkb", MAGIC_EFFECT_PINKB},

{"pinkone", MAGIC_EFFECT_PINKONE},

{"pinktwo", MAGIC_EFFECT_PINKTWO},

{"pinkthree", MAGIC_EFFECT_PINKTHREE},

{"pinkfour", MAGIC_EFFECT_PINKFOUR},

{"yellowb", MAGIC_EFFECT_YELLOWB},

{"yellowone", MAGIC_EFFECT_YELLOWONE},

{"yellowtwo", MAGIC_EFFECT_YELLOWTWO},

{"yellowthree", MAGIC_EFFECT_YELLOWTHREE},

{"yellowfour", MAGIC_EFFECT_YELLOWFOUR},

{"yellowfive", MAGIC_EFFECT_YELLOWFIVE},

{"yellowsix", MAGIC_EFFECT_YELLOWSIX},

{"yellowseven", MAGIC_EFFECT_YELLOWSEVEN},

{"yelloweight", MAGIC_EFFECT_YELLOWEIGHT},

{"yellownine", MAGIC_EFFECT_YELLOWNINE},

{"yellowten", MAGIC_EFFECT_YELLOWTEN},

{"yelloweleven", MAGIC_EFFECT_YELLOWELEVEN},

{"pinka", MAGIC_EFFECT_PINKA},

{"pinkc", MAGIC_EFFECT_PINKC},

{"pinkd", MAGIC_EFFECT_PINKD},

{"pinke", MAGIC_EFFECT_PINKE},

{"pinkf", MAGIC_EFFECT_PINKF},

{"pinkg", MAGIC_EFFECT_PINKG},

{"pinkh", MAGIC_EFFECT_PINKH},

{"pinki", MAGIC_EFFECT_PINKI},

{"pinkj", MAGIC_EFFECT_PINKJ},

{"pinkl", MAGIC_EFFECT_PINKL},

{"pinkl", MAGIC_EFFECT_PINKL},

{"pinkm", MAGIC_EFFECT_PINKM},

{"pinkn", MAGIC_EFFECT_PINKN},

{"pinko", MAGIC_EFFECT_PINKO},

{"pinkp", MAGIC_EFFECT_PINKP},

{"pinkq", MAGIC_EFFECT_PINKQ},

{"pinkr", MAGIC_EFFECT_PINKR},

{"pinks", MAGIC_EFFECT_PINKS},

{"pinkt", MAGIC_EFFECT_PINKT},

{"pinku", MAGIC_EFFECT_PINKU},

{"pinkv", MAGIC_EFFECT_PINKV},

{"pinkx", MAGIC_EFFECT_PINKX},

{"pinkz", MAGIC_EFFECT_PINKZ},

{"graya", MAGIC_EFFECT_GRAYA},

{"grayb", MAGIC_EFFECT_GRAYB},

{"grayc", MAGIC_EFFECT_GRAYC},

{"grayd", MAGIC_EFFECT_GRAYD},

{"graye", MAGIC_EFFECT_GRAYE},

{"grayf", MAGIC_EFFECT_GRAYF},

{"grayg", MAGIC_EFFECT_GRAYG},

{"grayh", MAGIC_EFFECT_GRAYH},

{"grayi", MAGIC_EFFECT_GRAYI},

{"grayj", MAGIC_EFFECT_GRAYJ},

{"grayl", MAGIC_EFFECT_GRAYL},

{"graym", MAGIC_EFFECT_GRAYM},

{"grayn", MAGIC_EFFECT_GRAYN},

{"grayo", MAGIC_EFFECT_GRAYO},

{"grayp", MAGIC_EFFECT_GRAYP},

{"grayq", MAGIC_EFFECT_GRAYQ},

{"grayr", MAGIC_EFFECT_GRAYR},

{"grays", MAGIC_EFFECT_GRAYS},

{"grayt", MAGIC_EFFECT_GRAYT},

{"grayu", MAGIC_EFFECT_GRAYU},

{"grayv", MAGIC_EFFECT_GRAYV},

{"grayx", MAGIC_EFFECT_GRAYX},

{"grayz", MAGIC_EFFECT_GRAYZ},

{"blacka", MAGIC_EFFECT_BLACKA},

{"blackb", MAGIC_EFFECT_BLACKB},

{"blackc", MAGIC_EFFECT_BLACKC},

{"blackd", MAGIC_EFFECT_BLACKD},

{"blacke", MAGIC_EFFECT_BLACKE},

{"blackf", MAGIC_EFFECT_BLACKF},

{"blackg", MAGIC_EFFECT_BLACKG},

{"blackh", MAGIC_EFFECT_BLACKH},

{"blackj", MAGIC_EFFECT_BLACKJ},

{"blackl", MAGIC_EFFECT_BLACKL},

{"blackm", MAGIC_EFFECT_BLACKM},

{"blackn", MAGIC_EFFECT_BLACKN},

{"blacko", MAGIC_EFFECT_BLACKO},

{"blackp", MAGIC_EFFECT_BLACKP},

{"blackr", MAGIC_EFFECT_BLACKR},

{"blacks", MAGIC_EFFECT_BLACKS},

{"blackt", MAGIC_EFFECT_BLACKT},

{"blacku", MAGIC_EFFECT_BLACKU},

{"blacku", MAGIC_EFFECT_BLACKV},

{"blackx", MAGIC_EFFECT_BLACKX},

{"blackz", MAGIC_EFFECT_BLACKZ},

{"skya", MAGIC_EFFECT_SKYA},

{"skyb", MAGIC_EFFECT_SKYB},

{"skyc", MAGIC_EFFECT_SKYC},

{"skyd", MAGIC_EFFECT_SKYD},

{"skyd", MAGIC_EFFECT_SKYE},

{"skyf", MAGIC_EFFECT_SKYF},

{"skyg", MAGIC_EFFECT_SKYG},

{"skyh", MAGIC_EFFECT_SKYH},

{"skyi", MAGIC_EFFECT_SKYI},

{"skyj", MAGIC_EFFECT_SKYJ},

{"skyl", MAGIC_EFFECT_SKYL},

{"skym", MAGIC_EFFECT_SKYM},

{"skyn", MAGIC_EFFECT_SKYN},

{"skyo", MAGIC_EFFECT_SKYO},

{"skyp", MAGIC_EFFECT_SKYP},

{"skyr", MAGIC_EFFECT_SKYR},

{"skys", MAGIC_EFFECT_SKYS},

{"skyt", MAGIC_EFFECT_SKYT},

{"skyu", MAGIC_EFFECT_SKYU},

{"skyv", MAGIC_EFFECT_SKYV},

{"skyx", MAGIC_EFFECT_SKYX},

{"skyz", MAGIC_EFFECT_SKYZ},

{"fighta", MAGIC_EFFECT_FIGHTA},

{"fightb", MAGIC_EFFECT_FIGHTB},

{"fightc", MAGIC_EFFECT_FIGHTC},

{"fightd", MAGIC_EFFECT_FIGHTD},

{"fighte", MAGIC_EFFECT_FIGHTE},

{"fightf", MAGIC_EFFECT_FIGHTF},

{"fightg", MAGIC_EFFECT_FIGHTG},

{"fighth", MAGIC_EFFECT_FIGHTH},

{"fighti", MAGIC_EFFECT_FIGHTI},

{"redstorm", MAGIC_EFFECT_REDSTORM},

{"burningr", MAGIC_EFFECT_BURNINGR},

{"bluestormz", MAGIC_EFFECT_BLUESTORMZ},

{"blackstormz", MAGIC_EFFECT_BLACKSTORMZ},

{"goldenstormz", MAGIC_EFFECT_GOLDENSTORMZ},

{"darkstormz", MAGIC_EFFECT_DARKSTORMZ},

{"celltransformz", MAGIC_EFFECT_CELLTRANSFORMZ},

{"brollytransformz", MAGIC_EFFECT_BROLLYTRANSFORMZ},

{"fabioum", MAGIC_EFFECT_FABIOUM},

{"fabiodois", MAGIC_EFFECT_FABIODOIS},

{"fabiotres", MAGIC_EFFECT_FABIOTRES},

{"fabioquatro", MAGIC_EFFECT_FABIOQUATRO},

{"fabiocinco", MAGIC_EFFECT_FABIOCINCO},

{"fabioseis", MAGIC_EFFECT_FABIOSEIS},

{"fabiosete", MAGIC_EFFECT_FABIOSETE},

{"fabiooito", MAGIC_EFFECT_FABIOOITO},

{"fabionove", MAGIC_EFFECT_FABIONOVE},

{"fabiodez", MAGIC_EFFECT_FABIODEZ},

{"fabioonze", MAGIC_EFFECT_FABIOONZE},

{"fabiodoze", MAGIC_EFFECT_FABIODOZE},

{"fabiotreze", MAGIC_EFFECT_FABIOTREZE},

{"fabioquatorze", MAGIC_EFFECT_FABIOQUATORZE},

{"fabioquinze", MAGIC_EFFECT_FABIOQUINZE},

{"fabiodezeseis", MAGIC_EFFECT_FABIODEZESEIS},

{"fabiodezesete", MAGIC_EFFECT_FABIODEZESETE},

{"fabiodezoito", MAGIC_EFFECT_FABIODEZOITO},

{"fabiosky", MAGIC_EFFECT_FABIOSKY},

{"fabiodezenove", MAGIC_EFFECT_FABIODEZENOVE},

{"fabiovinte", MAGIC_EFFECT_FABIOVINTE},

{"fabionuys", MAGIC_EFFECT_FABIONUYS},

{"fabiosexynuys", MAGIC_EFFECT_FABIOSEXYNUYS},

{"fabiotrinta", MAGIC_EFFECT_FABIOTRINTA},

{"fabiotrintadois", MAGIC_EFFECT_FABIOTRINTADOIS},

{"fabiotrintatres", MAGIC_EFFECT_FABIOTRINTATRES},

{"fabiotrintaquatro", MAGIC_EFFECT_FABIOTRINTAQUATRO},

{"fabiotrintacinco", MAGIC_EFFECT_FABIOTRINTACINCO},

{"fabiotrintasete", MAGIC_EFFECT_FABIOTRINTASEIS},

{"fabiotrintasete", MAGIC_EFFECT_FABIOTRINTASETE},

{"fabiotrintaoito", MAGIC_EFFECT_FABIOTRINTAOITO},

{"fabiotrintanove", MAGIC_EFFECT_FABIOTRINTANOVE},

{"fabioquarenta", MAGIC_EFFECT_FABIOQUARENTA},

{"fabioquarentadois", MAGIC_EFFECT_FABIOQUARENTADOIS},

{"fabioquarentatres", MAGIC_EFFECT_FABIOQUARENTATRES},

{"fabioquarentaquatro", MAGIC_EFFECT_FABIOQUARENTAQUATRO},

{"fabioquarentacinco", MAGIC_EFFECT_FABIOQUARENTACINCO},

{"fabioquarentaseis", MAGIC_EFFECT_FABIOQUARENTASEIS},

{"fabioquarentasete", MAGIC_EFFECT_FABIOQUARENTASETE},

{"fabioquarentaoito", MAGIC_EFFECT_FABIOQUARENTAOITO}

};

 

ShootTypeNames shootTypeNames[] =

{

{"spear", SHOOT_EFFECT_SPEAR},

{"bolt", SHOOT_EFFECT_BOLT},

{"arrow", SHOOT_EFFECT_ARROW},

{"fire", SHOOT_EFFECT_FIRE},

{"energy", SHOOT_EFFECT_ENERGY},

{"poisonarrow", SHOOT_EFFECT_POISONARROW},

{"burstarrow", SHOOT_EFFECT_BURSTARROW},

{"throwingstar", SHOOT_EFFECT_THROWINGSTAR},

{"throwingknife", SHOOT_EFFECT_THROWINGKNIFE},

{"smallstone", SHOOT_EFFECT_SMALLSTONE},

{"death", SHOOT_EFFECT_DEATH},

{"largerock", SHOOT_EFFECT_LARGEROCK},

{"snowball", SHOOT_EFFECT_SNOWBALL},

{"powerbolt", SHOOT_EFFECT_POWERBOLT},

{"poison", SHOOT_EFFECT_POISONFIELD},

{"infernalbolt", SHOOT_EFFECT_INFERNALBOLT},

{"huntingspear", SHOOT_EFFECT_HUNTINGSPEAR},

{"enchantedspear", SHOOT_EFFECT_ENCHANTEDSPEAR},

{"redstar", SHOOT_EFFECT_REDSTAR},

{"greenstar", SHOOT_EFFECT_GREENSTAR},

{"royalspear", SHOOT_EFFECT_ROYALSPEAR},

{"sniperarrow", SHOOT_EFFECT_SNIPERARROW},

{"onyxarrow", SHOOT_EFFECT_ONYXARROW},

{"piercingbolt", SHOOT_EFFECT_PIERCINGBOLT},

{"whirlwindsword", SHOOT_EFFECT_WHIRLWINDSWORD},

{"whirlwindaxe", SHOOT_EFFECT_WHIRLWINDAXE},

{"whirlwindclub", SHOOT_EFFECT_WHIRLWINDCLUB},

{"etherealspear", SHOOT_EFFECT_ETHEREALSPEAR},

{"ice", SHOOT_EFFECT_ICE},

{"earth", SHOOT_EFFECT_EARTH},

{"holy", SHOOT_EFFECT_HOLY},

{"suddendeath", SHOOT_EFFECT_SUDDENDEATH},

{"flasharrow", SHOOT_EFFECT_FLASHARROW},

{"flammingarrow", SHOOT_EFFECT_FLAMMINGARROW},

{"flamingarrow", SHOOT_EFFECT_FLAMMINGARROW},

{"shiverarrow", SHOOT_EFFECT_SHIVERARROW},

{"energyball", SHOOT_EFFECT_ENERGYBALL},

{"smallice", SHOOT_EFFECT_SMALLICE},

{"smallholy", SHOOT_EFFECT_SMALLHOLY},

{"smallearth", SHOOT_EFFECT_SMALLEARTH},

{"eartharrow", SHOOT_EFFECT_EARTHARROW},

{"explosion", SHOOT_EFFECT_EXPLOSION},

{"cake", SHOOT_EFFECT_CAKE}

};

 

CombatTypeNames combatTypeNames[] =

{

{"physical", COMBAT_PHYSICALDAMAGE},

{"energy", COMBAT_ENERGYDAMAGE},

{"earth", COMBAT_EARTHDAMAGE},

{"fire", COMBAT_FIREDAMAGE},

{"undefined", COMBAT_UNDEFINEDDAMAGE},

{"lifedrain", COMBAT_LIFEDRAIN},

{"life drain", COMBAT_LIFEDRAIN},

{"manadrain", COMBAT_MANADRAIN},

{"mana drain", COMBAT_MANADRAIN},

{"healing", COMBAT_HEALING},

{"drown", COMBAT_DROWNDAMAGE},

{"ice", COMBAT_ICEDAMAGE},

{"holy", COMBAT_HOLYDAMAGE},

{"death", COMBAT_DEATHDAMAGE}

};

 

AmmoTypeNames ammoTypeNames[] =

{

{"spear", AMMO_SPEAR},

{"arrow", AMMO_ARROW},

{"poisonarrow", AMMO_ARROW},

{"burstarrow", AMMO_ARROW},

{"bolt", AMMO_BOLT},

{"powerbolt", AMMO_BOLT},

{"smallstone", AMMO_STONE},

{"largerock", AMMO_STONE},

{"throwingstar", AMMO_THROWINGSTAR},

{"throwingknife", AMMO_THROWINGKNIFE},

{"snowball", AMMO_SNOWBALL},

{"huntingspear", AMMO_SPEAR},

{"royalspear", AMMO_SPEAR},

{"enchantedspear", AMMO_SPEAR},

{"sniperarrow", AMMO_ARROW},

{"onyxarrow", AMMO_ARROW},

{"piercingbolt", AMMO_BOLT},

{"infernalbolt", AMMO_BOLT},

{"flasharrow", AMMO_ARROW},

{"flammingarrow", AMMO_ARROW},

{"flamingarrow", AMMO_ARROW},

{"shiverarrow", AMMO_ARROW},

{"eartharrow", AMMO_ARROW},

{"etherealspear", AMMO_SPEAR}

};

 

AmmoActionNames ammoActionNames[] =

{

{"move", AMMOACTION_MOVE},

{"moveback", AMMOACTION_MOVEBACK},

{"move back", AMMOACTION_MOVEBACK},

{"removecharge", AMMOACTION_REMOVECHARGE},

{"remove charge", AMMOACTION_REMOVECHARGE},

{"removecount", AMMOACTION_REMOVECOUNT},

{"remove count", AMMOACTION_REMOVECOUNT}

};

 

FluidTypeNames fluidTypeNames[] =

{

{"none", FLUID_NONE},

{"water", FLUID_WATER},

{"blood", FLUID_BLOOD},

{"beer", FLUID_BEER},

{"slime", FLUID_SLIME},

{"lemonade", FLUID_LEMONADE},

{"milk", FLUID_MILK},

{"mana", FLUID_MANA},

{"life", FLUID_LIFE},

{"oil", FLUID_OIL},

{"urine", FLUID_URINE},

{"coconutmilk", FLUID_COCONUTMILK},

{"coconut milk", FLUID_COCONUTMILK},

{"wine", FLUID_WINE},

{"mud", FLUID_MUD},

{"fruitjuice", FLUID_FRUITJUICE},

{"fruit juice", FLUID_FRUITJUICE},

{"lava", FLUID_LAVA},

{"rum", FLUID_RUM},

{"swamp", FLUID_SWAMP}

};

 

SkillIdNames skillIdNames[] =

{

{"fist", SKILL_FIST},

{"club", SKILL_CLUB},

{"sword", SKILL_SWORD},

{"axe", SKILL_AXE},

{"distance", SKILL_DIST},

{"dist", SKILL_DIST},

{"shielding", SKILL_SHIELD},

{"shield", SKILL_SHIELD},

{"fishing", SKILL_FISH},

{"fish", SKILL_FISH},

{"level", SKILL__LEVEL},

{"magiclevel", SKILL__MAGLEVEL},

{"magic level", SKILL__MAGLEVEL}

};

 

MagicEffect_t getMagicEffect(const std::string& strValue)

{

for(uint32_t i = 0; i < sizeof(magicEffectNames) / sizeof(MagicEffectNames); ++i)

{

if(!strcasecmp(strValue.c_str(), magicEffectNames.name))

return magicEffectNames.magicEffect;

}

 

return MAGIC_EFFECT_UNKNOWN;

}

 

ShootEffect_t getShootType(const std::string& strValue)

{

for(uint32_t i = 0; i < sizeof(shootTypeNames) / sizeof(ShootTypeNames); ++i)

{

if(!strcasecmp(strValue.c_str(), shootTypeNames.name))

return shootTypeNames.shootType;

}

 

return SHOOT_EFFECT_UNKNOWN;

}

 

CombatType_t getCombatType(const std::string& strValue)

{

for(uint32_t i = 0; i < sizeof(combatTypeNames) / sizeof(CombatTypeNames); ++i)

{

if(!strcasecmp(strValue.c_str(), combatTypeNames.name))

return combatTypeNames.combatType;

}

 

return COMBAT_NONE;

}

 

Ammo_t getAmmoType(const std::string& strValue)

{

for(uint32_t i = 0; i < sizeof(ammoTypeNames) / sizeof(AmmoTypeNames); ++i)

{

if(!strcasecmp(strValue.c_str(), ammoTypeNames.name))

return ammoTypeNames.ammoType;

}

 

return AMMO_NONE;

}

 

AmmoAction_t getAmmoAction(const std::string& strValue)

{

for(uint32_t i = 0; i < sizeof(ammoActionNames) / sizeof(AmmoActionNames); ++i)

{

if(!strcasecmp(strValue.c_str(), ammoActionNames.name))

return ammoActionNames.ammoAction;

}

 

return AMMOACTION_NONE;

}

 

FluidTypes_t getFluidType(const std::string& strValue)

{

for(uint32_t i = 0; i < sizeof(fluidTypeNames) / sizeof(FluidTypeNames); ++i)

{

if(!strcasecmp(strValue.c_str(), fluidTypeNames.name))

return fluidTypeNames.fluidType;

}

 

return FLUID_NONE;

}

 

skills_t getSkillId(const std::string& strValue)

{

for(uint32_t i = 0; i < sizeof(skillIdNames) / sizeof(SkillIdNames); ++i)

{

if(!strcasecmp(strValue.c_str(), skillIdNames.name))

return skillIdNames.skillId;

}

 

return SKILL_FIST;

}

 

std::string getCombatName(CombatType_t combatType)

{

switch(combatType)

{

case COMBAT_PHYSICALDAMAGE:

return "physical";

case COMBAT_ENERGYDAMAGE:

return "energy";

case COMBAT_EARTHDAMAGE:

return "earth";

case COMBAT_FIREDAMAGE:

return "fire";

case COMBAT_UNDEFINEDDAMAGE:

return "undefined";

case COMBAT_LIFEDRAIN:

return "life drain";

case COMBAT_MANADRAIN:

return "mana drain";

case COMBAT_HEALING:

return "healing";

case COMBAT_DROWNDAMAGE:

return "drown";

case COMBAT_ICEDAMAGE:

return "ice";

case COMBAT_HOLYDAMAGE:

return "holy";

case COMBAT_DEATHDAMAGE:

return "death";

default:

break;

}

 

return "unknown";

}

 

std::string getSkillName(uint16_t skillId, bool suffix/* = true*/)

{

switch(skillId)

{

case SKILL_FIST:

{

std::string tmp = "fist";

if(suffix)

tmp += " fighting";

 

return tmp;

}

case SKILL_CLUB:

{

std::string tmp = "club";

if(suffix)

tmp += " fighting";

 

return tmp;

}

case SKILL_SWORD:

{

std::string tmp = "sword";

if(suffix)

tmp += " fighting";

 

return tmp;

}

case SKILL_AXE:

{

std::string tmp = "axe";

if(suffix)

tmp += " fighting";

 

return tmp;

}

case SKILL_DIST:

{

std::string tmp = "distance";

if(suffix)

tmp += " fighting";

 

return tmp;

}

case SKILL_SHIELD:

return "shielding";

case SKILL_FISH:

return "fishing";

case SKILL__MAGLEVEL:

return "magic level";

case SKILL__LEVEL:

return "level";

default:

break;

}

 

return "unknown";

}

 

std::string getReason(int32_t reasonId)

{

switch(reasonId)

{

case 0:

return "Offensive Name";

case 1:

return "Invalid Name Format";

case 2:

return "Unsuitable Name";

case 3:

return "Name Inciting Rule Violation";

case 4:

return "Offensive Statement";

case 5:

return "Spamming";

case 6:

return "Illegal Advertising";

case 7:

return "Off-Topic Public Statement";

case 8:

return "Non-English Public Statement";

case 9:

return "Inciting Rule Violation";

case 10:

return "Bug Abuse";

case 11:

return "Game Weakness Abuse";

case 12:

return "Using Unofficial Software to Play";

case 13:

return "Hacking";

case 14:

return "Multi-Clienting";

case 15:

return "Account Trading or Sharing";

case 16:

return "Threatening Gamemaster";

case 17:

return "Pretending to Have Influence on Rule Enforcement";

case 18:

return "False Report to Gamemaster";

case 19:

return "Destructive Behaviour";

case 20:

return "Excessive Unjustified Player Killing";

default:

break;

}

 

return "Unknown Reason";

}

 

std::string getAction(ViolationAction_t actionId, bool ipBanishment)

{

std::string action = "Unknown";

switch(actionId)

{

case ACTION_NOTATION:

action = "Notation";

break;

case ACTION_NAMEREPORT:

action = "Name Report";

break;

case ACTION_BANISHMENT:

action = "Banishment";

break;

case ACTION_BANREPORT:

action = "Name Report + Banishment";

break;

case ACTION_BANFINAL:

action = "Banishment + Final Warning";

break;

case ACTION_BANREPORTFINAL:

action = "Name Report + Banishment + Final Warning";

break;

case ACTION_STATEMENT:

action = "Statement Report";

break;

//internal use

case ACTION_DELETION:

action = "Deletion";

break;

case ACTION_NAMELOCK:

action = "Name Lock";

break;

case ACTION_BANLOCK:

action = "Name Lock + Banishment";

break;

case ACTION_BANLOCKFINAL:

action = "Name Lock + Banishment + Final Warning";

break;

default:

break;

}

 

if(ipBanishment)

action += " + IP Banishment";

 

return action;

}

 

std::string parseVocationString(StringVec vocStringVec)

{

std::string str = "";

if(!vocStringVec.empty())

{

for(StringVec::iterator it = vocStringVec.begin(); it != vocStringVec.end(); ++it)

{

if((*it) != vocStringVec.front())

{

if((*it) != vocStringVec.back())

str += ", ";

else

str += " and ";

}

 

str += (*it);

str += "s";

}

}

 

return str;

}

 

bool parseVocationNode(xmlNodePtr vocationNode, VocationMap& vocationMap, StringVec& vocStringVec, std::string& errorStr)

{

if(xmlStrcmp(vocationNode->name,(const xmlChar*)"vocation"))

return true;

 

int32_t vocationId = -1;

std::string strValue, tmpStrValue;

if(readXMLString(vocationNode, "name", strValue))

{

vocationId = Vocations::getInstance()->getVocationId(strValue);

if(vocationId != -1)

{

vocationMap[vocationId] = true;

int32_t promotedVocation = Vocations::getInstance()->getPromotedVocation(vocationId);

if(promotedVocation != -1)

vocationMap[promotedVocation] = true;

}

else

{

errorStr = "Wrong vocation name: " + strValue;

return false;

}

}

else if(readXMLString(vocationNode, "id", strValue))

{

IntegerVec intVector;

if(!parseIntegerVec(strValue, intVector))

{

errorStr = "Invalid vocation id - '" + strValue + "'";

return false;

}

 

size_t size = intVector.size();

for(size_t i = 0; i < size; ++i)

{

Vocation* vocation = Vocations::getInstance()->getVocation(intVector);

if(vocation && vocation->getName() != "")

{

vocationId = vocation->getId();

strValue = vocation->getName();

 

vocationMap[vocationId] = true;

int32_t promotedVocation = Vocations::getInstance()->getPromotedVocation(vocationId);

if(promotedVocation != -1)

vocationMap[promotedVocation] = true;

}

else

{

std::stringstream ss;

ss << "Wrong vocation id: " << intVector;

 

errorStr = ss.str();

return false;

}

}

}

 

if(vocationId != -1 && (!readXMLString(vocationNode, "showInDescription", tmpStrValue) || booleanString(tmpStrValue)))

vocStringVec.push_back(asLowerCaseString(strValue));

 

return true;

}

 

bool parseIntegerVec(std::string str, IntegerVec& intVector)

{

StringVec strVector = explodeString(str, ";");

IntegerVec tmpIntVector;

for(StringVec::iterator it = strVector.begin(); it != strVector.end(); ++it)

{

tmpIntVector = vectorAtoi(explodeString((*it), "-"));

if(!tmpIntVector[0] && it->substr(0, 1) != "0")

continue;

 

intVector.push_back(tmpIntVector[0]);

if(tmpIntVector.size() > 1)

{

while(tmpIntVector[0] < tmpIntVector[1])

intVector.push_back(++tmpIntVector[0]);

}

}

 

return true;

}

 

bool fileExists(const char* filename)

{

FILE* f = fopen(filename, "rb");

if(!f)

return false;

 

fclose(f);

return true;

}

 

uint32_t adlerChecksum(uint8_t *data, size_t length)

{

if(length > NETWORKMESSAGE_MAXSIZE || length < 0)

return 0;

 

const uint16_t adler = 65521;

uint32_t a = 1, b = 0;

while(length > 0)

{

size_t tmp = length > 5552 ? 5552 : length;

length -= tmp;

do

{

a += *data++;

b += a;

}

while(--tmp);

 

a %= adler;

b %= adler;

}

 

return (b << 16) | a;

}

 

std::string getFilePath(FileType_t filetype, std::string filename)

{

#ifdef __FILESYSTEM_HIERARCHY_STANDARD__

std::string path = "/usr/share/tfs/";

#endif

std::string path = g_config.getString(ConfigManager::DATA_DIRECTORY);

switch(filetype)

{

case FILE_TYPE_OTHER:

path += filename;

break;

case FILE_TYPE_XML:

path += "XML/" + filename;

break;

case FILE_TYPE_LOG:

#ifndef __FILESYSTEM_HIERARCHY_STANDARD__

path += "logs/" + filename;

#else

path = "/var/log/tfs/" + filename;

#endif

break;

case FILE_TYPE_MOD:

{

#ifndef __FILESYSTEM_HIERARCHY_STANDARD__

path = "mods/" + filename;

#else

path = "/etc/tfs/mods/" + filename;

#endif

break;

}

case FILE_TYPE_CONFIG:

{

#if defined(__FILESYSTEM_HIERARCHY_STANDARD__) && defined(__HOMEDIR_CONF__)

if(fileExists("~/.tfs/" + filename))

path = "~/.tfs/" + filename;

else

path = "/etc/tfs/" + filename;

 

#elif defined(__FILESYSTEM_HIERARCHY_STANDARD__)

path = "/etc/tfs/" + filename;

#else

path = filename;

#endif

break;

}

default:

std::cout << "ERROR: Wrong file type!" << std::endl;

break;

}

return path;

}

 

 

salve e fexe,dai e so compila as sources e por o novo .exe na pasta do server.

 

Se alguem quiser o distro ja pronto add os effects,clique aki.

 

Depois de ter compilado ou pego este distro que postei pra voces,voces abram data/lib/000-constant.lua e adicionem isso:

 

NORTH = 0

EAST = 1

SOUTH = 2

WEST = 3

SOUTHWEST = 4

SOUTHEAST = 5

NORTHWEST = 6

NORTHEAST = 7

 

COMBAT_FORMULA_UNDEFINED = 0

COMBAT_FORMULA_LEVELMAGIC = 1

COMBAT_FORMULA_SKILL = 2

COMBAT_FORMULA_DAMAGE = 3

 

CONDITION_PARAM_OWNER = 1

CONDITION_PARAM_TICKS = 2

CONDITION_PARAM_OUTFIT = 3

CONDITION_PARAM_HEALTHGAIN = 4

CONDITION_PARAM_HEALTHTICKS = 5

CONDITION_PARAM_MANAGAIN = 6

CONDITION_PARAM_MANATICKS = 7

CONDITION_PARAM_DELAYED = 8

CONDITION_PARAM_SPEED = 9

CONDITION_PARAM_LIGHT_LEVEL = 10

CONDITION_PARAM_LIGHT_COLOR = 11

CONDITION_PARAM_SOULGAIN = 12

CONDITION_PARAM_SOULTICKS = 13

CONDITION_PARAM_MINVALUE = 14

CONDITION_PARAM_MAXVALUE = 15

CONDITION_PARAM_STARTVALUE = 16

CONDITION_PARAM_TICKINTERVAL = 17

CONDITION_PARAM_FORCEUPDATE = 18

CONDITION_PARAM_SKILL_MELEE = 19

CONDITION_PARAM_SKILL_FIST = 20

CONDITION_PARAM_SKILL_CLUB = 21

CONDITION_PARAM_SKILL_SWORD = 22

CONDITION_PARAM_SKILL_AXE = 23

CONDITION_PARAM_SKILL_DISTANCE = 24

CONDITION_PARAM_SKILL_SHIELD = 25

CONDITION_PARAM_SKILL_FISHING = 26

CONDITION_PARAM_STAT_MAXHEALTH = 27

CONDITION_PARAM_STAT_MAXMANA = 28

CONDITION_PARAM_STAT_SOUL = 29

CONDITION_PARAM_STAT_MAGICLEVEL = 30

CONDITION_PARAM_STAT_MAXHEALTHPERCENT = 31

CONDITION_PARAM_STAT_MAXMANAPERCENT = 32

CONDITION_PARAM_STAT_SOULPERCENT = 33

CONDITION_PARAM_STAT_MAGICLEVELPERCENT = 34

CONDITION_PARAM_SKILL_MELEEPERCENT = 35

CONDITION_PARAM_SKILL_FISTPERCENT = 36

CONDITION_PARAM_SKILL_CLUBPERCENT = 37

CONDITION_PARAM_SKILL_SWORDPERCENT = 38

CONDITION_PARAM_SKILL_AXEPERCENT = 39

CONDITION_PARAM_SKILL_DISTANCEPERCENT = 40

CONDITION_PARAM_SKILL_SHIELDPERCENT = 41

CONDITION_PARAM_SKILL_FISHINGPERCENT = 42

CONDITION_PARAM_PERIODICDAMAGE = 43

CONDITION_PARAM_BUFF = 44

CONDITION_PARAM_SUBID = 45

 

COMBAT_PARAM_TYPE = 1

COMBAT_PARAM_EFFECT = 2

COMBAT_PARAM_DISTANCEEFFECT = 3

COMBAT_PARAM_BLOCKSHIELD = 4

COMBAT_PARAM_BLOCKARMOR = 5

COMBAT_PARAM_TARGETCASTERORTOPMOST = 6

COMBAT_PARAM_CREATEITEM = 7

COMBAT_PARAM_AGGRESSIVE = 8

COMBAT_PARAM_DISPEL = 9

COMBAT_PARAM_USECHARGES = 10

COMBAT_PARAM_TARGETPLAYERSORSUMMONS = 11

COMBAT_PARAM_DIFFERENTAREADAMAGE = 12

COMBAT_PARAM_HITEFFECT = 13

COMBAT_PARAM_HITCOLOR = 14

 

CALLBACK_PARAM_LEVELMAGICVALUE = 1

CALLBACK_PARAM_SKILLVALUE = 2

CALLBACK_PARAM_TARGETTILE = 3

CALLBACK_PARAM_TARGETCREATURE = 4

 

COMBAT_NONE = 0

COMBAT_PHYSICALDAMAGE = 1

COMBAT_ENERGYDAMAGE = 2

COMBAT_EARTHDAMAGE = 4

COMBAT_POISONDAMAGE = 4

COMBAT_FIREDAMAGE = 8

COMBAT_UNDEFINEDDAMAGE = 16

COMBAT_LIFEDRAIN = 32

COMBAT_MANADRAIN = 64

COMBAT_HEALING = 128

COMBAT_DROWNDAMAGE = 256

COMBAT_ICEDAMAGE = 512

COMBAT_HOLYDAMAGE = 1024

COMBAT_DEATHDAMAGE = 2048

 

CONDITION_NONE = 0

CONDITION_POISON = 1

CONDITION_FIRE = 2

CONDITION_ENERGY = 4

CONDITION_PHYSICAL = 8

CONDITION_HASTE = 16

CONDITION_PARALYZE = 32

CONDITION_OUTFIT = 64

CONDITION_INVISIBLE = 128

CONDITION_LIGHT = 256

CONDITION_MANASHIELD = 512

CONDITION_INFIGHT = 1024

CONDITION_DRUNK = 2048

CONDITION_EXHAUST = 4096

CONDITION_FOOD = 8192

CONDITION_REGENERATION = 8192

CONDITION_SOUL = 16384

CONDITION_DROWN = 32768

CONDITION_MUTED = 65536

CONDITION_ATTRIBUTES = 131072

CONDITION_FREEZING = 262144

CONDITION_DAZZLED = 524288

CONDITION_CURSED = 1048576

CONDITION_PACIFIED = 2097152

CONDITION_GAMEMASTER = 4194304

CONDITION_HUNTING = 8388608

 

EXHAUST_OTHER = 0

EXHAUST_COMBAT = 1

EXHAUST_HEALING = 2

EXHAUST_WEAPON = 3

 

MUTED_BUFFER = 0

MUTED_YELL = 1

MUTED_TRADE = 2

MUTED_TRADE_ROOK = 3

 

GAMEMASTER_INVISIBLE = 0

GAMEMASTER_IGNORE = 1

GAMEMASTER_TELEPORT = 2

 

CONST_SLOT_FIRST = 1

CONST_SLOT_HEAD = CONST_SLOT_FIRST

CONST_SLOT_NECKLACE = 2

CONST_SLOT_BACKPACK = 3

CONST_SLOT_ARMOR = 4

CONST_SLOT_RIGHT = 5

CONST_SLOT_LEFT = 6

CONST_SLOT_LEGS = 7

CONST_SLOT_FEET = 8

CONST_SLOT_RING = 9

CONST_SLOT_AMMO = 10

CONST_SLOT_LAST = CONST_SLOT_AMMO

 

CONST_ME_DRAWBLOOD = 0

CONST_ME_LOSEENERGY = 1

CONST_ME_POFF = 2

CONST_ME_BLOCKHIT = 3

CONST_ME_EXPLOSIONAREA = 4

CONST_ME_EXPLOSIONHIT = 5

CONST_ME_FIREAREA = 6

CONST_ME_YELLOW_RINGS = 7

CONST_ME_GREEN_RINGS = 8

CONST_ME_HITAREA = 9

CONST_ME_TELEPORT = 10

CONST_ME_ENERGYHIT = 11

CONST_ME_MAGIC_BLUE = 12

CONST_ME_MAGIC_RED = 13

CONST_ME_MAGIC_GREEN = 14

CONST_ME_HITBYFIRE = 15

CONST_ME_HITBYPOISON = 16

CONST_ME_MORTAREA = 17

CONST_ME_SOUND_GREEN = 18

CONST_ME_SOUND_RED = 19

CONST_ME_POISONAREA = 20

CONST_ME_SOUND_YELLOW = 21

CONST_ME_SOUND_PURPLE = 22

CONST_ME_SOUND_BLUE = 23

CONST_ME_SOUND_WHITE = 24

CONST_ME_BUBBLES = 25

CONST_ME_CRAPS = 26

CONST_ME_GIFT_WRAPS = 27

CONST_ME_FIREWORK_YELLOW = 28

CONST_ME_FIREWORK_RED = 29

CONST_ME_FIREWORK_BLUE = 30

CONST_ME_STUN = 31

CONST_ME_SLEEP = 32

CONST_ME_WATERCREATURE = 33

CONST_ME_GROUNDSHAKER = 34

CONST_ME_HEARTS = 35

CONST_ME_FIREATTACK = 36

CONST_ME_ENERGYAREA = 37

CONST_ME_SMALLCLOUDS = 38

CONST_ME_HOLYDAMAGE = 39

CONST_ME_BIGCLOUDS = 40

CONST_ME_ICEAREA = 41

CONST_ME_ICETORNADO = 42

CONST_ME_ICEATTACK = 43

CONST_ME_STONES = 44

CONST_ME_SMALLPLANTS = 45

CONST_ME_CARNIPHILA = 46

CONST_ME_PURPLEENERGY = 47

CONST_ME_YELLOWENERGY = 48

CONST_ME_HOLYAREA = 49

CONST_ME_BIGPLANTS = 50

CONST_ME_CAKE = 51

CONST_ME_GIANTICE = 52

CONST_ME_WATERSPLASH = 53

CONST_ME_PLANTATTACK = 54

CONST_ME_TUTORIALARROW = 55

CONST_ME_TUTORIALSQUARE = 56

CONST_ME_MIRRORHORIZONTAL = 57

CONST_ME_MIRRORVERTICAL = 58

CONST_ME_SKULLHORIZONTAL = 59

CONST_ME_SKULLVERTICAL = 60

CONST_ME_ASSASSIN = 61

CONST_ME_STEPSHORIZONTAL = 62

CONST_ME_BLOODYSTEPS = 63

CONST_ME_STEPSVERTICAL = 64

CONST_ME_YALAHARIGHOST = 65

CONST_ME_BATS = 66

CONST_ME_SMOKE = 67

CONST_ME_INSECTS = 68

CONST_ME_PINK = 69

CONST_ME_RED = 70

CONST_ME_BLUEK = 71

CONST_ME_BLUEKI = 72

CONST_ME_BLUEB = 73

CONST_ME_KAMEBLUE = 74

CONST_ME_GENERIK = 75

CONST_ME_GENERIKB = 76

CONST_ME_GENERIKA = 77

CONST_ME_GENERIKGREEN = 78

CONST_ME_GREENONE = 79

CONST_ME_GREENTWO = 80

CONST_ME_GREENTHREE = 81

CONST_ME_GREENFOUR = 82

CONST_ME_GREENFIVE = 83

CONST_ME_ORANGE = 84

CONST_ME_ORANGEONE = 85

CONST_ME_ORANGETWO = 86

CONST_ME_ORANGETHREE = 87

CONST_ME_ORANGEFOUR = 88

CONST_ME_ORANGEFIVE = 89

CONST_ME_PINKB = 90

CONST_ME_PINKONE = 91

CONST_ME_PINKTWO = 92

CONST_ME_PINKTHREE = 93

CONST_ME_PINKFOUR = 94

CONST_ME_YELLOWB = 95

CONST_ME_YELLOWONE = 96

CONST_ME_YELLOWTWO = 97

CONST_ME_YELLOWTHREE = 98

CONST_ME_YELLOWFOUR = 99

CONST_ME_YELLOWFIVE = 100

CONST_ME_YELLOWSIX = 101

CONST_ME_YELLOWSEVEN = 102

CONST_ME_YELLOWEIGHT = 103

CONST_ME_YELLOWNINE = 104

CONST_ME_YELLOWTEN = 105

CONST_ME_YELLOWELEVEN = 106

CONST_ME_PINKA = 107

CONST_ME_PINKC = 108

CONST_ME_PINKD = 109

CONST_ME_PINKE = 110

CONST_ME_PINKF = 111

CONST_ME_PINKG = 112

CONST_ME_PINKH = 113

CONST_ME_PINKI = 114

CONST_ME_PINKJ = 115

CONST_ME_PINKL = 116

CONST_ME_PINKM = 117

CONST_ME_PINKN = 118

CONST_ME_PINKO = 119

CONST_ME_PINKP = 120

CONST_ME_PINKQ = 121

CONST_ME_PINKR = 122

CONST_ME_PINKS = 123

CONST_ME_PINKT = 124

CONST_ME_PINKXU = 125

CONST_ME_PINKV = 126

CONST_ME_PINKX = 127

CONST_ME_PINKZ = 128

CONST_ME_GRAYA = 129

CONST_ME_GRAYB = 130

CONST_ME_GRAYC = 131

CONST_ME_GRAYD = 132

CONST_ME_GRAYE = 133

CONST_ME_GRAYF = 134

CONST_ME_GRAYG = 135

CONST_ME_GRAYH = 136

CONST_ME_GRAYU = 137

CONST_ME_GRAYJ = 138

CONST_ME_GRAYL = 139

CONST_ME_GRAYM = 140

CONST_ME_GRAYN = 141

CONST_ME_GRAYO = 142

CONST_ME_GRAYP = 143

CONST_ME_GRAYQ = 144

CONST_ME_GRAYR = 145

CONST_ME_GRAYS = 146

CONST_ME_GRAYT = 147

CONST_ME_GRAYU = 148

CONST_ME_GRAYV = 149

CONST_ME_GRAYX = 150

CONST_ME_GRAYZ = 151

CONST_ME_BLACKA = 152

CONST_ME_BLACKB = 153

CONST_ME_BLACKC = 154

CONST_ME_BLACKD = 155

CONST_ME_BLACKE = 156

CONST_ME_BLACKF = 157

CONST_ME_BLACKG = 158

CONST_ME_BLACKH = 159

CONST_ME_BLACKJ = 160

CONST_ME_BLACKL = 161

CONST_ME_BLACKM = 162

CONST_ME_BLACKN = 163

CONST_ME_BLACKO = 164

CONST_ME_BLACKP = 165

CONST_ME_BLACKQ = 166

CONST_ME_BLACKR = 167

CONST_ME_BLACKS = 168

CONST_ME_BLACKT = 169

CONST_ME_BLACKU = 170

CONST_ME_BLACKV = 171

CONST_ME_BLACKX = 172

CONST_ME_BLACKZ = 173

CONST_ME_SKYA = 174

CONST_ME_SKYB = 175

CONST_ME_SKYC = 176

CONST_ME_SKYD = 177

CONST_ME_SKYE = 178

CONST_ME_SKYF = 179

CONST_ME_SKYG = 180

CONST_ME_SKYH = 181

CONST_ME_SKYI = 182

CONST_ME_SKYJ = 183

CONST_ME_SKYL = 184

CONST_ME_SKYM = 185

CONST_ME_SKYN = 186

CONST_ME_SKYO = 187

CONST_ME_SKYP = 188

CONST_ME_SKYQ = 189

CONST_ME_SKYR = 190

CONST_ME_SKYS = 191

CONST_ME_SKYT = 192

CONST_ME_SKYU = 193

CONST_ME_SKYV = 194

CONST_ME_SKYX = 195

CONST_ME_SKYZ = 196

CONST_ME_FIGHTA = 197

CONST_ME_FIGHTB = 198

CONST_ME_FIGHTC = 199

CONST_ME_FIGHTD = 200

CONST_ME_FIGHTE = 201

CONST_ME_FIGHTF = 202

CONST_ME_FIGHTG = 203

CONST_ME_FIGHTH = 205

CONST_ME_FIGHTI = 206

CONST_ME_REDSTORM = 207

CONST_ME_BURNINGR = 208

CONST_ME_BLACKSTORMZ = 209

CONST_ME_GOLDENSTORMZ = 210

CONST_ME_DARKSTORMZ = 211

CONST_ME_CELLTRANSFORMZ = 212

CONST_ME_BROLLYTRANSFORMZ = 213

CONST_ME_FABIOUM = 214

CONST_ME_FABIODOIS = 215

CONST_ME_FABIOTRES = 216

CONST_ME_FABIOQUATRO = 217

CONST_ME_FABIOCINCO = 218

CONST_ME_FABIOSEIS = 219

CONST_ME_FABIOSETE = 220

CONST_ME_FABIOOITO = 221

CONST_ME_FABIONOVE = 222

CONST_ME_FABIODEZ = 223

CONST_ME_FABIOONZE = 224

CONST_ME_FABIODOZE = 225

CONST_ME_FABIOTREZE = 226

CONST_ME_FABIOQUATORZE = 227

CONST_ME_FABIOQUINZE = 228

CONST_ME_FABIODEZESSEIS = 229

CONST_ME_FABIODEZESETE = 230

CONST_ME_FABIODEZOITO = 231

CONST_ME_FABIOSKY = 232

CONST_ME_FABIODEZENOVE = 233

CONST_ME_FABIOVINTE = 234

CONST_ME_FABIONUYS = 235

CONST_ME_FABIOSEXYNUYS = 236

CONST_ME_FABIOTRINTA = 237

CONST_ME_FABIOTRINTADOIS = 238

CONST_ME_FABIOTRINTATRES = 239

CONST_ME_FABIOTRINTAQUATRO = 240

CONST_ME_FABIOTRINTACINCO = 241

CONST_ME_FABIOTRINTASEIS = 242

CONST_ME_FABIOTRINTASETE = 243

CONST_ME_FABIOTRINTAOITO = 244

CONST_ME_FABIOTRINTANOVE = 245

CONST_ME_FABIOQUARENTA = 246

CONST_ME_FABIOQUARENTAUM = 247

CONST_ME_FABIOQUARENTADOIS = 248

CONST_ME_FABIOQUARENTATRES = 249

CONST_ME_FABIOQUARENTAQUATRO = 250

CONST_ME_FABIOQUARENTACINCO = 251

CONST_ME_FABIOQUARENTASEIS = 252

CONST_ME_FABIOQUARENTASETE = 253

CONST_ME_FABIOQUARENTAOITO = 254

CONST_ME_NONE = 255

CONST_ME_LAST = CONST_ME_FABIOQUARENTAOITO

 

CONST_ANI_SPEAR = 0

CONST_ANI_BOLT = 1

CONST_ANI_ARROW = 2

CONST_ANI_FIRE = 3

CONST_ANI_ENERGY = 4

CONST_ANI_POISONARROW = 5

CONST_ANI_BURSTARROW = 6

CONST_ANI_THROWINGSTAR = 7

CONST_ANI_THROWINGKNIFE = 8

CONST_ANI_SMALLSTONE = 9

CONST_ANI_DEATH = 10

CONST_ANI_LARGEROCK = 11

CONST_ANI_SNOWBALL = 12

CONST_ANI_POWERBOLT = 13

CONST_ANI_POISON = 14

CONST_ANI_INFERNALBOLT = 15

CONST_ANI_HUNTINGSPEAR = 16

CONST_ANI_ENCHANTEDSPEAR = 17

CONST_ANI_REDSTAR = 18

CONST_ANI_GREENSTAR = 19

CONST_ANI_ROYALSPEAR = 20

CONST_ANI_SNIPERARROW = 21

CONST_ANI_ONYXARROW = 22

CONST_ANI_PIERCINGBOLT = 23

CONST_ANI_WHIRLWINDSWORD = 24

CONST_ANI_WHIRLWINDAXE = 25

CONST_ANI_WHIRLWINDCLUB = 26

CONST_ANI_ETHEREALSPEAR = 27

CONST_ANI_ICE = 28

CONST_ANI_EARTH = 29

CONST_ANI_HOLY = 30

CONST_ANI_SUDDENDEATH = 31

CONST_ANI_FLASHARROW = 32

CONST_ANI_FLAMMINGARROW = 33

CONST_ANI_SHIVERARROW = 34

CONST_ANI_ENERGYBALL = 35

CONST_ANI_SMALLICE = 36

CONST_ANI_SMALLHOLY = 37

CONST_ANI_SMALLEARTH = 38

CONST_ANI_EARTHARROW = 39

CONST_ANI_EXPLOSION = 40

CONST_ANI_CAKE = 41

CONST_ANI_WEAPONTYPE = 254

CONST_ANI_NONE = 255

CONST_ANI_LAST = CONST_ANI_CAKE

 

TALKTYPE_FIRST = 1

TALKTYPE_SAY = TALKTYPE_FIRST

TALKTYPE_WHISPER = 2

TALKTYPE_YELL = 3

TALKTYPE_PRIVATE_PN = 4

TALKTYPE_PRIVATE_NP = 5

TALKTYPE_PRIVATE = 6

TALKTYPE_CHANNEL_Y = 7

TALKTYPE_CHANNEL_W = 8

TALKTYPE_RVR_CHANNEL = 9

TALKTYPE_RVR_ANSWER = 10

TALKTYPE_RVR_CONTINUE = 11

TALKTYPE_BROADCAST = 12

TALKTYPE_CHANNEL_RN = 13

TALKTYPE_PRIVATE_RED = 14

TALKTYPE_CHANNEL_O = 15

TALKTYPE_CHANNEL_RA = 17

TALKTYPE_MONSTER = 19

TALKTYPE_MONSTER_YELL = 20

TALKTYPE_LAST = TALKTYPE_MONSTER_YELL

 

TALKTYPE_TYPES = {

["say"] = TALKTYPE_SAY,

["whisper"] = TALKTYPE_WHISPER,

["yell"] = TALKTYPE_YELL,

["private-playernpc"] = TALKTYPE_PRIVATE_PN,

["private-npcplayer"] = TALKTYPE_PRIVATE_NP,

["private"] = TALKTYPE_PRIVATE,

["channel-yellow"] = TALKTYPE_CHANNEL_Y,

["channel-white"] = TALKTYPE_CHANNEL_W,

["rvr-channel"] = TALKTYPE_RVR_CHANNEL,

["rvr-answer"] = TALKTYPE_RVR_ANSWER,

["rvr-continue"] = TALKTYPE_RVR_CONTINUE,

["broadcast"] = TALKTYPE_BROADCAST,

["channel-red"] = TALKTYPE_CHANNEL_RN,

["channel-orange"] = TALKTYPE_CHANNEL_O,

["channel-redanonymous"] = TALKTYPE_CHANNEL_RA,

["monster"] = TALKTYPE_MONSTER,

["monster-yell"] = TALKTYPE_MONSTER_YELL

}

 

MESSAGE_FIRST = 18

MESSAGE_STATUS_CONSOLE_RED = MESSAGE_FIRST

MESSAGE_EVENT_ORANGE = 19

MESSAGE_STATUS_CONSOLE_ORANGE = 20

MESSAGE_STATUS_WARNING = 21

MESSAGE_EVENT_ADVANCE = 22

MESSAGE_EVENT_DEFAULT = 23

MESSAGE_STATUS_DEFAULT = 24

MESSAGE_INFO_DESCR = 25

MESSAGE_STATUS_SMALL = 26

MESSAGE_STATUS_CONSOLE_BLUE = 27

MESSAGE_LAST = MESSAGE_STATUS_CONSOLE_BLUE

 

MESSAGE_TYPES = {

["advance"] = MESSAGE_EVENT_ADVANCE,

["event"] = MESSAGE_EVENT_DEFAULT,

["white"] = MESSAGE_EVENT_DEFAULT,

["orange"] = MESSAGE_STATUS_CONSOLE_ORANGE,

["info"] = MESSAGE_INFO_DESCR,

["green"] = MESSAGE_INFO_DESCR,

["small"] = MESSAGE_STATUS_SMALL,

["blue"] = MESSAGE_STATUS_CONSOLE_BLUE,

["red"] = MESSAGE_STATUS_CONSOLE_RED,

["warning"] = MESSAGE_STATUS_WARNING,

["status"] = MESSAGE_STATUS_DEFAULT

}

 

TEXTCOLOR_BLUE = 5

TEXTCOLOR_GREEN = 18

TEXTCOLOR_TEAL = 35

TEXTCOLOR_LIGHTGREEN = 66

TEXTCOLOR_DARKBROWN = 78

TEXTCOLOR_LIGHTBLUE = 89

TEXTCOLOR_DARKPURPLE = 112

TEXTCOLOR_BROWN = 120

TEXTCOLOR_GREY = 129

TEXTCOLOR_DARKRED = 144

TEXTCOLOR_DARKPINK = 152

TEXTCOLOR_PURPLE = 154

TEXTCOLOR_DARKORANGE = 156

TEXTCOLOR_RED = 180

TEXTCOLOR_PINK = 190

TEXTCOLOR_ORANGE = 192

TEXTCOLOR_DARKYELLOW = 205

TEXTCOLOR_YELLOW = 210

TEXTCOLOR_WHITE = 215

TEXTCOLOR_NONE = 255

 

MAPMARK_TICK = 0

MAPMARK_QUESTION = 1

MAPMARK_EXCLAMATION = 2

MAPMARK_STAR = 3

MAPMARK_CROSS = 4

MAPMARK_TEMPLE = 5

MAPMARK_KISS = 6

MAPMARK_SHOVEL = 7

MAPMARK_SWORD = 8

MAPMARK_FLAG = 9

MAPMARK_LOCK = 10

MAPMARK_BAG = 11

MAPMARK_SKULL = 12

MAPMARK_DOLLAR = 13

MAPMARK_REDNORTH = 14

MAPMARK_REDSOUTH = 15

MAPMARK_REDEAST = 16

MAPMARK_REDWEST = 17

MAPMARK_GREENNORTH = 18

MAPMARK_GREENSOUTH = 19

 

ITEM_TYPE_DEPOT = 1

ITEM_TYPE_MAILBOX = 2

ITEM_TYPE_TRASHHOLDER = 3

ITEM_TYPE_CONTAINER = 4

ITEM_TYPE_DOOR = 5

ITEM_TYPE_MAGICFIELD = 6

ITEM_TYPE_TELEPORT = 7

ITEM_TYPE_BED = 8

ITEM_TYPE_LEVELDOOR = 9

 

CONST_PROP_BLOCKSOLID = 0

CONST_PROP_HASHEIGHT = 1

CONST_PROP_BLOCKPROJECTILE = 2

CONST_PROP_BLOCKPATHFIND = 3

CONST_PROP_ISVERTICAL = 4

CONST_PROP_ISHORIZONTAL = 5

CONST_PROP_MOVEABLE = 6

CONST_PROP_BLOCKINGANDNOTMOVEABLE = 7

CONST_PROP_SUPPORTHANGABLE = 8

 

MANAGER_NONE = 0

MANAGER_NEW = 1

MANAGER_ACCOUNT = 2

MANAGER_NAMELOCK = 3

 

PLAYERSEX_FEMALE = 0

PLAYERSEX_MALE = 1

PLAYERSEX_GAMEMASTER = 2

 

PLAYERLOSS_EXPERIENCE = 0

PLAYERLOSS_MANA = 1

PLAYERLOSS_SKILLS = 2

PLAYERLOSS_CONTAINERS = 3

PLAYERLOSS_ITEMS = 4

 

STATSCHANGE_HEALTHGAIN = 0

STATSCHANGE_HEALTHLOSS = 1

STATSCHANGE_MANAGAIN = 2

STATSCHANGE_MANALOSS = 3

 

SKILL_FIST = 0

SKILL_CLUB = 1

SKILL_SWORD = 2

SKILL_AXE = 3

SKILL_DISTANCE = 4

SKILL_SHIELD = 5

SKILL_FISHING = 6

SKILL__MAGLEVEL = 7

SKILL__LEVEL = 8

 

SKILL_NAMES = {

[sKILL_FIST] = "fist fighting",

[sKILL_CLUB] = "club fighting",

[sKILL_SWORD] = "sword fighting",

[sKILL_AXE] = "axe fighting",

[sKILL_DISTANCE] = "distance fighting",

[sKILL_SHIELD] = "shielding",

[sKILL_FISHING] = "fishing",

[sKILL__LEVEL] = "level",

[sKILL__MAGLEVEL] = "magic level"

}

 

SKILL_IDS = {

["fist"] = SKILL_FIST,

["club"] = SKILL_CLUB,

["sword"] = SKILL_SWORD,

["axe"] = SKILL_AXE,

["distance"] = SKILL_DISTANCE,

["dist"] = SKILL_DISTANCE,

["shielding"] = SKILL_SHIELD,

["shield"] = SKILL_SHIELD,

["fishing"] = SKILL_FISHING,

["fish"] = SKILL_FISHING,

["level"] = SKILL__LEVEL,

["magic"] = SKILL__MAGLEVEL

}

 

GUILDLEVEL_MEMBER = 1

GUILDLEVEL_VICE = 2

GUILDLEVEL_LEADER = 3

 

SKULL_NONE = 0

SKULL_YELLOW = 1

SKULL_GREEN = 2

SKULL_WHITE = 3

SKULL_RED = 4

SKULL_BLACK = 5

SKULL_LAST = SKULL_BLACK

 

SHIELD_NONE = 0

SHIELD_WHITEYELLOW = 1

SHIELD_WHITEBLUE = 2

SHIELD_BLUE = 3

SHIELD_YELLOW = 4

SHIELD_BLUE_SHAREDEXP = 5

SHIELD_YELLOW_SHAREDEXP = 6

SHIELD_BLUE_NOSHAREDEXP_BLINK = 7

SHIELD_YELLOW_NOSHAREDEXP_BLINK = 8

SHIELD_BLUE_NOSHAREDEXP = 9

SHIELD_YELLOW_NOSHAREDEXP = 10

SHIELD_LAST = SHIELD_YELLOW_NOSHAREDEXP

 

WORLD_TYPE_NO_PVP = 1

WORLD_TYPE_PVP = 2

WORLD_TYPE_PVP_ENFORCED = 3

 

DATABASE_ENGINE_NONE = 0

DATABASE_ENGINE_MYSQL = 1

DATABASE_ENGINE_SQLITE = 2

DATABASE_ENGINE_POSTGRESQL = 3

DATABASE_ENGINE_ODBC = 4

 

GAMESTATE_STARTUP = 1

GAMESTATE_INIT = 2

GAMESTATE_NORMAL = 3

GAMESTATE_MAINTAIN = 4

GAMESTATE_CLOSED = 5

GAMESTATE_CLOSING = 6

GAMESTATE_SHUTDOWN = 7

 

RELOAD_ACTIONS = 1

RELOAD_CHAT = 2

RELOAD_CONFIG = 3

RELOAD_CREATUREEVENTS = 4

RELOAD_GAMESERVERS = 5

RELOAD_GLOBALEVENTS = 6

RELOAD_GROUPS = 7

RELOAD_HIGHSCORES = 8

RELOAD_HOUSEPRICES = 9

RELOAD_ITEMS = 10

RELOAD_MONSTERS = 11

RELOAD_MOVEEVENTS = 12

RELOAD_NPCS = 13

RELOAD_OUTFITS = 14

RELOAD_QUESTS = 15

RELOAD_RAIDS = 16

RELOAD_SPELLS = 17

RELOAD_STAGES = 18

RELOAD_TALKACTIONS = 19

RELOAD_VOCATIONS = 20

RELOAD_WEAPONS = 21

RELOAD_MODS = 22

RELOAD_ALL = 23

 

BAN_NONE = 0

BAN_IP = 1

BAN_PLAYER = 2

BAN_ACCOUNT = 3

BAN_NOTATION = 4

BAN_STATEMENT = 5

 

PLAYERBAN_NONE = 0

PLAYERBAN_REPORT = 1

PLAYERBAN_LOCK = 2

PLAYERBAN_BANISHMENT = 3

 

CHANNEL_GUILD = 0

CHANNEL_PARTY = 1

CHANNEL_RVR = 3

CHANNEL_HELP = 9

CHANNEL_DEFAULT = 0xFFFE

CHANNEL_PRIVATE = 0xFFFF

 

STACKPOS_GROUND = 0

STACKPOS_TOP_CREATURE = 253

STACKPOS_TOP_FIELD = 254

STACKPOS_TOP_MOVEABLE_ITEM_OR_CREATURE = 255

 

WEAPON_NONE = 0

WEAPON_SWORD = 1

WEAPON_CLUB = 2

WEAPON_AXE = 3

WEAPON_SHIELD = 4

WEAPON_DIST = 5

WEAPON_WAND = 6

WEAPON_AMMO = 7

WEAPON_FIST = 8

 

ACTION_NOTATION = 0

ACTION_NAMEREPORT = 1

ACTION_BANISHMENT = 2

ACTION_BANREPORT = 3

ACTION_BANFINAL = 4

ACTION_BANREPORTFINAL = 5

ACTION_STATEMENT = 6

ACTION_DELETION = 7

ACTION_NAMELOCK = 8

ACTION_BANLOCK = 9

ACTION_BANLOCKFINAL = 10

ACTION_PLACEHOLDER = 11

 

ITEM_GOLD_COIN = 2148

ITEM_PLATINUM_COIN = 2152

ITEM_CRYSTAL_COIN = 2160

ITEM_FISH = 2667

ITEM_WORM = 3976

ITEM_MECHANICAL_FISH = 10224

ITEM_NAIL = 8309

ITEM_MECHANICAL_FISHING_ROD = 10223

ITEM_GREEN_PERCH = 7159

ITEM_RAINBOW_TROUT = 7158

ITEM_NORTHERN_PIKE = 2669

ITEM_BLUEBERRY = 2677

ITEM_BLUEBERRYBUSH = 2785

ITEM_BUSH = 2786

ITEM_PARCEL = 2595

ITEM_LABEL = 2599

 

RETURNVALUE_DONTSHOWMESSAGE = 0

RETURNVALUE_NOERROR = 1

RETURNVALUE_NOTPOSSIBLE = 2

RETURNVALUE_NOTENOUGHROOM = 3

RETURNVALUE_PLAYERISPZLOCKED = 4

RETURNVALUE_PLAYERISNOTINVITED = 5

RETURNVALUE_CANNOTTHROW = 6

RETURNVALUE_THEREISNOWAY = 7

RETURNVALUE_DESTINATIONOUTOFREACH = 8

RETURNVALUE_CREATUREBLOCK = 9

RETURNVALUE_NOTMOVEABLE = 10

RETURNVALUE_DROPTWOHANDEDITEM = 11

RETURNVALUE_BOTHHANDSNEEDTOBEFREE = 12

RETURNVALUE_CANONLYUSEONEWEAPON = 13

RETURNVALUE_NEEDEXCHANGE = 14

RETURNVALUE_CANNOTBEDRESSED = 15

RETURNVALUE_PUTTHISOBJECTINYOURHAND = 16

RETURNVALUE_PUTTHISOBJECTINBOTHHANDS = 17

RETURNVALUE_TOOFARAWAY = 18

RETURNVALUE_FIRSTGODOWNSTAIRS = 19

RETURNVALUE_FIRSTGOUPSTAIRS = 20

RETURNVALUE_CONTAINERNOTENOUGHROOM = 21

RETURNVALUE_NOTENOUGHCAPACITY = 22

RETURNVALUE_CANNOTPICKUP = 23

RETURNVALUE_THISISIMPOSSIBLE = 24

RETURNVALUE_DEPOTISFULL = 25

RETURNVALUE_CREATUREDOESNOTEXIST = 26

RETURNVALUE_CANNOTUSETHISOBJECT = 27

RETURNVALUE_PLAYERWITHTHISNAMEISNOTONLINE = 28

RETURNVALUE_NOTREQUIREDLEVELTOUSERUNE = 29

RETURNVALUE_YOUAREALREADYTRADING = 30

RETURNVALUE_THISPLAYERISALREADYTRADING = 31

RETURNVALUE_YOUMAYNOTLOGOUTDURINGAFIGHT = 32

RETURNVALUE_DIRECTPLAYERSHOOT = 33

RETURNVALUE_NOTENOUGHLEVEL = 34

RETURNVALUE_NOTENOUGHMAGICLEVEL = 35

RETURNVALUE_NOTENOUGHMANA = 36

RETURNVALUE_NOTENOUGHSOUL = 37

RETURNVALUE_YOUAREEXHAUSTED = 38

RETURNVALUE_PLAYERISNOTREACHABLE = 39

RETURNVALUE_CANONLYUSETHISRUNEONCREATURES = 40

RETURNVALUE_ACTIONNOTPERMITTEDINPROTECTIONZONE = 41

RETURNVALUE_YOUMAYNOTATTACKTHISPLAYER = 42

RETURNVALUE_YOUMAYNOTATTACKAPERSONINPROTECTIONZONE = 43

RETURNVALUE_YOUMAYNOTATTACKAPERSONWHILEINPROTECTIONZONE = 44

RETURNVALUE_YOUMAYNOTATTACKTHISCREATURE = 45

RETURNVALUE_YOUCANONLYUSEITONCREATURES = 46

RETURNVALUE_CREATUREISNOTREACHABLE = 47

RETURNVALUE_TURNSECUREMODETOATTACKUNMARKEDPLAYERS = 48

RETURNVALUE_YOUNEEDPREMIUMACCOUNT = 49

RETURNVALUE_YOUNEEDTOLEARNTHISSPELL = 50

RETURNVALUE_YOURVOCATIONCANNOTUSETHISSPELL = 51

RETURNVALUE_YOUNEEDAWEAPONTOUSETHISSPELL = 52

RETURNVALUE_PLAYERISPZLOCKEDLEAVEPVPZONE = 53

RETURNVALUE_PLAYERISPZLOCKEDENTERPVPZONE = 54

RETURNVALUE_ACTIONNOTPERMITTEDINANOPVPZONE = 55

RETURNVALUE_YOUCANNOTLOGOUTHERE = 56

RETURNVALUE_YOUNEEDAMAGICITEMTOCASTSPELL = 57

RETURNVALUE_CANNOTCONJUREITEMHERE = 58

RETURNVALUE_YOUNEEDTOSPLITYOURSPEARS = 59

RETURNVALUE_NAMEISTOOAMBIGUOUS = 60

RETURNVALUE_CANONLYUSEONESHIELD = 61

RETURNVALUE_YOUARENOTTHEOWNER = 62

RETURNVALUE_YOUMAYNOTCASTAREAONBLACKSKULL = 63

RETURNVALUE_TILEISFULL = 64

 

BLUEBERRYBUSH_DECAY_INTERVAL = 300000

CONTAINER_POSITION = 0xFFFF

EMPTY_STORAGE = -1

ITEMCOUNT_MAX = 100

 

AUTOID_PLAYERS = 0x10000000

AUTOID_MONSTERS = 0x40000000

AUTOID_NPCS = 0x80000000

 

PLAYERFLAG_CANNOTUSECOMBAT = 0

PLAYERFLAG_CANNOTATTACKPLAYER = 1

PLAYERFLAG_CANNOTATTACKMONSTER = 2

PLAYERFLAG_CANNOTBEATTACKED = 3

PLAYERFLAG_CANCONVINCEALL = 4

PLAYERFLAG_CANSUMMONALL = 5

PLAYERFLAG_CANILLUSIONALL = 6

PLAYERFLAG_CANSENSEINVISIBILITY = 7

PLAYERFLAG_IGNOREDBYMONSTERS = 8

PLAYERFLAG_NOTGAININFIGHT = 9

PLAYERFLAG_HASINFINITEMANA = 10

PLAYERFLAG_HASINFINITESOUL = 11

PLAYERFLAG_HASNOEXHAUSTION = 12

PLAYERFLAG_CANNOTUSESPELLS = 13

PLAYERFLAG_CANNOTPICKUPITEM = 14

PLAYERFLAG_CANALWAYSLOGIN = 15

PLAYERFLAG_CANBROADCAST = 16

PLAYERFLAG_CANEDITHOUSES = 17

PLAYERFLAG_CANNOTBEBANNED = 18

PLAYERFLAG_CANNOTBEPUSHED = 19

PLAYERFLAG_HASINFINITECAPACITY = 20

PLAYERFLAG_CANPUSHALLCREATURES = 21

PLAYERFLAG_CANTALKREDPRIVATE = 22

PLAYERFLAG_CANTALKREDCHANNEL = 23

PLAYERFLAG_TALKORANGEHELPCHANNEL = 24

PLAYERFLAG_NOTGAINEXPERIENCE = 25

PLAYERFLAG_NOTGAINMANA = 26

PLAYERFLAG_NOTGAINHEALTH = 27

PLAYERFLAG_NOTGAINSKILL = 28

PLAYERFLAG_SETMAXSPEED = 29

PLAYERFLAG_SPECIALVIP = 30

PLAYERFLAG_NOTGENERATELOOT = 31

PLAYERFLAG_CANTALKREDCHANNELANONYMOUS = 32

PLAYERFLAG_IGNOREPROTECTIONZONE = 33

PLAYERFLAG_IGNORESPELLCHECK = 34

PLAYERFLAG_IGNOREWEAPONCHECK = 35

PLAYERFLAG_CANNOTBEMUTED = 36

PLAYERFLAG_ISALWAYSPREMIUM = 37

PLAYERFLAG_CANANSWERRULEVIOLATIONS = 38

PLAYERFLAG_39 = 39 -- ignore

PLAYERFLAG_SHOWGROUPINSTEADOFVOCATION = 40

PLAYERFLAG_HASINFINITESTAMINA = 41

PLAYERFLAG_CANNOTMOVEITEMS = 42

PLAYERFLAG_CANNOTMOVECREATURES = 43

PLAYERFLAG_CANREPORTBUGS = 44

PLAYERFLAG_45 = 45 -- ignore

PLAYERFLAG_CANNOTBESEEN = 46

 

PLAYERCUSTOMFLAG_ALLOWIDLE = 0

PLAYERCUSTOMFLAG_CANSEEPOSITION = 1

PLAYERCUSTOMFLAG_CANSEEITEMDETAILS = 2

PLAYERCUSTOMFLAG_CANSEECREATUREDETAILS = 3

PLAYERCUSTOMFLAG_NOTSEARCHABLE = 4

PLAYERCUSTOMFLAG_GAMEMASTERPRIVILEGES = 5

PLAYERCUSTOMFLAG_CANTHROWANYWHERE = 6

PLAYERCUSTOMFLAG_CANPUSHALLITEMS = 7

PLAYERCUSTOMFLAG_CANMOVEANYWHERE = 8

PLAYERCUSTOMFLAG_CANMOVEFROMFAR = 9

PLAYERCUSTOMFLAG_CANLOGINMULTIPLECHARACTERS = 10

PLAYERCUSTOMFLAG_HASFULLLIGHT = 11

PLAYERCUSTOMFLAG_CANLOGOUTANYTIME = 12

PLAYERCUSTOMFLAG_HIDELEVEL = 13

PLAYERCUSTOMFLAG_ISPROTECTED = 14

PLAYERCUSTOMFLAG_ISIMMUNE = 15

PLAYERCUSTOMFLAG_NOTGAINSKULL = 16

PLAYERCUSTOMFLAG_NOTGAINUNJUSTIFIED = 17

PLAYERCUSTOMFLAG_HIDELEVEL = 18

PLAYERCUSTOMFLAG_IGNOREPACIFICATION = 19

PLAYERCUSTOMFLAG_CANSTAIRHOP = 20

PLAYERCUSTOMFLAG_CANTURNHOP = 21

PLAYERCUSTOMFLAG_IGNOREHOUSERENT = 22

PLAYERCUSTOMFLAG_CANWEARALLADDONS = 23

 

maleOutfits = {128, 129, 130, 131, 132, 133, 134, 143, 144, 145, 146, 151, 152, 153, 154, 251, 268, 273, 278, 289, 325, 328}

femaleOutfits = {136, 137, 138, 139, 140, 141, 142, 147, 148, 149, 150, 155, 156, 157, 158, 252, 269, 270, 279, 288, 324, 329}

 

doors = {[1209] = 1211, [1210] = 1211, [1212] = 1214, [1213] = 1214, [1219] = 1220, [1221] = 1222, [1231] = 1233, [1232] = 1233, [1234] = 1236, [1235] = 1236, [1237] = 1238, [1239] = 1240, [1249] = 1251, [1250] = 1251, [1252] = 1254, [1253] = 1254, [1539] = 1540, [1541] = 1542, [3535] = 3537, [3536] = 3537, [3538] = 3539, [3544] = 3546, [3545] = 3546, [3547] = 3548, [4913] = 4915, [4914] = 4915, [4916] = 4918, [4917] = 4918, [5082] = 5083, [5084] = 5085, [5098] = 5100, [5099] = 5100, [5101] = 5102, [5107] = 5109, [5108] = 5109, [5110] = 5111, [5116] = 5118, [5117] = 5118, [5119] = 5120, [5125] = 5127, [5126] = 5127, [5128] = 5129, [5134] = 5136, [5135] = 5136, [5137] = 5139, [5138] = 5139, [5140] = 5142, [5141] = 5142, [5143] = 5145, [5144] = 5145, [5278] = 5280, [5279] = 5280, [5281] = 5283, [5282] = 5283, [5284] = 5285, [5286] = 5287, [5515] = 5516, [5517] = 5518, [5732] = 5734, [5733] = 5734, [5735] = 5737, [5736] = 5737, [6192] = 6194, [6193] = 6194, [6195] = 6197, [6196] = 6197, [6198] = 6199, [6200] = 6201, [6249] = 6251, [6250] = 6251, [6252] = 6254, [6253] = 6254, [6255] = 6256, [6257] = 6258, [6795] = 6796, [6797] = 6798, [6799] = 6800, [6801] = 6802, [6891] = 6893, [6892] = 6893, [6894] = 6895, [6900] = 6902, [6901] = 6902, [6903] = 6904, [7033] = 7035, [7034] = 7035, [7036] = 7037, [7042] = 7044, [7043] = 7044, [7045] = 7046, [7054] = 7055, [7056] = 7057, [8541] = 8543, [8542] = 8543, [8544] = 8546, [8545] = 8546, [8547] = 8548, [8549] = 8550, [9165] = 9167, [9166] = 9167, [9168] = 9170, [9169] = 9170, [9171] = 9172, [9173] = 9174, [9267] = 9269, [9268] = 9269, [9270] = 9272, [9271] = 9272, [9273] = 9274, [9275] = 9276, [10276] = 10277, [10274] = 10275, [10268] = 10270, [10269] = 10270, [10271] = 10273, [10272] = 10273, [10471] = 10472, [10480] = 10481, [10477] = 10479, [10478] = 10479, [10468] = 10470, [10469] = 10470}

closingDoors = {1224, 1226, 1228, 1230, 1242, 1244, 1246, 1248, 1256, 1258, 1260, 1262, 3541, 3543, 3550, 3552, 5104, 5106, 5113, 5115, 5122, 5124, 5131, 5133, 5289, 5291, 5293, 5295, 6203, 6205, 6207, 6209, 6260, 6262, 6264, 6266, 6897, 6899, 6906, 6908, 7039, 7041, 7048, 7050, 8552, 8554, 8556, 8558, 9176, 9178, 9180, 9182, 9278, 9280, 9282, 9284, 10279, 10281, 10283, 10285, 10474, 10476, 10483, 10485}

verticalOpenDoors = {1211, 1220, 1224, 1228, 1233, 1238, 1242, 1246, 1251, 1256, 1260, 1540, 3546, 3548, 3550, 3552, 4915, 5083, 5109, 5111, 5113, 5115, 5127, 5129, 5131, 5133, 5142, 5145, 5283, 5285, 5289, 5293, 5516, 5737, 5749, 6194, 6199, 6203, 6207, 6251, 6256, 6260, 6264, 6798, 6802, 6902, 6904, 6906, 6908, 7044, 7046, 7048, 7050, 7055, 8543, 8548, 8552, 8556, 9167, 9172, 9269, 9274, 9278, 9282, 10270, 10275, 10279, 10283, 10479, 10481, 10483, 10485}

horizontalOpenDoors = {1214, 1222, 1226, 1230, 1236, 1240, 1244, 1248, 1254, 1258, 1262, 1542, 3537, 3539, 3541, 3543, 4918, 5085, 5100, 5102, 5104, 5106, 5118, 5120, 5122, 5124, 5136, 5139, 5280, 5287, 5291, 5295, 5518, 5734, 5746, 6197, 6201, 6205, 6209, 6254, 6258, 6262, 6266, 6796, 6800, 6893, 6895, 6897, 6899, 7035, 7037, 7039, 7041, 7057, 8546, 8550, 8554, 8558, 9170, 9174, 9272, 9276, 9280, 9284, 10273, 10277, 10281, 10285, 10470, 10472, 10474, 10476}

specialDoors = {1223, 1225, 1241, 1243, 1255, 1257, 3542, 3551, 5105, 5114, 5123, 5132, 5288, 5290, 5745, 5748, 6202, 6204, 6259, 6261, 6898, 6907, 7040, 7049, 8551, 8553, 9175, 9177, 9277, 9279, 10278, 10280, 10475, 10484}

keys = {2086, 2087, 2088, 2089, 2090, 2091, 2092, 10032, 10091}

 

enchantableGems = {2147, 2146, 2149, 2150}

enchantableItems = {2383, 7383, 7384, 7406, 7402, 2429, 2430, 7389, 7380, 2454, 2423, 2445, 7415, 7392, 2391, 2544, 8905}

enchantingAltars = {

{7504, 7505, 7506, 7507},

{7508, 7509, 7510, 7511},

{7516, 7517, 7518, 7519},

{7512, 7513, 7514, 7515}

}

enchantedGems = {7760, 7759, 7761, 7762}

enchantedItems = {

[2383] = {7744, 7763, 7854, 7869},

[7383] = {7745, 7764, 7855, 7870},

[7384] = {7746, 7765, 7856, 7871},

[7406] = {7747, 7766, 7857, 7872},

[7402] = {7748, 7767, 7858, 7873},

[2429] = {7749, 7768, 7859, 7874},

[2430] = {7750, 7769, 7860, 7875},

[7389] = {7751, 7770, 7861, 7876},

[7380] = {7752, 7771, 7862, 7877},

[2454] = {7753, 7772, 7863, 7878},

[2423] = {7754, 7773, 7864, 7879},

[2445] = {7755, 7774, 7865, 7880},

[7415] = {7756, 7775, 7866, 7881},

[7392] = {7757, 7776, 7867, 7882},

[2391] = {7758, 7777, 7868, 7883},

[2544] = {7840, 7839, 7850, 7838},

[8905] = {8906, 8907, 8909, 8908}

}

 

 

salve e fexe,e reinicie o server,e teste

/z 150,/z 180,etc.

 

---Creditos---

Mini Tutorial-SkySeven

Por ter feito o const.h,tools.cpp-Beeki

 

Obrigado pela atençao,ate mais,a quem ajudei REP++,plx

Link para o comentário
Compartilhar em outros sites

Isto Nao e um tutorial isto esta iniciando eu acho que seria melhor em area do iniciante !

 

Mas isto também ajuda muitos ! porem as vezes uns scripts de effect nao funciona pelo numero e sim pelo nome

então obrigado por compartilhar.

Link para o comentário
Compartilhar em outros sites

  • 2 weeks later...
Visitante
Este tópico está impedido de receber novos posts.
×
×
  • Criar Novo...