Index: scripts/globals/status.lua =================================================================== --- scripts/globals/status.lua (revision 3824) +++ scripts/globals/status.lua (working copy) @@ -848,6 +848,7 @@ MOD_REGEN_DOWN = 0x194 -- poison MOD_REFRESH_DOWN = 0x195 -- plague, reduce mp MOD_REGAIN_DOWN = 0x196 -- plague, reduce tp +MOD_CONSERVE_TP = 0x236 MOD_EAT_RAW_FISH = 409 MOD_EAT_RAW_MEAT = 410 Index: sql/traits.sql =================================================================== --- sql/traits.sql (revision 3824) +++ sql/traits.sql (working copy) @@ -279,4 +279,8 @@ INSERT INTO `traits` VALUES ('94','fine-tuning','18','75','1','0','0'); INSERT INTO `traits` VALUES ('95','optimization','18','75','1','0','0'); INSERT INTO `traits` VALUES ('96','closed position','19','75','1','0','0'); -INSERT INTO `traits` VALUES ('97','stormsurge','20','75','1','0','0'); \ No newline at end of file +INSERT INTO `traits` VALUES ('97','stormsurge','20','75','1','0','0'); + +INSERT INTO `traits` VALUES ('108', 'conserve tp', '14', '45', '1', '566', '25'); +INSERT INTO `traits` VALUES ('108', 'conserve tp', '11', '80', '1', '566', '25'); +INSERT INTO `traits` VALUES ('108', 'conserve tp', '19', '77', '1', '566', '25'); \ No newline at end of file Index: src/map/ai/ai_char_normal.cpp =================================================================== --- src/map/ai/ai_char_normal.cpp (revision 3824) +++ src/map/ai/ai_char_normal.cpp (working copy) @@ -2758,6 +2758,14 @@ m_PChar->health.tp = 0; } + if(m_PChar->getMod(MOD_CONSERVE_TP) > 0) // Proc Rate + { + if(rand()%100 <= m_PChar->getMod(MOD_CONSERVE_TP)) + { + m_PChar->health.tp += rand()%20; // Gives back random 1-20 TP + // ShowDebug(CL_CYAN"Conserve TP Proc \n"); + } + } //incase a TA party member is available CBattleEntity* taChar = NULL; Index: src/map/modifier.h =================================================================== --- src/map/modifier.h (revision 3824) +++ src/map/modifier.h (working copy) @@ -329,6 +329,7 @@ MOD_JUMP_TP_BONUS =0x169,// bonus tp player receives when using jump (must be divided by 10) MOD_JUMP_ATT_BONUS =0x16A,// ATT% bonus for jump + high jump MOD_HIGH_JUMP_ENMITY_REDUCTION=0x16B,// for gear that reduces more enmity from high jump + MOD_CONSERVE_TP =0x236,// Proc rate for Conserve TP // Summoner MOD_AVATAR_PERPETUATION =0x173,//stores base cost of current avatar @@ -441,7 +442,7 @@ MOD_EAT_RAW_MEAT = 410 }; -#define MAX_MODIFIER 411 +#define MAX_MODIFIER 0x242