Jump to content

AnnieRuru

Script Developers
  • Content Count

    1677
  • Joined

  • Last visited

  • Days Won

    246

Everything posted by AnnieRuru

  1. merge in https://github.com/HerculesWS/Hercules/commit/b5c5e6c91b0b7009dc17492419c1f116fbd7d037
  2. maybe some GM spam it ?try comment this line //bindatcmd "lms", strnpcinfo(0)+"::OnStart", 99,100;so GM can't start this event. . ok, the registration timer is now configurable 1.2 http://upaste.me/eea72228293b40363 - change getmapxy type 1 into UNITTYPE_NPC, Haru just merge my pull request yesterday -> link - change 0xFF0000 into C_RED, Haru also just merge my pull request today -> link - change 0x190 into FW_BOLD, found in const.txt - change the way to check your server using latest hercules ? just check with a constant - add a configuration for .register_timer
  3. hmm ... I can't search on rathena forum ... stupid ... seriously rathena should fix their advance search engine nvm, write a new one ... function script F_today { return atoi( gettimestr("%Y%m%d", 9) );}prontera,155,185,5 script I Hate Doctor 1_F_MARIA,{ if ( callfunc("F_today") == last_apple_taken ) { mes "you already receive an apple"; close; } mes "an apple a day, kick the doctor away"; getitem Apple, 1; last_apple_taken = callfunc("F_today"); close;}thx to emistry some server out there uses gettime(GETTIME_DAYOFYEAR), which is gettime(8) to track I still prefer to save in date format so I can see the value in the sql
  4. AnnieRuru

    AFK Plugins

    @@Dastgir, afk.c: In function 'server_preinit':afk.c:125:48: error: macro "addBattleConf" requires 3 arguments, but only 2 givenyou should know our sample.c has changed again, don't you ?whenever Haru change the srcplugin folder, that also means our plugin break every time https://github.com/HerculesWS/Hercules/commit/f102c913b2aa093ef40c7846e25850ebb1106d71
  5. that was old behavior I guess now critical only bypass the def so on the screenshot, the barricade only has 1 def, that's why only deal 1 extra damage if you try on other monsters which has more def, the critical will bypass the monster def and deal the same damage as the screenshot
  6. of course I tested before I post normally damage as 230 then after the script, readjust the equipment (need it to run status_calc_pc_) damage become 460
  7. show your skill.c file it looks like different than mine // Skill DBint skill_get_hit( uint16 skill_id ) { skill_get (skill->dbs->db[skill_id].hit, skill_id); }int skill_get_inf( uint16 skill_id ) { skill_get (skill->dbs->db[skill_id].inf, skill_id); }int skill_get_ele( uint16 skill_id , uint16 skill_lv ) { Assert_ret(skill_lv > 0); skill_get (skill->dbs->db[skill_id].element[skill_glv(skill_lv-1)], skill_id); }int skill_get_nk( uint16 skill_id ) { skill_get (skill->dbs->db[skill_id].nk, skill_id); }int skill_get_max( uint16 skill_id ) { skill_get (skill->dbs->db[skill_id].max, skill_id); }int skill_get_range( uint16 skill_id , uint16 skill_lv ) { Assert_ret(skill_lv > 0); skill_get2 (skill->dbs->db[skill_id].range[skill_glv(skill_lv-1)], skill_id, skill_lv); }int skill_get_splash( uint16 skill_id , uint16 skill_lv ) { Assert_ret(skill_lv > 0); skill_get2 ( (skill->dbs->db[skill_id].splash[skill_glv(skill_lv-1)]>=0?skill->dbs->db[skill_id].splash[skill_glv(skill_lv-1)]:AREA_SIZE), skill_id, skill_lv); }int skill_get_hp( uint16 skill_id ,uint16 skill_lv ) { Assert_ret(skill_lv > 0); skill_get2 (skill->dbs->db[skill_id].hp[skill_glv(skill_lv-1)], skill_id, skill_lv); }int skill_get_sp( uint16 skill_id ,uint16 skill_lv ) { Assert_ret(skill_lv > 0); skill_get2 (skill->dbs->db[skill_id].sp[skill_glv(skill_lv-1)], skill_id, skill_lv); }int skill_get_hp_rate(uint16 skill_id, uint16 skill_lv ) { Assert_ret(skill_lv > 0); skill_get2 (skill->dbs->db[skill_id].hp_rate[skill_glv(skill_lv-1)], skill_id, skill_lv); }int skill_get_sp_rate(uint16 skill_id, uint16 skill_lv ) { Assert_ret(skill_lv > 0); skill_get2 (skill->dbs->db[skill_id].sp_rate[skill_glv(skill_lv-1)], skill_id, skill_lv); }int skill_get_state(uint16 skill_id) { skill_get (skill->dbs->db[skill_id].state, skill_id); }int skill_get_spiritball(uint16 skill_id, uint16 skill_lv) { Assert_ret(skill_lv > 0); skill_get2 (skill->dbs->db[skill_id].spiritball[skill_glv(skill_lv-1)], skill_id, skill_lv); }int skill_get_itemid(uint16 skill_id, int idx) { skill_get (skill->dbs->db[skill_id].itemid[idx], skill_id); }int skill_get_itemqty(uint16 skill_id, int idx) { skill_get (skill->dbs->db[skill_id].amount[idx], skill_id); }int skill_get_zeny( uint16 skill_id ,uint16 skill_lv ) { Assert_ret(skill_lv > 0); skill_get2 (skill->dbs->db[skill_id].zeny[skill_glv(skill_lv-1)], skill_id, skill_lv); }int skill_get_num( uint16 skill_id ,uint16 skill_lv ) { Assert_ret(skill_lv > 0); skill_get2 (skill->dbs->db[skill_id].num[skill_glv(skill_lv-1)], skill_id, skill_lv); }int skill_get_cast( uint16 skill_id ,uint16 skill_lv ) { Assert_ret(skill_lv > 0); skill_get2 (skill->dbs->db[skill_id].cast[skill_glv(skill_lv-1)], skill_id, skill_lv); }int skill_get_delay( uint16 skill_id ,uint16 skill_lv ) { Assert_ret(skill_lv > 0); skill_get2 (skill->dbs->db[skill_id].delay[skill_glv(skill_lv-1)], skill_id, skill_lv); }int skill_get_walkdelay( uint16 skill_id ,uint16 skill_lv ) { Assert_ret(skill_lv > 0); skill_get2 (skill->dbs->db[skill_id].walkdelay[skill_glv(skill_lv-1)], skill_id, skill_lv); }int skill_get_time( uint16 skill_id ,uint16 skill_lv ) { Assert_ret(skill_lv > 0); skill_get2 (skill->dbs->db[skill_id].upkeep_time[skill_glv(skill_lv-1)], skill_id, skill_lv); }int skill_get_time2( uint16 skill_id ,uint16 skill_lv ) { Assert_ret(skill_lv > 0); skill_get2 (skill->dbs->db[skill_id].upkeep_time2[skill_glv(skill_lv-1)], skill_id, skill_lv); }int skill_get_castdef( uint16 skill_id ) { skill_get (skill->dbs->db[skill_id].cast_def_rate, skill_id); }int skill_get_weapontype( uint16 skill_id ) { skill_get (skill->dbs->db[skill_id].weapon, skill_id); }int skill_get_ammotype( uint16 skill_id ) { skill_get (skill->dbs->db[skill_id].ammo, skill_id); }int skill_get_ammo_qty( uint16 skill_id, uint16 skill_lv ) { Assert_ret(skill_lv > 0); skill_get2 (skill->dbs->db[skill_id].ammo_qty[skill_glv(skill_lv-1)], skill_id, skill_lv); }int skill_get_inf2( uint16 skill_id ) { skill_get (skill->dbs->db[skill_id].inf2, skill_id); }int skill_get_castcancel( uint16 skill_id ) { skill_get (skill->dbs->db[skill_id].castcancel, skill_id); }int skill_get_maxcount( uint16 skill_id ,uint16 skill_lv ) { Assert_ret(skill_lv > 0); skill_get2 (skill->dbs->db[skill_id].maxcount[skill_glv(skill_lv-1)], skill_id, skill_lv); }int skill_get_blewcount( uint16 skill_id ,uint16 skill_lv ) { Assert_ret(skill_lv > 0); skill_get2 (skill->dbs->db[skill_id].blewcount[skill_glv(skill_lv-1)], skill_id, skill_lv); }int skill_get_mhp( uint16 skill_id ,uint16 skill_lv ) { Assert_ret(skill_lv > 0); skill_get2 (skill->dbs->db[skill_id].mhp[skill_glv(skill_lv-1)], skill_id, skill_lv); }int skill_get_castnodex( uint16 skill_id ,uint16 skill_lv ) { Assert_ret(skill_lv > 0); skill_get2 (skill->dbs->db[skill_id].castnodex[skill_glv(skill_lv-1)], skill_id, skill_lv); }int skill_get_delaynodex( uint16 skill_id ,uint16 skill_lv ){ Assert_ret(skill_lv > 0); skill_get2 (skill->dbs->db[skill_id].delaynodex[skill_glv(skill_lv-1)], skill_id, skill_lv); }int skill_get_type( uint16 skill_id ) { skill_get (skill->dbs->db[skill_id].skill_type, skill_id); }int skill_get_unit_id ( uint16 skill_id, int flag ){ skill_get (skill->dbs->db[skill_id].unit_id[flag], skill_id); }int skill_get_unit_interval( uint16 skill_id ) { skill_get (skill->dbs->db[skill_id].unit_interval, skill_id); }int skill_get_unit_range( uint16 skill_id, uint16 skill_lv ) { Assert_ret(skill_lv > 0); skill_get2 (skill->dbs->db[skill_id].unit_range[skill_glv(skill_lv-1)], skill_id, skill_lv); }int skill_get_unit_target( uint16 skill_id ) { skill_get (skill->dbs->db[skill_id].unit_target&BCT_ALL, skill_id); }int skill_get_unit_bl_target( uint16 skill_id ) { skill_get (skill->dbs->db[skill_id].unit_target&BL_ALL, skill_id); }int skill_get_unit_flag( uint16 skill_id ) { skill_get (skill->dbs->db[skill_id].unit_flag, skill_id); }int skill_get_unit_layout_type( uint16 skill_id ,uint16 skill_lv ){ Assert_ret(skill_lv > 0); skill_get2 (skill->dbs->db[skill_id].unit_layout_type[skill_glv(skill_lv-1)], skill_id, skill_lv); }int skill_get_cooldown( uint16 skill_id, uint16 skill_lv ) { Assert_ret(skill_lv > 0); skill_get2 (skill->dbs->db[skill_id].cooldown[skill_glv(skill_lv-1)], skill_id, skill_lv); }int skill_get_fixed_cast( uint16 skill_id ,uint16 skill_lv ) {on line 171 I haveint skill_get_max( uint16 skill_id ) { skill_get (skill->dbs->db[skill_id].max, skill_id); } https://github.com/HerculesWS/Hercules/blob/master/src/map/skill.c#L171which doesn't even has skill_get_time ... EDIT: skill_get_time is on line 187 ...
  8. @@Vlync well your posts has nothing to do with the original topic, just having problems installing so I split your posts so, I just tested out the method proposed by @@hemagx ... I think I upload them to wiki instead http://herc.ws/wiki/Building_HPM_Plugin_for_MSVC#New_Method I do think this method is a bit cleaner than the old one I don't mind there are more steps for the older method, but this new method compile in to the herculesvcproj-10 folder instead the old method compile to hercules folder it does looks neater
  9. then another possibility is you didn't follow step 15 http://herc.ws/wiki/Building_HPM_Plugin_for_MSVC#Step_15
  10. src/map/mob.c | 6 ++++++ 1 file changed, 6 insertions(+)diff --git a/src/map/mob.c b/src/map/mob.cindex 0d6055b..91f3070 100644--- a/src/map/mob.c+++ b/src/map/mob.c@@ -2614,6 +2614,12 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type) { } else npc->event_do(md->npc_event); } else if( mvp_sd && !md->state.npc_killmonster ) {+ ShowDebug( "s1 %d", battle->get_current_skill(src) );+ ShowDebug( "s2 %d", battle->get_current_skill(&sd->bl) );+ ShowDebug( "s3 %d", battle->get_current_skill(&mvp_sd->bl) );+ ShowDebug( "s4 %d", unit->bl2ud(src)->skill_id );+ ShowDebug( "s5 %d", unit->bl2ud(&sd->bl)->skill_id );+ ShowDebug( "s6 %dn", unit->bl2ud(&mvp_sd->bl)->skill_id ); pc->setparam(mvp_sd, SP_KILLEDRID, md->class_); npc->script_event(mvp_sd, NPCE_KILLNPC); // PCKillNPC [Lance] }hmm ... no idea, all value return 0 when I kill the poring with firebolt skill ...
  11. also can but you should check your emulator have hercules.h in your srccommon folder
  12. well if you want to give ALL players to increase their skill damage, you can try - script jsdfksf FAKE_NPC,{OnPCStatCalcEvent: bonus2 bSkillAtk, MG_FIREBOLT, 100; end;}increase MG_FIREBOLT skill damage by 100% for all players
  13. poll_0.4 - added block ip address - change date_format in query_sql this thing is far from complete, the reason I posted GMXeon's support ticket because I want to integrate with his reply system - reply option to the poll, on/off ( maybe another table ... `poll_reply` ) - auto-close poll on certain time ( maybe 1 more field on `poll_title` table ) - list all players voted on the poll options when view result ( that's the reason `poll_votes` exist ) - able to view archived polls ( I already did the ID system without deleting existing polls ) btw you should at least try Myzter's one ... I feel like some of his feature are interesting and not yet in my script
  14. that's not really the latest one although I have to agree with you that your version, should only have PCRE_SUPPORT error ... I already updated the wiki some time ago https://github.com/HerculesWS/Hercules/tree/master/src/common these is a hercules.h in this folder ...
  15. https://github.com/HerculesWS/Hercules/commit/51b7adcf4e5b2a347081ec9a6903102c4909a404#diff-49b8415c452254b948902d0b65e5e750R5 your hercules is behind this version ... before Jun 16 ??
  16. 1.1 - fix the bug mentioned above - change all stuffs that I can find into constants - fix a rare bug that if player brings in a slave monster, the monster get killed whenever the emperium spawn/dead - add a plugin this time
  17. sorry, bump //===== Hercules Script ======================================//= @sameip//===== By: ==================================================//= AnnieRuru//===== Current Version: =====================================//= 0.2//===== Compatible With: ===================================== //= Hercules 2015-12-19//===== Description: =========================================//= list all players with same ip address//===== Topic ================================================//= http://herc.ws/board/topic/11445-sameip-command-for-rathena///===== Additional Comments: ================================= //= it always list all players online, unable to limit to a single map currently//============================================================- script kjdshfksfj FAKE_NPC,{OnInit: bindatcmd "sameip", strnpcinfo(0)+"::Onaaa"; end;Onaaa: freeloop true; .@nb = query_sql( "select name, char_id, account_id as aaa, ( select last_ip from login where account_id = aaa ) from `char` where online = 1", .@name$, .@aid, .@cid, .@ip$ ); for ( .@i = 0; .@i < .@nb; ++.@i ) { for ( .@j = 0; .@j < .@ip_list; ++.@j ) if ( .@b_ip$[.@j] == .@ip$[.@i] ) break; if ( .@j == .@ip_list ) { .@b_ip$[.@j] = .@ip$[.@i]; ++.@ip_list; } setd ".@b_ip"+ .@j +"_name$["+ .@b_ip_size[.@j] +"]", .@name$[.@i]; setd ".@b_ip"+ .@j +"_cid$["+ .@b_ip_size[.@j] +"]", .@cid[.@i] +""; ++.@b_ip_size[.@j]; } dispbottom "===== SAME IP Searching ====="; for ( .@i = 0; .@i < .@ip_list; ++.@i ) { if ( .@b_ip_size[.@i] > 1 ) { dispbottom " == The IP ["+ .@b_ip$[.@i] +"] has "+ .@b_ip_size[.@i] +" players."; for ( .@j = 0; .@j < .@b_ip_size[.@i]; ++.@j ) { getmapxy .@map$, .@x, .@y, 0, getd( ".@b_ip"+ .@i +"_name$["+ .@j +"]"); dispbottom " = "+( .@j +1 )+". ("+ getd( ".@b_ip"+ .@i +"_cid$["+ .@j +"]" ) +") "+ getd( ".@b_ip"+ .@i +"_name$["+ .@j +"]") +" -> "+ .@map$ +" "+ .@x +" "+ .@y; } ++.@result; } } dispbottom ">>> "+ .@result +" results found."; end;}use this one, I totally forgot about about table joining will cause the query run slowerwhen I was cleaning up my old scripts, I relearn this trick
  18. /conf/plugins.conf plugins_list: [ /* Enable HPMHooking when plugins in use rely on Hooking */ "HPMHooking",always uncomment this line
  19. http://herc.ws/wiki/Hercules_Plugin_Manager//===== Hercules Plugin ======================================//= Maximum Level Exp Gain//===== By: ==================================================//= AnnieRuru//===== Current Version: =====================================//= 0.2//===== Compatible With: ===================================== //= Hercules 2015-12-19//===== Description: =========================================//= stop players from gaining exp after certain level//===== Topic ================================================//= http://herc.ws/board/topic/11510-set-base-exp-gain-to-0-at-certain-level//===== Additional Comments: ================================= //= the 1st one I did has a battle config//============================================================#include "common/hercules.h"#include <stdio.h>#include <string.h>#include <stdlib.h>#include "map/pc.h"#include "common/nullpo.h"#include "common/HPMDataCheck.h"HPExport struct hplugin_info pinfo = { "MaxLvExpGain", SERVER_TYPE_MAP, "0.2", HPM_VERSION,};int max_lv_exp_gain = 99;void battle_config_setting( const char *key, const char *val ) { if ( !strcmpi( key, "max_lv_exp_gain" ) ) max_lv_exp_gain = atoi(val);}int return_battle_config( const char *key ) { if ( !strcmpi( key, "max_lv_exp_gain" ) ) return max_lv_exp_gain; return 0;}int pc_checkbaselevelup_pre( struct map_session_data *sd ) { nullpo_ret(sd); if ( (int)sd->status.base_level >= max_lv_exp_gain ) { sd->status.base_exp = 0; hookStop(); return false; } return true;}HPExport void server_preinit (void) { addBattleConf( "max_lv_exp_gain", battle_config_setting, return_battle_config );}HPExport void plugin_init (void) { addHookPre( "pc->checkbaselevelup", pc_checkbaselevelup_pre );}hahaha ...
  20. I just solved the other topic by reading the mob_dead function ... LOL #include "common/hercules.h"#include <stdio.h>#include <string.h>#include <stdlib.h>#include "map/pc.h"#include "common/nullpo.h"#include "common/HPMDataCheck.h"HPExport struct hplugin_info pinfo = { "NoEXP_Gain", SERVER_TYPE_MAP, "0.1", HPM_VERSION,};int max_lv_exp_gain = 99;int pc_checkbaselevelup_pre( struct map_session_data *sd ) { nullpo_ret(sd); if ( (int)sd->status.base_level >= max_lv_exp_gain ) { sd->status.base_exp = 0; hookStop(); return false; } return true;}HPExport void plugin_init (void) { addHookPre( "pc->checkbaselevelup", pc_checkbaselevelup_pre );}just like this is enough,this line in mob.c party->exp_share(pt[i].p, &md->bl, pt[i].base_exp,pt[i].job_exp,pt[i].zeny);I saw party_exp_share function also runs pc_gainexp function, so just hook this 1 function enough EDIT: erm ... it seems to block job_exp gain ... now fixing ... EDIT2: ok done
  21. ok then I coded it then you know apple doesn't have unique ID OnPCPickUpEvent prontera,155,185,5 script kjsdhfdksfj 1_F_MARIA,{ setarray .@a, 1203,1,4,0, 4001,4001,4859,4701; getitem2 .@a[0],1,.@a[1],.@a[2],.@a[3], .@a[4],.@a[5],.@a[6],.@a[7]; end; OnPCPickUpEvent: announce strcharinfo(0) +" has obtained "+ @pickup[PICKUP_AMOUNT] +"x "+ getitemname(@pickup[PICKUP_ITEMID]) //+ callfunc( "getitemname2", @pickup[PICKUP_ITEMID], @pickup[PICKUP_IDENTIFY], @pickup[PICKUP_REFINE], @pickup[PICKUP_BROKEN], @pickup[PICKUP_CARD1], @pickup[PICKUP_CARD2], @pickup[PICKUP_CARD3], @pickup[PICKUP_CARD4] ) +" at "+ strcharinfo(3) +","+ @pickup[PICKUP_POSX] +","+ @pickup[PICKUP_POSY], bc_all; dispbottom "unique ID = "+ @pickup[PICKUP_UNIQUEID]; end; } Knife -> Apple -> so its impossible EDIT: or maybe if you make it undroppable ... nodrop: true in the item_db.conf ... hmm ... EDIT2: the idea of this modification came from https://www.eathena.ws/board/index.php?s=&showtopic=247755&view=findpost&p=1487853
  22. coding OnPCPickUpEvent now ... ok I'm not coding it =/ EDIT: how to check if the player actually just drop the apple and pick up, repeating the process to bypass this system ? I just found Hercules unique_id is not meant for stackable items, only equipments thus it is currently impossible to check, I guess ? looks impossible currently
  23. read the mob_dead function in mob.c file ) { //Experience calculation. int bonus = 100; //Bonus on top of your share (common to all attackers). int pnum = 0; if (md->sc.data[SC_RICHMANKIM]) bonus += md->sc.data[SC_RICHMANKIM]->val2; if(sd) { temp = status->get_class(&md->bl); if(sd->sc.data[SC_MIRACLE]) i = 2; //All mobs are Star Targets else ARR_FIND(0, MAX_PC_FEELHATE, i, temp == sd->hate_mob[i] && (battle_config.allow_skill_without_day || pc->sg_info[i].day_func())); if(i<MAX_PC_FEELHATE && (temp=pc->checkskill(sd,pc->sg_info[i].bless_id)) > 0) bonus += (i==2?20:10)*temp; } if(battle_config.mobs_level_up && md->level > md->db->lv) // [Valaris] bonus += (md->level-md->db->lv)*battle_config.mobs_level_up_exp_rate; for(i = 0; i < DAMAGELOG_SIZE && md->dmglog[i].id; i++) { int flag=1,zeny=0; unsigned int base_exp, job_exp; double per; //Your share of the mob's exp if (!tmpsd[i]) continue; if (!battle_config.exp_calc_type && md->tdmg) //jAthena's exp formula based on total damage. per = (double)md->dmglog[i].dmg/(double)md->tdmg; else { //eAthena's exp formula based on max hp. per = (double)md->dmglog[i].dmg/(double)mstatus->max_hp; if (per > 2) per = 2; // prevents unlimited exp gain } if (count>1 && battle_config.exp_bonus_attacker) { //Exp bonus per additional attacker. if (count > battle_config.exp_bonus_max_attacker) count = battle_config.exp_bonus_max_attacker; per += per*((count-1)*battle_config.exp_bonus_attacker)/100.; } // change experience for different sized monsters [Valaris] if (battle_config.mob_size_influence) { switch( md->special_state.size ) { case SZ_MEDIUM: per /= 2.; break; case SZ_BIG: per *= 2.; break; } } if( md->dmglog[i].flag == MDLF_PET ) per *= battle_config.pet_attack_exp_rate/100.; if(battle_config.zeny_from_mobs && md->level) { // zeny calculation moblv + random moblv [Valaris] zeny=(int) ((md->level+rnd()%md->level)*per*bonus/100.); if(md->db->mexp > 0) zeny*=rnd()%0; } if (map->list[m].flag.nobaseexp || !md->db->base_exp) base_exp = 0; else base_exp = (unsigned int)cap_value(md->db->base_exp * per * bonus/100. * map->list[m].bexp/100., 1, UINT_MAX); if (map->list[m].flag.nojobexp || !md->db->job_exp || md->dmglog[i].flag == MDLF_HOMUN) //Homun earned job-exp is always lost. job_exp = 0; else job_exp = (unsigned int)cap_value(md->db->job_exp * per * bonus/100. * map->list[m].jexp/100., 1, UINT_MAX); if ( (temp = tmpsd[i]->status.party_id) > 0 ) { int j; for( j = 0; j < pnum && pt[j].id != temp; j++ ); //Locate party. if( j == pnum ){ //Possibly add party. pt[pnum].p = party->search(temp); if(pt[pnum].p && pt[pnum].p->party.exp) { pt[pnum].id = temp; pt[pnum].base_exp = base_exp; pt[pnum].job_exp = job_exp; pt[pnum].zeny = zeny; // zeny share [Valaris] pnum++; flag=0; } } else { //Add to total if (pt[j].base_exp > UINT_MAX - base_exp) pt[j].base_exp = UINT_MAX; else pt[j].base_exp += base_exp; if (pt[j].job_exp > UINT_MAX - job_exp) pt[j].job_exp = UINT_MAX; else pt[j].job_exp += job_exp; pt[j].zeny+=zeny; // zeny share [Valaris] flag=0; } } if(base_exp && md->dmglog[i].flag == MDLF_HOMUN) //tmpsd[i] is null if it has no homunc. homun->gainexp(tmpsd[i]->hd, base_exp); if(flag) { if(base_exp || job_exp) { if( md->dmglog[i].flag != MDLF_PET || battle_config.pet_attack_exp_to_master ) {#ifdef RENEWAL_EXP int rate = pc->level_penalty_mod(md->level - (tmpsd[i])->status.base_level, md->status.race, md->status.mode, 1); base_exp = (unsigned int)cap_value(base_exp * rate / 100, 1, UINT_MAX); job_exp = (unsigned int)cap_value(job_exp * rate / 100, 1, UINT_MAX);#endif pc->gainexp(tmpsd[i], &md->bl, base_exp, job_exp, false); } } if(zeny) // zeny from mobs [Valaris] pc->getzeny(tmpsd[i], zeny, LOG_TYPE_PICKDROP_MONSTER, NULL); } } for( i = 0; i < pnum; i++ ) //Party share. party->exp_share(pt[i].p, &md->bl, pt[i].base_exp,pt[i].job_exp,pt[i].zeny); } //End EXP giving.possible no.1you have Mr.Kim a Rich man buff possible no.2 you are a Star Gladiator, and killed a mob that is under Blessing of Star, Blessing of Moon, Blessing of Sun possible no.3 your server has "mobs_level_up" enabled, and the monster leveled up, thus increased its exp gain possible no.4 if you kill steal other player's mob, your exp gain rate is less than normal possible no.5 your server has "mob_size_influence" enabled, and killing a big size monster gain double exp possible no.6 that map has bexp or jexp mapflag enabled, thus exp gain increased by mapflags possible no.7 you joined a party and has party share exp option ON, sure you exp gain is share with party members possible no.8 you have a pet, and has "pet_attack_exp_to_master" enabled , the mob killed by pets are share with you nope, no more possible no.9 with default hercules source code unless you have modified something
  24. I remember I also did another poll system for rathena users https://rathena.org/board/topic/75157-poll-npc-enabledisable/ I remember at the time when I test myzter one ... I don't recall having bugs well that was ... 3 years ago, let me see ... my script goes 1st, poll_0.3.txt - Fix npc id into constant, hercules script engine spam this error - Fix baselevel into Baselevel, hercules script engine is case-sensitive - Fix getbattleflag("max_lv") into MAX_LEVEL - add bindatcmd to OnWhisperGlobal label, now just have to type @poll - Fix the weird symbol in my hexed client ... yeah my hexed client sux - change all .@i++ into ++.@i next is myzter's ... http://upaste.me/01fc22264347d5bff - Fix npc id into constant - Fix "select version()" without a dummy field - add bindatcmd to OnWhisperGlobal label, now just have to type @poll - Fix the weird symbol in my hexed client ... yeah my hexed client sux next is [GM]Xeon ... CREATE TABLE `support_response` (`ticket_id` int(11) NOT NULL,`reply_number` int(11) NOT NULL default '1',`char_name` varchar(24) NOT NULL default '',`char_id` int(11) unsigned NOT NULL default '0',`message` varchar(80) NOT NULL default '',`status_change` decimal(10,0) NOT NULL default '-1',`date` datetime NULL) ENGINE=InnoDB;CREATE TABLE `support_ticket` (`ticket_id` int(11) NOT NULL auto_increment,`status` tinyint(1) NOT NULL default '0',`char_name` varchar(24) NOT NULL default '',`char_id` int(11) unsigned NOT NULL default '0',`title` varchar(45) NOT NULL default '',`message` varchar(80) NOT NULL default '',`date` datetime NULL,PRIMARY KEY (`ticket_id`)) ENGINE=InnoDB; http://upaste.me/a2d22226654d3679cthe only thing I change is the npc ID into constant this script still works well
  25. This script is no longer necessary, use the one inside Global Function Commit Link Credit to @Haru Pull #872
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.