Jump to content

AnnieRuru

Script Developers
  • Content Count

    1677
  • Joined

  • Last visited

  • Days Won

    245

Everything posted by AnnieRuru

  1. that's why I keep saying hercules mob controller is utterly broken there are 2 problems here 1. the hp and max hp is very strange thing when you want to increase the monster hp, setunitdata UDT_MAXHP 1st, then UDT_HP later when you want to decrease the monster hp, setunitdata UDT_HP 1st, then UDT_MAXHP later I'm not even sure need to fix this or not, because rathena also doing this way 2. yes, our recalculate monster status are broken https://github.com/HerculesWS/Hercules/pull/2408 prontera,155,185,5 script askdaksd 1_F_MARIA,{ .@mobgid = monster( "this", -1,-1, "--ja--", PORING, 1 ); setunitdata .@mobgid, UDT_MAXHP, 1000000; setunitdata .@mobgid, UDT_HP, 1000000; setunitdata .@mobgid, UDT_LEVEL, 99; end; }
  2. and why you need that ? a search in npc folder, seems like brasilis is the one that mentioned waterfall a lot
  3. test with { Id: 5083 AegisName: "Red_Tailed_Ribbon" Name: "Red Ribbon" Type: "IT_ARMOR" Buy: 20 Weight: 200 Def: 2 Loc: "EQP_HEAD_TOP" EquipLv: 45 ViewSprite: 167 Script: <" bonus bMdef,10; autobonus2 "{ if(Hp < MaxHp/4) bonus bAtk, 10000; }", 1000, 5000, BF_WEAPON|BF_MAGIC|BF_MISC|BF_NORMAL|BF_SKILL; "> }, it works, but the bAtk bonus only give you for the <duration> in seconds ... if the duration too high, like 1 day, lol ... if the player already recover the hp, the bAtk will still be there ok 1 more try https://github.com/AnnieRuru/Release/blob/master/plugins/bAtkWhenLowHP.c this one can be use on live server EDITING --- found a bug OK done
  4. no.1, my 1st impression is run status_calc_pc everytime player receive hits or healing, which will be server resources heavy OnPCStatCalcEvent already deem very resource heavy, and you want to make this heavier LOL no.2, even I want to write this for fun when player login, sd->battle_status.max_hp is 0, and can cause server crash when I changed to sd->status.max_hp, that is the player's base hp, if the player have bMaxHP bonus then it will calculate wrongly EDIT: some minor trick to calculate division by 1 instead of 0, kinda hacky no not recommend EDIT2: but if you want the bonus only at certain HP threshold like only activate below 15% hp, then it might be more ... practical
  5. https://rathena.org/board/topic/114244-andro-for-athena/ the latest AndRO is 20171227, and the new quest log is only for 2018-03-07b onward use old school method then https://github.com/AnnieRuru/Release/blob/master/scripts/Utility/daily supply/daily_supply_0.3.txt 20180621 is the default version rathena is using right now, so I guess its stable
  6. the new quest log window is only for 2018-03-07b onward, so if your client is not so up to date, can use version 0.3 ... nope, that is just some information when I brainstorming some quest idea about Dastgir's idea that add custom quest in Any tab, I'm thinking not going for it, because I'm thinking of integrate this with achievement system ... using such old client version also means you can't use more modern features
  7. 1.1 plugin -- update to latest revision -- fix the option not showing by adding clif->changeoption
  8. 1.6 - plugin --- fix server crash on certain compiler thanks to @Kuroe for reporting
  9. 1.5 - plugin - remove the 50 items restriction limit by utilizing vector
  10. not very satisfy with my previous attempt, so redo again with *hateffect #include "common/hercules.h" #include "map/pc.h" #include "map/battle.h" #include "common/timer.h" #include "plugins/HPMHooking.h" #include "common/HPMDataCheck.h" HPExport struct hplugin_info pinfo = { "pk_showeffect", SERVER_TYPE_MAP, "0.2", HPM_VERSION, }; int hateffect_timerid = INVALID_TIMER; int hateffect_countdown( int tid, int64 tick, int id, intptr data ) { struct map_session_data *sd = map->id2sd(id); if ( sd != NULL ) clif->hat_effect_single( &sd->bl, 27, false ); hateffect_timerid = INVALID_TIMER; return 0; } int battle_check_target_post( int retVal, struct block_list *src, struct block_list *target, int flag ) { struct block_list *s_bl = src, *t_bl = target; if ( (t_bl = battle->get_master(target)) == NULL ) t_bl = target; if ( (s_bl = battle->get_master(src)) == NULL ) s_bl = src; if ( s_bl->type == BL_PC && t_bl->type == BL_PC && (flag & BCT_ENEMY) == BCT_ENEMY && retVal == 1 ) { if ( hateffect_timerid != INVALID_TIMER ) { timer->delete( hateffect_timerid, hateffect_countdown ); hateffect_timerid = INVALID_TIMER; } hateffect_timerid = timer->add( timer->gettick() + battle->bc->prevent_logout, hateffect_countdown, ((struct map_session_data*)s_bl)->bl.id, 0 ); clif->hat_effect_single( s_bl, 27, true ); } return retVal; } HPExport void plugin_init (void) { addHookPost( battle, check_target, battle_check_target_post ); }
  11. just learn attendance system today, attendance system add 2 fields to the `char` table, which is `attendance_count` and `attendance_timer` in theory, whenever player click to retrieve the item, in clif_parse_attendance_reward_request function, -> update `char` where account_id = sd->status.account_id EDIT: it seems if the player create a new character in the account, will mess up the `attendance_count` ... hmm ... have to fix this to the core ...
  12. can we do this with quest log system instead ? there is no need to waste a variable ... well, quest log system also support UI problem ? not every server use up to date client version are you using client version in year 2018 ? I'm using PACKETVER 20180621 and for your answer, just add *getcalendartime(12,0) something like that on the daily quest log script if your server using up to date client version, then I could write this script easily with *getcalendartime script command using outdated client version, then have to hijack another script variable
  13. https://github.com/HerculesWS/Hercules/pull/2309 still under review ... though EDIT -> for below, this PR not made by me, its made by @KirieZ
  14. erm ... its getting interestingly ... complexity ...
  15. https://github.com/AnnieRuru/Release/blob/master/Guides/Daily Quest - use gettimetick(2) or gettimestr.md function script timeleft__ { .@left = getarg(0); if ( .@left <= 0 ) return getarg(0); .@day = .@left / 86400; .@hour = .@left % 86400 / 3600; .@min = .@left % 3600 / 60; .@sec = .@left % 60; if ( .@day ) return sprintf( _$( "%d day %d hour" ), .@day, .@hour ); else if ( .@hour ) return sprintf( _$( "%d hour %d min" ), .@hour, .@min ); else if ( .@min ) return sprintf( _$( "%d min %d sec" ), .@min, .@sec ); else return sprintf( _$( "%d sec" ), .@sec ); } prontera,155,185,5 script kjdsfhskhf 1_F_MARIA,{ .@today = atoi( gettimestr( "%Y%m%d", 9 ) ); if ( #daily_supply == .@today ) { mes "You have already taken today's supply"; mesf "You have to wait %s countdown to get next supply", timeleft__( getcalendartime(0,0) - gettimetick(2) ); close; } getitem F_Rand( 656, 657, 505, 645, 506, 14510 ), rand(1,10); getitem F_Rand( 656, 657, 505, 645, 506, 14510 ), rand(5,15); getitem F_Rand( 656, 657, 505, 645, 506, 14510 ), rand(10,20); #daily_supply = .@today; end; }
  16. a bit off-topic, but "@auraset" plugin does teach how to do that https://github.com/dastgirp/HPM-Plugins/blob/master/src/plugins/auraset.c basically when you move near an unit with 'aura' enable, send the specialeffect again the main function to hook is clif_insight
  17. need source modification plugin to do this #include "common/hercules.h" #include "map/pc.h" #include "map/battle.h" #include "plugins/HPMHooking.h" #include "common/HPMDataCheck.h" HPExport struct hplugin_info pinfo = { "pk_showeffect", SERVER_TYPE_MAP, "x_O", HPM_VERSION, }; int battle_check_target_post( int retVal, struct block_list *src, struct block_list *target, int flag ) { struct block_list *s_bl = src, *t_bl = target; if ( (t_bl = battle->get_master(target)) == NULL ) t_bl = target; if ( (s_bl = battle->get_master(src)) == NULL ) s_bl = src; if ( s_bl->type == BL_PC && t_bl->type == BL_PC && (flag & BCT_ENEMY) == BCT_ENEMY && retVal == 1 ) clif->specialeffect( s_bl, 548, AREA ); // EF_RED_HIT return retVal; } HPExport void plugin_init (void) { addHookPost( battle, check_target, battle_check_target_post ); } player will blink with red effect when hitting another player yes, possible, setoption, specialeffect, sc_start ... you name it you just need some source modification knowledge to do it
  18. I knew that, but this doesn't show the weapon sprite although its a bit off when enable it hmm ... I just re-read the topic, you only want to enable attack/skill on these job sprite, not enabling the weapon sprite ... it was from lllaaazzz suggestion
  19. more like this https://github.com/HerculesWS/Hercules/blob/stable/doc/sample/npc_trader_sample.txt . https://github.com/AnnieRuru/Release/blob/master/Guides/Compare dynamic shop between rAthena %26 Hercules.md#callshop-vs-openshop btw, saw same topic in rathena https://rathena.org/board/topic/118526-donation-npc-request/
  20. curious, why all 3 sets have same item ID ? so it means they can be repeated ? prontera,155,185,5 script kjdsfhskhf 1_F_MARIA,{ getitem F_Rand( 656, 657, 505, 645, 506, 14510 ), rand(1,10); getitem F_Rand( 656, 657, 505, 645, 506, 14510 ), rand(5,15); getitem F_Rand( 656, 657, 505, 645, 506, 14510 ), rand(10,20); end; }
  21. almost similar to this #include "common/hercules.h" #include "map/pc.h" #include "map/atcommand.h" #include "common/timer.h" #include "common/memmgr.h" #include "common/HPMDataCheck.h" HPExport struct hplugin_info pinfo = { "die_delay", SERVER_TYPE_MAP, "x_O", HPM_VERSION, }; ACMD(kill) { if ( DIFF_TICK( timer->gettick(), sd->canlog_tick ) < battle->bc->prevent_logout ) { char msg[CHAT_SIZE_MAX]; safesnprintf( msg, CHAT_SIZE_MAX, "There is a %d seconds delay of using this command to kill the character again", battle->bc->prevent_logout /1000 ); clif->message( fd, msg ); return false; } status_kill( &sd->bl ); clif->message( sd->fd, msg_fd( fd, 13 )); // A pity! You've died. if ( fd != sd->fd ) clif->message( fd, msg_fd( fd, 14 )); // Character killed. return true; } HPExport void plugin_init (void) { addAtcommand( "kill", kill ); } this assume your prevent_logout in your battle_config has default setting // Prevent logout of players after being hit for how long (in ms, 0 disables)? prevent_logout: 10000 // When should the server prevent a player from logging out? Have no effect if prevent_logout is disabled. (Note 3) // Official servers prevent players from logging out after attacking, casting skills, and taking damage. // 0 = Players can always logout // 1 = Prevent logout on login // 2 = Prevent logout after attacking // 4 = Prevent logout after casting skill // 8 = Prevent logout after being hit prevent_logout_trigger: 14 prevent_logout_trigger have to at least has 2+8
  22. src/map/clif.c | 17 +---------------- src/map/pc.c | 2 -- 2 files changed, 1 insertion(+), 18 deletions(-) diff --git a/src/map/clif.c b/src/map/clif.c index a037d3436..8bc5a24f8 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -959,10 +959,6 @@ static void clif_get_weapon_view(struct map_session_data *sd, int *rhand, int *l nullpo_retv(sd); nullpo_retv(rhand); nullpo_retv(lhand); - if(sd->sc.option&OPTION_COSTUME) { - *rhand = *lhand = 0; - return; - } #if PACKETVER < 4 *rhand = sd->status.look.weapon; @@ -3638,9 +3634,6 @@ static void clif_changelook(struct block_list *bl, int type, int val) if (val == INVISIBLE_CLASS) /* nothing to change look */ return; - if (sd->sc.option & OPTION_COSTUME) - vd->weapon = vd->shield = 0; - if (!vd->cloth_color) break; @@ -3760,6 +3753,7 @@ static void clif_changetraplook(struct block_list *bl, int val) /// 01d7 <id>.L <type>.B <value>.L (ZC_SPRITE_CHANGE2) static void clif_sendlook(struct block_list *bl, int id, int type, int val, int val2, enum send_target target) { + ShowDebug( "type: %d val: %d\n", type, val ); struct PACKET_ZC_SPRITE_CHANGE p; p.packetType = sendLookType; p.AID = id; @@ -11061,9 +11055,6 @@ static void clif_parse_ActionRequest_sub(struct map_session_data *sd, int action if( pc_cant_act(sd) || pc_issit(sd) || sd->sc.option&OPTION_HIDE ) return; - if( sd->sc.option&OPTION_COSTUME ) - return; - if (!battle_config.sdelay_attack_enable && pc->checkskill(sd, SA_FREECAST) <= 0 && (skill->get_inf2(sd->ud.skill_id) & (INF2_FREE_CAST_REDUCED | INF2_FREE_CAST_NORMAL)) == 0) { if (DIFF_TICK(tick, sd->ud.canact_tick) < 0) { clif->skill_fail(sd, 1, USESKILL_FAIL_SKILLINTERVAL, 0, 0); @@ -12199,9 +12190,6 @@ static void clif_useSkillToIdReal(int fd, struct map_session_data *sd, int skill } } - if (sd->sc.option & OPTION_COSTUME) - return; - if (sd->sc.data[SC_BASILICA] && (skill_id != HP_BASILICA || sd->sc.data[SC_BASILICA]->val4 != sd->bl.id)) return; // On basilica only caster can use Basilica again to stop it. @@ -12327,9 +12315,6 @@ static void clif_parse_UseSkillToPosSub(int fd, struct map_session_data *sd, uin } } - if( sd->sc.option&OPTION_COSTUME ) - return; - if( sd->sc.data[SC_BASILICA] && (skill_id != HP_BASILICA || sd->sc.data[SC_BASILICA]->val4 != sd->bl.id) ) return; // On basilica only caster can use Basilica again to stop it. diff --git a/src/map/pc.c b/src/map/pc.c index ea18715bb..3285e58cd 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -2066,8 +2066,6 @@ static int pc_disguise(struct map_session_data *sd, int class) // We need to update the client so it knows that a costume is being used if( sd->sc.option&OPTION_COSTUME ) { clif->changelook(&sd->bl, LOOK_BASE, sd->vd.class); - clif->changelook(&sd->bl,LOOK_WEAPON,0); - clif->changelook(&sd->bl,LOOK_SHIELD,0); clif->changelook(&sd->bl,LOOK_CLOTHES_COLOR,sd->vd.cloth_color); } there is a reason why we disable this server-side, because I remember long time ago, during eathena times, having wedding sprite or xmas sprite can crash the client just tested again today, although it doesn't crash my 20180621 client, but it doesn't seems like can update the weapon/shield sprite properly not really sure its server or client side restriction though, I couldn't find any thing seems to block it from server side, since ShowDebug() shows the value properly ... cash mount sprite problem, yup, I can't move this topic into graphic support, because you asking multiple questions in 1 topic download act editor and fix it yourself
  23. increase movement speed bonus bSpeedAddRate,`n`; but to make the character floating, nope, only star gladiator can fly prontera,157,180,4 script Option Master 4_DOG01,{ setoption Option_Flying, true; sleep2 1000; setoption Option_Flying, false; } this will make the character flying while changing the cloth to star gladiator http://herc.ws/board/topic/15912-only-star-gladiator-can-fly/#comment-87647 its restricted by client side, which I hope someone who are good at client can take a crack at it no idea what's this means
  24. https://github.com/AnnieRuru/Release/blob/master/Guides/Shuffle Algorithm.md prontera,157,180,4 script Option Master 4_DOG01,{ mes "Your missions are;"; F_ShuffleNumbers 0, .size -1, .@r, 10; for ( .@i = 0; .@i < 10; ++.@i ) mesf "Mission %d: %d", .@i +1, .mission[.@r[.@i]]; close; OnInit: for ( .@i = 1; .@i <= 17; ++.@i ) .mission[.@i -1] = .@i + 50000; .size = getarraysize(.mission); end; }
×
×
  • Create New...

Important Information

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