Jump to content
  • 0

NPC training bugged


Yukaiii

Question


  • Group:  Members
  • Topic Count:  48
  • Topics Per Day:  0.01
  • Content Count:  110
  • Reputation:   9
  • Joined:  11/20/13
  • Last Seen:  

Good morning everyone!
Guys, I'm having a problem with my NPC testing damage...
it disappears out of nowhere and only returns when reloading the script.
Everything was fine but after extracting a graph it looks like this...
Does anyone know what can it be?

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  48
  • Topics Per Day:  0.01
  • Content Count:  110
  • Reputation:   9
  • Joined:  11/20/13
  • Last Seen:  

On 10/30/2023 at 1:29 AM, Unique Scripter said:

Please show your code.

 

Quote

//===== rAthena Script =============================================
//= Punching Bag NPC
//===== By: ========================================================
//= Secretdataz
//===== Current Version: ===========================================
//= 0.2
//===== Changelog: =================================================
//= 0.1 Initial commit
//= 0.2 Add MD_KNOCKBACK_IMMUNE
//===== Compatible With: ===========================================
//= rAthena Project
//===== Additional Comments: =======================================
//= When duplicating this NPC. Only use NUMBER after the # [secret]
//==================================================================
prontera,166,140,0    script    PunchingBag#0    844,{
    end;
    
OnMyMobDead:
OnInit:
    getunitdata(getnpcid(0), .@d);
    monster strnpcinfo(4),.@d[UNPC_X],.@d[UNPC_Y],"Boneco de Treino",1905,1,strnpcinfo(0)+"::OnMyMobDead";
    .@dupid = atoi(strnpcinfo(2));
    .gid[.@dupid] = $@mobid[0];
    .mhp[.@dupid] = strmobinfo(4,1905);
    setunitdata .gid[.@dupid],UMOB_MODE,.@d[UMOB_MODE]|0x4000000|0x0200000; // Set MD_STATUS_IMMUNE (0x4000000) because EDP/burn/%MHP based status can skew the DPS counter so much.
    initnpctimer;
    end;
    
OnTimer5000:
    .@dupid = atoi(strnpcinfo(2));
    if(unitexists(.gid[.@dupid])){
        getunitdata(.gid[.@dupid],.@d);
        .@diff = (.mhp[.@dupid] - .@d[UMOB_HP]);
        if(.@diff > 0){
            npctalk "Punching Bag : I've taken " + (.@diff/5) + " DPS in last 5 seconds.";
            setunitdata .gid[.@dupid],UMOB_HP,.mhp[.@dupid];
            specialeffect EF_HEAL;
        }
    }
    initnpctimer;
}

prontera,170,140,0    duplicate(PunchingBag#0)    PunchingBag#1    844
prontera,174,140,0    duplicate(PunchingBag#0)    PunchingBag#2    844
prontera,178,140,0    duplicate(PunchingBag#0)    PunchingBag#3    844
prontera,182,140,0    duplicate(PunchingBag#0)    PunchingBag#4    844
prontera,186,140,0    duplicate(PunchingBag#0)    PunchingBag#5    844

 

Edited by Yukaiii
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  232
  • Reputation:   86
  • Joined:  06/30/18
  • Last Seen:  

2 hours ago, Yukaiii said:

 

 

I tested this on an unmodified current rAthena and can't reproduce the bug.
Do you have a more detailed explanation of the steps to reproduce it?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...