dubstep Posted November 20, 2016 Group: Members Topic Count: 16 Topics Per Day: 0.00 Content Count: 35 Reputation: 2 Joined: 07/25/15 Last Seen: October 8, 2021 Share Posted November 20, 2016 Hi guys can u help me with a item script of this item. I want to make it auto resu within 5 secs when killed by mvp's Quote Link to comment Share on other sites More sharing options...
0 Emistry Posted November 21, 2016 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2369 Joined: 10/28/11 Last Seen: 18 hours ago Share Posted November 21, 2016 - script auto_ress_mvp -1,{ OnInit: .itemid = 512; end; OnPCDieEvent: if ( killerrid != getcharid(3) && getmonsterinfo( killerrid, MOB_MVPEXP ) ) { sleep2 5000; if ( countitem( .itemid ) ) { delitem .itemid,1; atcommand "@alive"; } } end; } you can try this 1 Quote Link to comment Share on other sites More sharing options...
1 AnnieRuru Posted April 10, 2018 Group: Members Topic Count: 18 Topics Per Day: 0.00 Content Count: 2044 Reputation: 682 Joined: 10/09/12 Last Seen: December 20, 2020 Share Posted April 10, 2018 use *getunittype in this case - script jksdfkjsf FAKE_NPC,{ OnPCDieEvent: if ( getunittype( killerrid ) != UNITTYPE_MOB ) end; if ( !getmonsterinfo( killerrid, MOB_MVPEXP ) ) end; sleep2 5000; // if ( !playerattached() ) end; // it seems only hercules will throw this error, rathena hasn't fix this yet if ( countitem(512) ) { delitem 512,1; atcommand "@alive"; } end; } well ... this is old topic so I guess ... this script command wasn't exist back then 1 1 Quote Link to comment Share on other sites More sharing options...
0 dubstep Posted November 21, 2016 Group: Members Topic Count: 16 Topics Per Day: 0.00 Content Count: 35 Reputation: 2 Joined: 07/25/15 Last Seen: October 8, 2021 Author Share Posted November 21, 2016 Thanks emistry. How can i apply that? What command to use? And do i have to make a new notepad and copy paste that script then put it into custom npc? Quote Link to comment Share on other sites More sharing options...
0 Emistry Posted November 22, 2016 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2369 Joined: 10/28/11 Last Seen: 18 hours ago Share Posted November 22, 2016 5 hours ago, dubstep said: How can i apply that? Add to your npc folder... and load it 5 hours ago, dubstep said: What command to use? None of this "command" thing are mentioned in your first post ... .so no command required ... you just need whatever you have mentioned previously... items... Quote Link to comment Share on other sites More sharing options...
0 Rebel Posted April 9, 2018 Group: Members Topic Count: 68 Topics Per Day: 0.01 Content Count: 436 Reputation: 32 Joined: 02/19/12 Last Seen: May 22, 2024 Share Posted April 9, 2018 If killed by player: [Error]: buildin_getmonsterinfo: Wrong Monster ID: 2000000 [Debug]: Source (NPC): auto_ress_mvp (invisible/not on a map) If killed by monster: [Error]: buildin_getmonsterinfo: Wrong Monster ID: 110009749 [Debug]: Source (NPC): auto_ress_mvp (invisible/not on a map) But the player is resurrected after 5 seconds when apple is on inventory. (512 = Apple) Quote Link to comment Share on other sites More sharing options...
0 Capuche Posted April 10, 2018 Group: Developer Topic Count: 10 Topics Per Day: 0.00 Content Count: 2407 Reputation: 616 Joined: 07/05/12 Last Seen: March 20 Share Posted April 10, 2018 Since https://github.com/rathena/rathena/commit/a8e4c83ef10dc4ccde1bd6e6f40b296d590d9b80 the script ends if there is no unit attached for sleep2 - no need to check if the player is attached. Quote Link to comment Share on other sites More sharing options...
0 AnnieRuru Posted April 11, 2018 Group: Members Topic Count: 18 Topics Per Day: 0.00 Content Count: 2044 Reputation: 682 Joined: 10/09/12 Last Seen: December 20, 2020 Share Posted April 11, 2018 (edited) 9 hours ago, Capuche said: Since https://github.com/rathena/rathena/commit/a8e4c83ef10dc4ccde1bd6e6f40b296d590d9b80 the script ends if there is no unit attached for sleep2 - no need to check if the player is attached. what I'm talking is this ... prontera,155,190,5 script ksdfjsh 1_F_MARIA,{ detachrid; // try removing this line attachrid 2000001; sleep2 5000; announce playerattached() +"", 0; debugmes playerattached() +""; end; } if I put detachrid; ... yup it throws no unit attached error but if I comment that line ... click on the npc and immediately Alt+F4, there's no error what-so-ever and the debugmes doesn't run Edited April 11, 2018 by AnnieRuru Quote Link to comment Share on other sites More sharing options...
Question
dubstep
Hi guys can u help me with a item script of this item. I want to make it auto resu within 5 secs when killed by mvp's
Link 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.