Jump to content

AnnieRuru

Script Developers
  • Content Count

    1677
  • Joined

  • Last visited

  • Days Won

    245

Reputation Activity

  1. Upvote
    AnnieRuru got a reaction from banhelba2019 in @market clone   
    1.8 - plugin
    - update to latest revision
  2. Upvote
    AnnieRuru got a reaction from banhelba2019 in New damage formula (Dragon Breath)   
    no idea, I have tested it works

    do I seriously have to do like this ?
    https://github.com/HerculesWS/Hercules/compare/master...AnnieRuru:topic/16676-n.
    https://github.com/AnnieRuru/Hercules/blob/803f7335803460b8a4f2554240a9b29f4686f556/src/map/battle.c#L4957-L4963
     
  3. Upvote
    AnnieRuru got a reaction from Crown The Empire in New damage formula (Dragon Breath)   
    if you change skill->attack from BF_MISC into BF_WEAPON,
    then you should also change the damage calculation from battle_calc_misc_attack function into battle_calc_weapon_attack function
    src/map/battle.c | 15 ++++++++------- src/map/skill.c | 2 +- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/map/battle.c b/src/map/battle.c index 1b7bf909e..4193c8cd0 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -4130,13 +4130,6 @@ static struct Damage battle_calc_misc_attack(struct block_list *src, struct bloc case NPC_EVILLAND: md.damage = skill->calc_heal(src,target,skill_id,skill_lv,false); break; - case RK_DRAGONBREATH: - case RK_DRAGONBREATH_WATER: - md.damage = ((status_get_hp(src) / 50) + (status_get_max_sp(src) / 4)) * skill_lv; - RE_LVL_MDMOD(150); - if (sd) md.damage = md.damage * (95 + 5 * pc->checkskill(sd,RK_DRAGONTRAINING)) / 100; - md.flag |= BF_LONG|BF_WEAPON; - break; /** * Ranger **/ @@ -4960,6 +4953,14 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src, struct bl break; } break; + + case RK_DRAGONBREATH: + case RK_DRAGONBREATH_WATER: + wd.damage = ((status_get_hp(src) / 50) + (status_get_max_sp(src) / 4)) * skill_lv; + wd.damage = wd.damage * status->get_lv(src) / 150; + if (sd) wd.damage = wd.damage * (95 + 5 * pc->checkskill(sd,RK_DRAGONTRAINING)) / 100; + wd.flag |= BF_LONG|BF_WEAPON; + break; default: { i = (flag.cri diff --git a/src/map/skill.c b/src/map/skill.c index 633a73d67..4121d66e7 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -4937,7 +4937,7 @@ static int skill_castend_damage_id(struct block_list *src, struct block_list *bl if( (tsc = status->get_sc(bl)) && (tsc->data[SC_HIDING] )) { clif->skill_nodamage(src,src,skill_id,skill_lv,1); } else - skill->attack(BF_MISC,src,src,bl,skill_id,skill_lv,tick,flag); + skill->attack(BF_WEAPON,src,src,bl,skill_id,skill_lv,tick,flag); } break; case NPC_SELFDESTRUCTION: { but how you want to change the damage formula is totally up to you ...
  4. Upvote
    AnnieRuru got a reaction from Crown The Empire in New damage formula (Dragon Breath)   
    @@ -4960,6 +4953,14 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src, struct bl the patch has clearly said, modify the line somewhere at line no.4960
    and your compiler said your error is on line 4127
  5. Upvote
    AnnieRuru got a reaction from Crown The Empire in New damage formula (Dragon Breath)   
    no idea, I have tested it works

    do I seriously have to do like this ?
    https://github.com/HerculesWS/Hercules/compare/master...AnnieRuru:topic/16676-n.
    https://github.com/AnnieRuru/Hercules/blob/803f7335803460b8a4f2554240a9b29f4686f556/src/map/battle.c#L4957-L4963
     
  6. Like
    AnnieRuru got a reaction from Zeca in noinvitation mapflag   
    1.1 - plugin
    - update to latest revision
    - add gm_level_bypass
    @evilpuncker
  7. Upvote
    AnnieRuru got a reaction from bWolfie in Guild Skill Notification   
    static void guild_block_skill(struct map_session_data *sd, int time) { uint16 skill_id[] = { GD_BATTLEORDER, GD_REGENERATION, GD_RESTORE, GD_EMERGENCYCALL }; int i; for (i = 0; i < 4; i++) skill->blockpc_start(sd, skill_id[i], time); } hercules uses skill->blockpc_start and skill->blockpc_end to just set sd->blockskill[skill_id] = true:false;
    so you can just hook to skill->blockpc_end to display the message for the guild master
    to display the time left in min:sec, when guild master use the skill, run DIFF_TICK function
     
    oh wait this is request section ....
  8. Upvote
    AnnieRuru got a reaction from banhelba2019 in New damage formula (Dragon Breath)   
    @@ -4960,6 +4953,14 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src, struct bl the patch has clearly said, modify the line somewhere at line no.4960
    and your compiler said your error is on line 4127
  9. Upvote
    AnnieRuru got a reaction from banhelba2019 in New damage formula (Dragon Breath)   
    if you change skill->attack from BF_MISC into BF_WEAPON,
    then you should also change the damage calculation from battle_calc_misc_attack function into battle_calc_weapon_attack function
    src/map/battle.c | 15 ++++++++------- src/map/skill.c | 2 +- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/map/battle.c b/src/map/battle.c index 1b7bf909e..4193c8cd0 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -4130,13 +4130,6 @@ static struct Damage battle_calc_misc_attack(struct block_list *src, struct bloc case NPC_EVILLAND: md.damage = skill->calc_heal(src,target,skill_id,skill_lv,false); break; - case RK_DRAGONBREATH: - case RK_DRAGONBREATH_WATER: - md.damage = ((status_get_hp(src) / 50) + (status_get_max_sp(src) / 4)) * skill_lv; - RE_LVL_MDMOD(150); - if (sd) md.damage = md.damage * (95 + 5 * pc->checkskill(sd,RK_DRAGONTRAINING)) / 100; - md.flag |= BF_LONG|BF_WEAPON; - break; /** * Ranger **/ @@ -4960,6 +4953,14 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src, struct bl break; } break; + + case RK_DRAGONBREATH: + case RK_DRAGONBREATH_WATER: + wd.damage = ((status_get_hp(src) / 50) + (status_get_max_sp(src) / 4)) * skill_lv; + wd.damage = wd.damage * status->get_lv(src) / 150; + if (sd) wd.damage = wd.damage * (95 + 5 * pc->checkskill(sd,RK_DRAGONTRAINING)) / 100; + wd.flag |= BF_LONG|BF_WEAPON; + break; default: { i = (flag.cri diff --git a/src/map/skill.c b/src/map/skill.c index 633a73d67..4121d66e7 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -4937,7 +4937,7 @@ static int skill_castend_damage_id(struct block_list *src, struct block_list *bl if( (tsc = status->get_sc(bl)) && (tsc->data[SC_HIDING] )) { clif->skill_nodamage(src,src,skill_id,skill_lv,1); } else - skill->attack(BF_MISC,src,src,bl,skill_id,skill_lv,tick,flag); + skill->attack(BF_WEAPON,src,src,bl,skill_id,skill_lv,tick,flag); } break; case NPC_SELFDESTRUCTION: { but how you want to change the damage formula is totally up to you ...
  10. Upvote
    AnnieRuru got a reaction from bWolfie in OnPCStatCalcEvent   
    this isn't an issue, it just say it runs this event too many times
    probably having some scripts runs jobchange + statusup +equip + .... etc stuffs
    I remember you said something about having a refiner script runs in loop ... probably caused by that
    and even that ... it shouldn't effect anything ... just an error message
  11. Upvote
    AnnieRuru got a reaction from RagnarokOnline2015 in Max Atk   
    @RagnarokOnline2015 must be using RENEWAL
    in renewal, its base atk + weapon atk
    simply equip any weapon will do, like I'm using priest, equip a club
    "@refine 0 10", the refine will increase the value along with bonus bAtk or bonus bAtk2
    in renewal, equip fire-brand will increase the value there
    @Orca must be using pre-renewal
    yes, equip a fire-brand doesn't increase that value,
    to increase bAtk2, the only way is through refine "@refine 0 10" on your fire-brand, or using bonus bAtk2
     
    and I repeat again, THIS IS OFFICIAL <-- tested same thing happen in rathena as well(EDIT)
    this atk/matk stuffs has even confuse some developers
     
    EDIT: seems like I misunderstood the question,
    you want to increase the 65535, not to add to the bAtk2 bonus ...
  12. Upvote
    AnnieRuru got a reaction from banhelba2019 in How to Remove Base EXP | Base Drop (VIP)   
    run this script, and click on it
    prontera,155,185,4 script ksjdhfksdjfh 1_F_MARIA,{ ModExp = 100; ModDrop = 100; ModDeath = 100; // BankVault = 1000; // in-game bank variable, limit to INT signed end; } to reset everything back to normal
     
    additionally, its store in SQL table `account_data`
    select * from account_data; where your account bank balance store there as well
  13. Upvote
    AnnieRuru got a reaction from banhelba2019 in @mobalive   
    https://github.com/AnnieRuru/Release/blob/master/Guides/What is dynamic_mob and how it affects scripts.md.
    https://rathena.org/board/topic/102715-mvp-board/#comment-357487
    unfortunately, Hercules/rAthena has dynamic_mob option, which is not available on Aegis, official ragnarok emulator
    we can't just simply mobcount the MVP because the boss_monster are not loaded until someone warp into the map
    the TBL_MOB in the topic you link to, using iteration, is equivalent to getunits script command, also doesn't cache the boss_monster
    there is a tricky way to do this however, which, in my theory, whenever a script command boss_monster pops up, push a source variable,
    and again this source variable can be read by scripts, and thus provide us to check either that MVP is available or not
     
    this question also has been asked to me privately in discord, and currently in 1 of my todo list
  14. Upvote
    AnnieRuru got a reaction from banhelba2019 in Max Atk   
    @RagnarokOnline2015 must be using RENEWAL
    in renewal, its base atk + weapon atk
    simply equip any weapon will do, like I'm using priest, equip a club
    "@refine 0 10", the refine will increase the value along with bonus bAtk or bonus bAtk2
    in renewal, equip fire-brand will increase the value there
    @Orca must be using pre-renewal
    yes, equip a fire-brand doesn't increase that value,
    to increase bAtk2, the only way is through refine "@refine 0 10" on your fire-brand, or using bonus bAtk2
     
    and I repeat again, THIS IS OFFICIAL <-- tested same thing happen in rathena as well(EDIT)
    this atk/matk stuffs has even confuse some developers
     
    EDIT: seems like I misunderstood the question,
    you want to increase the 65535, not to add to the bAtk2 bonus ...
  15. Upvote
    AnnieRuru reacted to Ridley in [Collection] Official Full Clients + latest kRO   
    Changelog:
    - Updated all Clients
    - Updated twRO BGMS (3 new ones)
    NOTE: to disable the Snow effect in Prontera, open your grf and navigate to data/etcinfo.txt
    Then add (or edit) the following:
    weather# //prontera.rsw# //snow# Collection of official Full Clients. Those are vanilla, not modified in any way or whatever. They are patched up to date. Let me know if I've missed something.
    Server Name
    With BGM
    Without BGM
    BGM only
    South Korea (kRO)
    21. Dec. 2018
    2,70 GB
    Mega
    OneDrive
    2,42 GB
    Mega
    OneDrive
    294 MB
    Mega
    OneDrive
    South Korea (Ragnarok Zero)
    21. Dec. 2018
    2,22 GB
    Mega
    OneDrive
        Taiwan and Hongkong (twRO)
    21. Dec. 2018
    2,24 GB
    Mega
    OneDrive
    1,95 GB
    Mega
    OneDrive
    310 MB
    Mega
    OneDrive
    Japan (jRO)
    21. Dec. 2018
    2,23 GB
    Mega
    OneDrive
    1,93 GB
    Mega
    OneDrive
    311 MB
    Mega
    OneDrive
    Thailland (tRO)
    21. Dec. 2018
    1,67 GB
    Mega
    OneDrive
    1,41 GB
    Mega
    OneDrive
    272 MB
    Mega
    OneDrive
    International (iRO)
    21. Dec. 2018
    2,42 GB
    Mega
    OneDrive
    2,14 GB
    Mega
    OneDrive
    294 MB
    Mega
    OneDrive
    Philippines (pRO)
    21. Dec. 2018
    1,5 GB
    Mega
    OneDrive
    1,25 GB
    Mega
    OneDrive
    272 MB
    Mega
    OneDrive
    Indonesia (idRO)
    21. Dec. 2018
    1,88 GB
    Mega
    OneDrive
    1,61 GB
    Mega
    OneDrive
    282 MB
    Mega
    OneDrive
    Brazil (bRO)
    21. Dec. 2018
    1,95 GB
    Mega
    OneDrive
    1,69 GB
    Mega
    OneDrive
    273 MB
    Mega
    OneDrive
    France, Europe (fRO, euRO) 21. Dec. 2018
    1,85 GB
    Mega
    OneDrive
    1,59 GB
    Mega
    OneDrive
    273 MB
    Mega
    OneDrive
  16. Upvote
    AnnieRuru got a reaction from banhelba2019 in can i hide/show items in select list   
    https://rathena.org/board/topic/118341-conditions-for-labels-and-inside-menus/?do=findComment&comment=358053
    just if-else if-else if-else if-else on every statement
  17. Upvote
    AnnieRuru reacted to 4144 in client 20190220RE   
    because client exe almost latest, better get grf and other files from official kro or from any clean data/grf without custom modifications.
    also try less patches, may be it can exit normally.
     
     
     
    checked on bit outdated official data, client exit normally
    used minimal patches:
     
    9 Disable 1rag1 type parameters (Recommended) 13 Disable Ragexe Filename Check (Recommended) 35 Read Data Folder First 36 Read msgstringtable.txt (Recommended) 230 Always load Korea ExternalSettings lua file 231 Remove hardcoded address/port (Recommended) 232 Restore old login packet (Recommended) Also used hercules pr https://github.com/HerculesWS/Hercules/pull/2406
     
    alternative way try get client from here
    and update with rsu to latest version
  18. Upvote
    AnnieRuru reacted to Ridley in client 20190220RE   
    He put quite some rathena links in both, grf and msgstring. Nearly all links are leading to rA.
     
    I can provide you my grf. It works with the latest clients (I need to find some time to upload it).
  19. Upvote
    AnnieRuru got a reaction from fiction in H> unlock menu with certain requeriments   
    why not?
    prontera,155,185,5 script quest 1_F_MARIA,{ mes "quest giver"; next; for ( .@i = 0; .@i < 3; ++.@i ) .@menu$[.@i] = sprintf( _$( "%sQuest %d" ), F_MesColor((quest > .@i *2)? C_GRAY : C_BLACK), .@i +1 ); .@s = select( implode( .@menu$, ":" ) ) -1; .@state = .@s *2; if ( quest > .@state ) { mes "you have completed this quest"; close; } else if ( quest < .@state ) { mes "you can't take this quest yet."; close; } mesf "Go talk to npc %d", .@s +1; quest = .@state +1; close; } function script F_quest_state { .@npcid = getarg(0); .@state = (.@npcid -1) *2 +1; if ( quest == .@state ) { dispbottom sprintf( _$( "complete %d" ), .@npcid ); quest = .@state +1; } end; } prontera,150,180,5 script npc 1 1_F_MARIA,{ F_quest_state(1); } prontera,155,180,5 script npc 2 1_F_MARIA,{ F_quest_state(2); } prontera,160,180,5 script npc 3 1_F_MARIA,{ F_quest_state(3); } prontera,160,185,5 script reset 1_F_MARIA,{ quest = 0; }  
    and this is quest log with achievement system
    { Id: 49920 Name: "Quest 1" }, { Id: 49921 Name: "Quest 2" }, { Id: 49922 Name: "Quest 3" }, [49920] = { Title = "Quest 1", IconName = "ico_nq.bmp", Description = { "Talk to <NAVI>NPC 1<INFO>prontera,150,180,</INFO></NAVI>" }, Summary = "Talk to NPC 1", NpcSpr = "1_F_MARIA", NpcNavi = "prontera", NpcPosX = 150, NpcPosY = 180, }, [49921] = { Title = "Quest 2", IconName = "ico_nq.bmp", Description = { "Talk to <NAVI>NPC 2<INFO>prontera,155,180,</INFO></NAVI>" }, Summary = "Talk to NPC 2", NpcSpr = "1_F_MARIA", NpcNavi = "prontera", NpcPosX = 155, NpcPosY = 180, }, [49922] = { Title = "Quest 3", IconName = "ico_nq.bmp", Description = { "Talk to <NAVI>NPC 3<INFO>prontera,160,180,</INFO></NAVI>" }, Summary = "Talk to NPC 3", NpcSpr = "1_F_MARIA", NpcNavi = "prontera", NpcPosX = 160, NpcPosY = 180, } { Id: 109993 Name: "Custom Quest" Type: "ACH_QUEST" Objectives: { *1: { Description: "Complete Quest 1" } *2: { Description: "Complete Quest 2" } *3: { Description: "Complete Quest 3" } } Points: 0 }, [109993] = { UI_Type = 0, group = "CHATTING", major = 4, minor = 0, title = "Custom Quest", content = { summary = "Visit the Quest Giver", details = "Visit the Quest Giver." }, resource = { [1] = { text = "Complete Quest 1" }, [2] = { text = "Complete Quest 2" }, [3] = { text = "Complete Quest 3" } }, score = 0 }, prontera,155,185,5 script quest 1_F_MARIA,{ mes "quest giver"; next; for ( .@i = 0; .@i < 3; ++.@i ) .@menu$[.@i] = sprintf( _$( "%sQuest %d" ), F_MesColor((questprogress( 49920+ .@i ) == 2)? C_GRAY : C_BLACK), .@i +1 ); .@s = select( implode( .@menu$, ":" ) ) -1; .@qid = 49920+ .@s; if ( questprogress(.@qid) == 2 ) { mes "you have completed this quest"; close; } else if ( .@qid == 49920 ); // break; else if ( questprogress(.@qid -1) != 2 ) { mes "you can't take this quest yet."; close; } mesf "Go talk to npc %d", .@s +1; if ( questprogress(.@qid) == 0 ) setquest .@qid; close; } function script F_quest_state { .@npcid = getarg(0); .@qid = .@npcid -1 + 49920; if ( questprogress(.@qid) == 1 ) { completequest .@qid; dispbottom sprintf( _$( "complete %d" ), .@npcid ); achievement_progress 109993, .@npcid, 1, 1; } end; } prontera,150,180,5 script npc 1 1_F_MARIA,{ F_quest_state(1); } prontera,155,180,5 script npc 2 1_F_MARIA,{ F_quest_state(2); } prontera,160,180,5 script npc 3 1_F_MARIA,{ F_quest_state(3); } prontera,160,185,5 script reset 1_F_MARIA,{ for ( .@i = 49920; .@i <= 49922; ++.@i ) if ( questprogress(.@i) ) erasequest(.@i); end; }  
    have fun playing with it
    actually this is very simple script, just wanna play around a little bit
  20. Upvote
    AnnieRuru got a reaction from banhelba2019 in H> unlock menu with certain requeriments   
    why not?
    prontera,155,185,5 script quest 1_F_MARIA,{ mes "quest giver"; next; for ( .@i = 0; .@i < 3; ++.@i ) .@menu$[.@i] = sprintf( _$( "%sQuest %d" ), F_MesColor((quest > .@i *2)? C_GRAY : C_BLACK), .@i +1 ); .@s = select( implode( .@menu$, ":" ) ) -1; .@state = .@s *2; if ( quest > .@state ) { mes "you have completed this quest"; close; } else if ( quest < .@state ) { mes "you can't take this quest yet."; close; } mesf "Go talk to npc %d", .@s +1; quest = .@state +1; close; } function script F_quest_state { .@npcid = getarg(0); .@state = (.@npcid -1) *2 +1; if ( quest == .@state ) { dispbottom sprintf( _$( "complete %d" ), .@npcid ); quest = .@state +1; } end; } prontera,150,180,5 script npc 1 1_F_MARIA,{ F_quest_state(1); } prontera,155,180,5 script npc 2 1_F_MARIA,{ F_quest_state(2); } prontera,160,180,5 script npc 3 1_F_MARIA,{ F_quest_state(3); } prontera,160,185,5 script reset 1_F_MARIA,{ quest = 0; }  
    and this is quest log with achievement system
    { Id: 49920 Name: "Quest 1" }, { Id: 49921 Name: "Quest 2" }, { Id: 49922 Name: "Quest 3" }, [49920] = { Title = "Quest 1", IconName = "ico_nq.bmp", Description = { "Talk to <NAVI>NPC 1<INFO>prontera,150,180,</INFO></NAVI>" }, Summary = "Talk to NPC 1", NpcSpr = "1_F_MARIA", NpcNavi = "prontera", NpcPosX = 150, NpcPosY = 180, }, [49921] = { Title = "Quest 2", IconName = "ico_nq.bmp", Description = { "Talk to <NAVI>NPC 2<INFO>prontera,155,180,</INFO></NAVI>" }, Summary = "Talk to NPC 2", NpcSpr = "1_F_MARIA", NpcNavi = "prontera", NpcPosX = 155, NpcPosY = 180, }, [49922] = { Title = "Quest 3", IconName = "ico_nq.bmp", Description = { "Talk to <NAVI>NPC 3<INFO>prontera,160,180,</INFO></NAVI>" }, Summary = "Talk to NPC 3", NpcSpr = "1_F_MARIA", NpcNavi = "prontera", NpcPosX = 160, NpcPosY = 180, } { Id: 109993 Name: "Custom Quest" Type: "ACH_QUEST" Objectives: { *1: { Description: "Complete Quest 1" } *2: { Description: "Complete Quest 2" } *3: { Description: "Complete Quest 3" } } Points: 0 }, [109993] = { UI_Type = 0, group = "CHATTING", major = 4, minor = 0, title = "Custom Quest", content = { summary = "Visit the Quest Giver", details = "Visit the Quest Giver." }, resource = { [1] = { text = "Complete Quest 1" }, [2] = { text = "Complete Quest 2" }, [3] = { text = "Complete Quest 3" } }, score = 0 }, prontera,155,185,5 script quest 1_F_MARIA,{ mes "quest giver"; next; for ( .@i = 0; .@i < 3; ++.@i ) .@menu$[.@i] = sprintf( _$( "%sQuest %d" ), F_MesColor((questprogress( 49920+ .@i ) == 2)? C_GRAY : C_BLACK), .@i +1 ); .@s = select( implode( .@menu$, ":" ) ) -1; .@qid = 49920+ .@s; if ( questprogress(.@qid) == 2 ) { mes "you have completed this quest"; close; } else if ( .@qid == 49920 ); // break; else if ( questprogress(.@qid -1) != 2 ) { mes "you can't take this quest yet."; close; } mesf "Go talk to npc %d", .@s +1; if ( questprogress(.@qid) == 0 ) setquest .@qid; close; } function script F_quest_state { .@npcid = getarg(0); .@qid = .@npcid -1 + 49920; if ( questprogress(.@qid) == 1 ) { completequest .@qid; dispbottom sprintf( _$( "complete %d" ), .@npcid ); achievement_progress 109993, .@npcid, 1, 1; } end; } prontera,150,180,5 script npc 1 1_F_MARIA,{ F_quest_state(1); } prontera,155,180,5 script npc 2 1_F_MARIA,{ F_quest_state(2); } prontera,160,180,5 script npc 3 1_F_MARIA,{ F_quest_state(3); } prontera,160,185,5 script reset 1_F_MARIA,{ for ( .@i = 49920; .@i <= 49922; ++.@i ) if ( questprogress(.@i) ) erasequest(.@i); end; }  
    have fun playing with it
    actually this is very simple script, just wanna play around a little bit
  21. Upvote
    AnnieRuru got a reaction from banhelba2019 in Guild Skill Notification   
    https://github.com/AnnieRuru/Release/blob/master/plugins/guild_skill_notification.c

  22. Upvote
    AnnieRuru got a reaction from Kuroe in Guild Skill Notification   
    https://github.com/AnnieRuru/Release/blob/master/plugins/guild_skill_notification.c

  23. Upvote
    AnnieRuru got a reaction from skyundersea in [Request] Custom Item Script   
    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 ); }  
  24. Upvote
    AnnieRuru reacted to vBrenth in Chat space limitation!/Scammer avoid *Will pay for help*   
    This is good, thanks to this.
  25. Upvote
    AnnieRuru got a reaction from vBrenth in Guild Skill Notification   
    static void guild_block_skill(struct map_session_data *sd, int time) { uint16 skill_id[] = { GD_BATTLEORDER, GD_REGENERATION, GD_RESTORE, GD_EMERGENCYCALL }; int i; for (i = 0; i < 4; i++) skill->blockpc_start(sd, skill_id[i], time); } hercules uses skill->blockpc_start and skill->blockpc_end to just set sd->blockskill[skill_id] = true:false;
    so you can just hook to skill->blockpc_end to display the message for the guild master
    to display the time left in min:sec, when guild master use the skill, run DIFF_TICK function
     
    oh wait this is request section ....
×
×
  • Create New...

Important Information

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