rafaelpsyco 0 Posted February 1, 2014 (edited) This is a "patch" made for rAthena, someone could convert it to Hercules? I would be very grateful! https://www.mediafire.com/?8x8nhlz9rp1gc56 Edited February 1, 2014 by rafaelpsyco Quote Share this post Link to post Share on other sites
0 Cydh 9 Posted February 1, 2014 here u go https://dl.dropboxusercontent.com/u/33456932/RO/mods/%21free/warponbattle-Herc.diff Quote Share this post Link to post Share on other sites
0 Mhalicot 392 Posted February 1, 2014 Please use upaste.me or pastebin.com Quote Share this post Link to post Share on other sites
0 rafaelpsyco 0 Posted February 1, 2014 re-up, sorry! http://pastebin.com/yiNe5f0e Quote Share this post Link to post Share on other sites
0 themon 63 Posted February 1, 2014 Please use upaste.me or pastebin.com http://upaste.me/3fba1032375599418 Quote Share this post Link to post Share on other sites
0 themon 63 Posted February 1, 2014 (edited) [cbox]Index: conf/battle/battle.conf===================================================================--- conf/battle/battle.conf (revision 17156)+++ conf/battle/battle.conf (working copy)@@ -141,3 +141,10 @@// range. For example, Sonic Blow requires a 2 cell distance before autocasting is allowed.// This setting also affects autospellwhenhit.autospell_check_range: no++// [Cydh]+// If you want to player can't warp, go, recalled, relog on battle for a while+// You can use this to give them delay+// Battle means while player attacking, using skills, receiving damage+// Delay in milisecond+prevent_warponbattle: 5000Index: conf/msg_conf/map_msg.conf===================================================================--- conf/msg_conf/map_msg.conf (revision 17156)+++ conf/msg_conf/map_msg.conf (working copy)@@ -1409,5 +1409,8 @@// @skillid (extension)1398: -- Displaying first %d partial matches:+// warpgo delay+1399: You must wait %.1f sec. before %s.+//Custom translationsimport: conf/import/msg_conf.txtIndex: src/map/atcommand.c===================================================================--- src/map/atcommand.c (revision 17156)+++ src/map/atcommand.c (working copy)@@ -379,6 +379,7 @@unsigned short mapindex;short x = 0, y = 0;int16 m = -1;+ int diff_tick, tick = gettick(); //warp on battlenullpo_retr(-1, sd);@@ -392,6 +393,14 @@return -1;}+ //warp on battle+ if((diff_tick = DIFF_TICK(sd->canwarp_tick,tick)) > 0 && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE))+ {+ sprintf(atcmd_output, msg_txt(1555), diff_tick/1000., command);+ clif_displaymessage(fd, atcmd_output);+ return -1;+ }+mapindex = mapindex_name2id(map_name);if (mapindex)m = map_mapindex2mapid(mapindex);@@ -1676,6 +1685,7 @@int town;char map_name[MAP_NAME_LENGTH];int16 m;+ int diff_tick, tick = gettick(); //warp on battleconst struct {char map[MAP_NAME_LENGTH];@@ -1730,6 +1740,14 @@return 0;}+ //warp on battle+ if((diff_tick = DIFF_TICK(sd->canwarp_tick,tick)) > 0 && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE))+ {+ sprintf(atcmd_output, msg_txt(1555), diff_tick/1000., command);+ clif_displaymessage(fd, atcmd_output);+ return -1;+ }+memset(map_name, '0', sizeof(map_name));memset(atcmd_output, '0', sizeof(atcmd_output));@@ -2669,6 +2687,7 @@**------------------------------------------*/ACMD_FUNC(recall) {+ int diff_tick, tick = gettick(); //warp on battlestruct map_session_data *pl_sd = NULL;nullpo_retr(-1, sd);@@ -2684,6 +2703,14 @@return -1;}+ //warp on battle+ if((diff_tick = DIFF_TICK(sd->canwarp_tick,tick)) > 0 && !pc_has_permission(pl_sd, PC_PERM_WARP_ANYWHERE))+ {+ sprintf(atcmd_output, msg_txt(1555), diff_tick/1000., "recall this player");+ clif_displaymessage(fd, atcmd_output);+ return -1;+ }+if ( pc_get_group_level(sd) < pc_get_group_level(pl_sd) ){clif_displaymessage(fd, msg_txt(81)); // Your GM level doesn't authorize you to preform this action on the specified player.Index: src/map/battle.c===================================================================--- src/map/battle.c (revision 17156)+++ src/map/battle.c (working copy)@@ -5898,6 +5898,7 @@{ "skill_trap_type", &battle_config.skill_trap_type, 0, 0, 1, },{ "item_restricted_consumption_type", &battle_config.item_restricted_consumption_type,1, 0, 1, },{ "max_walk_path", &battle_config.max_walk_path, 17, 1, MAX_WALKPATH, },+ { "prevent_warponbattle", &battle_config.prevent_warponbattle, 10000, 0, INT_MAX, }, //warp on battle};#ifndef STATS_OPT_OUT/**Index: src/map/battle.h===================================================================--- src/map/battle.h (revision 17156)+++ src/map/battle.h (working copy)@@ -486,6 +486,8 @@int skill_trap_type;int item_restricted_consumption_type;int max_walk_path;++ int prevent_warponbattle; //warp on battle} battle_config;void do_init_battle(void);Index: src/map/pc.c===================================================================--- src/map/pc.c (revision 17156)+++ src/map/pc.c (working copy)@@ -982,6 +982,7 @@sd->cantalk_tick = tick;sd->canskill_tick = tick;sd->cansendmail_tick = tick;+ sd->canwarp_tick = tick; //warp on battlefor(i = 0; i < MAX_SKILL_LEVEL; i++)sd->spirit_timer = INVALID_TIMER;@@ -6505,6 +6506,7 @@elemental_set_target(sd,src);sd->canlog_tick = gettick();+ sd->canwarp_tick = gettick() + battle_config.prevent_warponbattle; //warp on battle}/*==========================================@@ -6842,6 +6844,11 @@//Reset "can log out" tick.if( battle_config.prevent_logout )sd->canlog_tick = gettick() - battle_config.prevent_logout;++ //warp on battle+ if( battle_config.prevent_warponbattle )+ sd->canwarp_tick = gettick() - battle_config.prevent_warponbattle;+return 1;}Index: src/map/pc.h===================================================================--- src/map/pc.h (revision 17156)+++ src/map/pc.h (working copy)@@ -216,6 +216,7 @@unsigned int cansendmail_tick; // [Mail System Flood Protection]unsigned int ks_floodprotect_tick; // [Kill Steal Protection]unsigned int bloodylust_tick; // bloodylust player timer [out/in re full-heal protection]+ unsigned int canwarp_tick; //delay for player when warp after attacking, receving damage, or using skill. //warp on battlestruct {short nameid;Index: src/map/skill.c===================================================================--- src/map/skill.c (revision 17156)+++ src/map/skill.c (working copy)@@ -7276,6 +7276,8 @@int dx[9]={-1, 1, 0, 0,-1, 1,-1, 1, 0};int dy[9]={ 0, 0, 1,-1, 1,-1,-1, 1, 0};int j = 0;+ int diff_tick, tick = gettick(); //warp on battle+ char output[CHAT_SIZE_MAX]; //warp on battlestruct guild *g;// i don't know if it actually summons in a circle, but oh well. ;Pg = sd?sd->state.gmaster_flag:guild_search(status_get_guild_id(src));@@ -7287,6 +7289,13 @@if ((dstsd = g->member.sd) != NULL && sd != dstsd && !dstsd->state.autotrade && !pc_isdead(dstsd)) {if (map[dstsd->bl.m].flag.nowarp && !map_flag_gvg2(dstsd->bl.m))continue;+ //warp on battle+ if((diff_tick = DIFF_TICK(sd->canwarp_tick,tick)) > 0 && !pc_has_permission(dstsd, PC_PERM_WARP_ANYWHERE))+ {+ sprintf(output, msg_txt(1555), diff_tick/1000., "get called by EMERGENCY CALL");+ clif_displaymessage(dstsd->fd, output);+ continue;+ }if(map_getcell(src->m,src->x+dx[j],src->y+dy[j],CELL_CHKNOREACH))dx[j] = dy[j] = 0;pc_setpos(dstsd, map_id2index(src->m), src->x+dx[j], src->y+dy[j], CLR_RESPAWN);Index: src/map/unit.c===================================================================--- src/map/unit.c (revision 17156)+++ src/map/unit.c (working copy)@@ -1368,6 +1368,9 @@elseskill_castend_id(ud->skilltimer,tick,src->id,0);+ if(sd) //warp on battle+ sd->canwarp_tick = gettick() + battle_config.prevent_warponbattle;+return 1;}@@ -1505,6 +1508,10 @@ud->skilltimer = INVALID_TIMER;skill_castend_pos(ud->skilltimer,tick,src->id,0);}++ if(sd) //warp on battle+ sd->canwarp_tick = gettick() + battle_config.prevent_warponbattle;+return 1;}@@ -1586,6 +1593,9 @@unit_stop_attack(src);return 0;}+ //warp on battle+ if(battle_config.prevent_warponbattle)+ sd->canwarp_tick = gettick() + battle_config.prevent_warponbattle;}if( battle_check_target(src,target,BCT_ENEMY) <= 0 || !status_check_skilluse(src, target, 0, 0) ) {unit_unattackable(src);@@ -1879,7 +1889,14 @@struct block_list *bl;bl = map_id2bl(id);if(bl && unit_attack_timer_sub(bl, tid, tick) == 0)+ {+ //warp on battle+ TBL_PC* sd = (TBL_PC*)bl;+ if(sd && battle_config.prevent_warponbattle)+ sd->canwarp_tick = gettick() + battle_config.prevent_warponbattle;+unit_unattackable(bl);+ }return 0;}[/cbox] Edited February 1, 2014 by themon Quote Share this post Link to post Share on other sites
0 Cydh 9 Posted February 1, 2014 (edited) yo, the msg number is wrong. at that paste, on map_msg.conf 1399: You must wait %.1f sec. before %s. but at the diff sprintf(atcmd_output, msg_txt(1555), diff_tick/1000., command); some my mistake. xD Edited February 1, 2014 by Cydh Quote Share this post Link to post Share on other sites
0 themon 63 Posted February 1, 2014 @Cydh are you going to transfer from Rathena to Hercules too? http://rathena.org/board/user/5421-cydh/ Quote Share this post Link to post Share on other sites
0 Mhalicot 392 Posted February 1, 2014 Please stay on topic @themon please use PM.. Quote Share this post Link to post Share on other sites
0 rafaelpsyco 0 Posted February 1, 2014 i got this errors Quote Share this post Link to post Share on other sites
0 rafaelpsyco 0 Posted February 1, 2014 @Cydh Very Very Very Very Very Very Thx >< Is Worked o/ Quote Share this post Link to post Share on other sites
This is a "patch" made for rAthena, someone could convert it to Hercules?
I would be very grateful!
https://www.mediafire.com/?8x8nhlz9rp1gc56
Edited by rafaelpsycoShare this post
Link to post
Share on other sites