Kuroyama 6 Posted October 20, 2020 - script Punching Bag -1,{ OnInit: OnDummyKill: monster "prontera",118,153,"Punching Bag",1905,1,"Punching Bag::OnDummyKill"; end; } I got this one but it's not spawning after getting killed. And when you constantly kill this punching bag, it'll not respawn sooner. What I want is a permanent punching bag that always spawned after killed. Anyone mind to help with this? Quote Share this post Link to post Share on other sites
0 AnnieRuru 957 Posted October 20, 2020 no idea why that script doesn't work, it works fine in my test server but if you want a punching bag that can never be kill, then use setunitdata and make it crazy high hp - script Punching Bag FAKE_NPC,{ OnInit: .mobid = monster("prontera",158,183, "Punching Bag", BARRICADE, 1, "Punching Bag::OnInit"); setunitdata .mobid, UDT_MAXHP, 2000000000; OnTimer10000: setunitdata .mobid, UDT_HP, 2000000000; initnpctimer; end; } 1 evilpuncker reacted to this Quote Share this post Link to post Share on other sites
0 fiction 14 Posted October 21, 2020 i think this one is more complete, https://rathena.org/board/files/file/3445-punching-bag-with-dps-counter/ need to be convert to herc Quote Share this post Link to post Share on other sites
0 Kuroyama 6 Posted November 18, 2020 On 10/21/2020 at 4:40 AM, AnnieRuru said: no idea why that script doesn't work, it works fine in my test server but if you want a punching bag that can never be kill, then use setunitdata and make it crazy high hp - script Punching Bag FAKE_NPC,{ OnInit: .mobid = monster("prontera",158,183, "Punching Bag", BARRICADE, 1, "Punching Bag::OnInit"); setunitdata .mobid, UDT_MAXHP, 2000000000; OnTimer10000: setunitdata .mobid, UDT_HP, 2000000000; initnpctimer; end; } - script Punching Bag FAKE_NPC,{ OnInit: .mobid = monster("prontera",158,183, "Punching Bag", BARRICADE, 1, "Punching Bag::OnInit"); setunitdata .mobid, UDT_MAXHP, 2000000000; OnTimer10000: setunitdata .mobid, UDT_HP, 2000000000; initnpctimer; end; } Quote Share this post Link to post Share on other sites
0 fiction 14 Posted November 18, 2020 uhm weird, did you kill the mob for some reason?, the warning that you have is telling you that the previous object was lost. Quote Share this post Link to post Share on other sites
0 AnnieRuru 957 Posted November 20, 2020 must be caused by `@killmonster` or something like that just tested `@killmonster` or `@killmonster2` will trigger the monster label, so ... shouldn't happen this way script `*killmonster` or `*killmonsterall` ?? then there's the problem ..... - script Punching Bag FAKE_NPC,{ OnInit: .mobid = monster("prontera",158,183, "Punching Bag", BARRICADE, 1, "Punching Bag::OnInit"); setunitdata .mobid, UDT_MAXHP, 2000000000; OnTimer10000: if (getunittype(.mobid) == -1) end; setunitdata .mobid, UDT_HP, 2000000000; initnpctimer; end; } I thought the *unitexists script command is useless so I never made a pull request for it but in this case ... we really need a console warning to tell that barricade is gone so .... I also wonder how this barricade can go missing in the first place Quote Share this post Link to post Share on other sites
0 Kuroyama 6 Posted December 1, 2020 On 11/20/2020 at 11:05 AM, AnnieRuru said: must be caused by `@killmonster` or something like that just tested `@killmonster` or `@killmonster2` will trigger the monster label, so ... shouldn't happen this way script `*killmonster` or `*killmonsterall` ?? then there's the problem ..... - script Punching Bag FAKE_NPC,{ OnInit: .mobid = monster("prontera",158,183, "Punching Bag", BARRICADE, 1, "Punching Bag::OnInit"); setunitdata .mobid, UDT_MAXHP, 2000000000; OnTimer10000: if (getunittype(.mobid) == -1) end; setunitdata .mobid, UDT_HP, 2000000000; initnpctimer; end; } - script Punching Bag FAKE_NPC,{ OnInit: .mobid = monster("prontera",158,183, "Punching Bag", BARRICADE, 1, "Punching Bag::OnInit"); setunitdata .mobid, UDT_MAXHP, 2000000000; OnTimer10000: if (getunittype(.mobid) == -1) end; setunitdata .mobid, UDT_HP, 2000000000; initnpctimer; end; } I thought the *unitexists script command is useless so I never made a pull request for it but in this case ... we really need a console warning to tell that barricade is gone so .... I also wonder how this barricade can go missing in the first place Is this a warm warning ms. @AnnieRuru? Quote Share this post Link to post Share on other sites
0 Daraen 8 Posted December 1, 2020 On 10/21/2020 at 2:55 AM, fiction said: i think this one is more complete, https://rathena.org/board/files/file/3445-punching-bag-with-dps-counter/ need to be convert to herc Spoiler //===== 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,224,79,0 script PunchingBag#0 HIDDEN_NPC,{ end; OnMyMobDead: OnInit: killmonster("prontera",strnpcinfo(NPC_NAME)+"::OnMyMobDead"); getmapxy(.map$,.mapx,.mapy,UNITTYPE_NPC,strnpcinfo(NPC_NAME)); .mobid = monster(strnpcinfo(NPC_MAP),.mapx,.mapy,"Punching Bag",1905,1,strnpcinfo(NPC_NAME)+"::OnMyMobDead"); .@dupid = atoi(strnpcinfo(NPC_NAME_HIDDEN)); .gid[.@dupid] = .mobid; setunitdata(.gid[.@dupid],UDT_MODE,UDT_MODE|0x00020|0x08000); // Set MD_STATUS_IMMUNE (0x4000000) because EDP/burn/%MHP based status can skew the DPS counter so much. setunitdata(.gid[.@dupid],UDT_MAXHP,99999999); setunitdata(.gid[.@dupid],UDT_HP,99999999); .mhp[.@dupid] = getunitdata(.gid[.@dupid],UDT_MAXHP); initnpctimer(); end; OnTimer5000: .@dupid = atoi(strnpcinfo(NPC_NAME_HIDDEN)); if(getunittype(.gid[.@dupid]) == 3){ .@mhp = getunitdata(.gid[.@dupid],UDT_HP); .@diff = (.mhp[.@dupid] - .@mhp); if(.@diff > 0){ npctalk "J'ai pris " + (.@diff/5) + " de DPS en 5 secondes."; setunitdata(.gid[.@dupid],UDT_HP,.mhp[.@dupid]); specialeffect EF_HEAL; } } initnpctimer; end; } prontera,216,79,0 duplicate(PunchingBag#0) PunchingBag#1 HIDDEN_NPC prontera,224,70,0 duplicate(PunchingBag#0) PunchingBag#2 HIDDEN_NPC prontera,216,58,0 duplicate(PunchingBag#0) PunchingBag#3 HIDDEN_NPC prontera,224,58,0 duplicate(PunchingBag#0) PunchingBag#4 HIDDEN_NPC prontera,216,46,0 duplicate(PunchingBag#0) PunchingBag#5 HIDDEN_NPC prontera,224,46,0 duplicate(PunchingBag#0) PunchingBag#6 HIDDEN_NPC prontera,252,80,0 duplicate(PunchingBag#0) PunchingBag#7 HIDDEN_NPC prontera,260,80,0 duplicate(PunchingBag#0) PunchingBag#8 HIDDEN_NPC prontera,252,70,0 duplicate(PunchingBag#0) PunchingBag#9 HIDDEN_NPC prontera,260,70,0 duplicate(PunchingBag#0) PunchingBag#10 HIDDEN_NPC prontera,252,58,0 duplicate(PunchingBag#0) PunchingBag#11 HIDDEN_NPC prontera,260,58,0 duplicate(PunchingBag#0) PunchingBag#12 HIDDEN_NPC prontera,252,46,0 duplicate(PunchingBag#0) PunchingBag#13 HIDDEN_NPC prontera,260,46,0 duplicate(PunchingBag#0) PunchingBag#14 HIDDEN_NPC Doing it like this, they work perfectly. 1 1 xJhay and Kuroyama reacted to this Quote Share this post Link to post Share on other sites
- script Punching Bag -1,{ OnInit: OnDummyKill: monster "prontera",118,153,"Punching Bag",1905,1,"Punching Bag::OnDummyKill"; end; }
I got this one but it's not spawning after getting killed. And when you constantly kill this punching bag, it'll not respawn sooner.
What I want is a permanent punching bag that always spawned after killed.
Anyone mind to help with this?
Share this post
Link to post
Share on other sites