Lord Ganja Posted August 19, 2015 Group: Members Topic Count: 141 Topics Per Day: 0.03 Content Count: 444 Reputation: 22 Joined: 06/18/12 Last Seen: August 11, 2018 Share Posted August 19, 2015 (edited) I'm trying to modify the warpgodelay. I only wanted it to work on BOSS monsters and players. A delay timer will tick whenever you inflict or received damage from boss monsters and players only. But I couldn't make it to work for boss monsters. PS: The warpgodelay for players is already fully working. The only problem here is the trigger for Boss monsters. I'm still trying to modify it to work but im really noob at src mod. But I think i'm almost there. Can anyone give me tips for this? I think this part is only the problem: if( src->type == BL_PC || src->type == BL_MOB && is_boss(src) ) { sd->warpgodelay_tick = tick + warpgodelaycd; //This is the timer md->warpgodelay_tick = tick + warpgodelaycd; //This is the timer } Whenever I used this part src->type == BL_MOB && is_boss(src) , it somehow works, but not fully working. warpgodelay is ONLY triggered when im attacked. And even the mobs like Salamander, Necromancer attacked me, it is triggered. I only wanted it to work for boss only. Should I just change this part "src->type == BL_MOB && is_boss(src)"? or I still need to add something? my main purpose for this is to avoid the Champion MVP Hunting while warping after casting Asura Strike. Here's the part of the script: /*========================================== * Invoked when a player has received damage *------------------------------------------*/ void pc_damage(struct map_session_data *sd,struct block_list *src,unsigned int hp, unsigned int sp) { unsigned int tick = gettick(); int warpgodelaycd = 5000; //This is the delay in milliseconds you can set what ever delay you want struct map_session_data *md = (struct map_session_data *)src; if (sp) clif_updatestatus(sd,SP_SP); if (hp) clif_updatestatus(sd,SP_HP); else return; if( !src || src == &sd->bl ) return; if( src->type == BL_PC || src->type == BL_MOB && is_boss(src) ) { sd->warpgodelay_tick = tick + warpgodelaycd; //This is the timer md->warpgodelay_tick = tick + warpgodelaycd; //This is the timer } if( pc_issit(sd) ) { pc_setstand(sd, true); skill_sit(sd,0); } if( sd->progressbar.npc_id ) clif_progressbar_abort(sd); if( sd->status.pet_id > 0 && sd->pd && battle_config.pet_damage_support ) pet_target_check(sd->pd,src,1); if( sd->status.ele_id > 0 ) elemental_set_target(sd,src); sd->canlog_tick = gettick(); } I'm willing to pay if it's needed. Just drop me a message here. Thank you! Edited August 19, 2015 by Lord Ganja Quote Link to comment Share on other sites More sharing options...
Ninja Posted August 21, 2015 Group: Members Topic Count: 54 Topics Per Day: 0.01 Content Count: 513 Reputation: 84 Joined: 08/11/12 Last Seen: July 4, 2024 Share Posted August 21, 2015 (edited) the header comment says it all: /*========================================== * Invoked when a player has received damage *------------------------------------------*/ anyway,your issue about salamander and necromancer still triggering it is that because these monsters are considered as bosses.if you don't want that to happen you can manually change their "mode" in your mob_db sql tables by checking https://rathena.org/wiki/Custom_Mobs#Database_Structure by the way src->type == BL_MOB && is_boss(src) try using only is_boss(src) since a boss types can only be related to mobs.not sure about the part where a player is the one attacking though. Edited August 21, 2015 by jezznar 1 Quote Link to comment Share on other sites More sharing options...
Lord Ganja Posted August 21, 2015 Group: Members Topic Count: 141 Topics Per Day: 0.03 Content Count: 444 Reputation: 22 Joined: 06/18/12 Last Seen: August 11, 2018 Author Share Posted August 21, 2015 the header comment says it all: /*========================================== * Invoked when a player has received damage *------------------------------------------*/anyway,your issue about salamander and necromancer still triggering it is that because these monsters are considered as a boss. if you don't want that to happen you can manually change their "mode" in your mob_db sql tables by checking https://rathena.org/wiki/Custom_Mobs#Database_Structureby the way src->type == BL_MOB && is_boss(src)try using only is_boss(src)since a boss types can only be related to mobs.not sure about the part where a player is the one attacking though. //edit If I were you i'd go and add my modification in the atcommand.c And i think you can detect attacks by checking the session data -> target_id Im out somewhere so I can't check it right now xD Thanks for your reply Jezznar. Anyway, I don't wan't to mess up anything in mob_db when I change the mode. I want it to stay the same.. Btw, the one that you're telling me about the modification in the atcommand.c, can you help me through it? im really bad at src. I can only do slight/easy modifcations but not the complicated ones. LOL I was thinking about using the OnPCStatCalcEvent so I can specify which monster's while being attacked will trigger the script. But I don't know how to create a 'target' variable so I can filter the target. Example: OnPCStatCalcEvent: if( target == <monster id> ) { // I will put the script here that will trigger the warpgodelay } Quote Link to comment Share on other sites More sharing options...
Ninja Posted August 22, 2015 Group: Members Topic Count: 54 Topics Per Day: 0.01 Content Count: 513 Reputation: 84 Joined: 08/11/12 Last Seen: July 4, 2024 Share Posted August 22, 2015 I'm not really good at source too, just thought of using my knowledge on logical statements from what you presented Quote Link to comment Share on other sites More sharing options...
Lord Ganja Posted August 22, 2015 Group: Members Topic Count: 141 Topics Per Day: 0.03 Content Count: 444 Reputation: 22 Joined: 06/18/12 Last Seen: August 11, 2018 Author Share Posted August 22, 2015 I'm not really good at source too, just thought of using my knowledge on logical statements from what you presented What about the one that you suggested, the mod on atcommand.c? Quote Link to comment Share on other sites More sharing options...
Ninja Posted August 22, 2015 Group: Members Topic Count: 54 Topics Per Day: 0.01 Content Count: 513 Reputation: 84 Joined: 08/11/12 Last Seen: July 4, 2024 Share Posted August 22, 2015 Yeah but when I looked at the src for mapmove and didn't find anything juicy. >_< Quote Link to comment Share on other sites More sharing options...
Lord Ganja Posted August 22, 2015 Group: Members Topic Count: 141 Topics Per Day: 0.03 Content Count: 444 Reputation: 22 Joined: 06/18/12 Last Seen: August 11, 2018 Author Share Posted August 22, 2015 Yeah but when I looked at the src for mapmove and didn't find anything juicy. >_< That's sad maybe i'll just wait. hope someone can help me with this. anyway, thank you. Quote Link to comment Share on other sites More sharing options...
Ninja Posted August 22, 2015 Group: Members Topic Count: 54 Topics Per Day: 0.01 Content Count: 513 Reputation: 84 Joined: 08/11/12 Last Seen: July 4, 2024 Share Posted August 22, 2015 no problem Quote Link to comment Share on other sites More sharing options...
Question
Lord Ganja
I'm trying to modify the warpgodelay. I only wanted it to work on BOSS monsters and players.
A delay timer will tick whenever you inflict or received damage from boss monsters and players only.
But I couldn't make it to work for boss monsters.
PS: The warpgodelay for players is already fully working. The only problem here is the trigger for Boss monsters.
I'm still trying to modify it to work but im really noob at src mod. But I think i'm almost there. Can anyone give me tips for this?
I think this part is only the problem:
if( src->type == BL_PC || src->type == BL_MOB && is_boss(src) ) {
sd->warpgodelay_tick = tick + warpgodelaycd; //This is the timer
md->warpgodelay_tick = tick + warpgodelaycd; //This is the timer
}
Whenever I used this part src->type == BL_MOB && is_boss(src) , it somehow works, but not fully working.
warpgodelay is ONLY triggered when im attacked. And even the mobs like Salamander, Necromancer attacked me, it is triggered.
I only wanted it to work for boss only.
Should I just change this part "src->type == BL_MOB && is_boss(src)"? or I still need to add something?
my main purpose for this is to avoid the Champion MVP Hunting while warping after casting Asura Strike.
Here's the part of the script:
I'm willing to pay if it's needed. Just drop me a message here. Thank you!
Edited by Lord GanjaLink to comment
Share on other sites
7 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.