Giant Whisper Posted November 25, 2018 Group: Members Topic Count: 55 Topics Per Day: 0.01 Content Count: 190 Reputation: 3 Joined: 04/11/12 Last Seen: March 24 Share Posted November 25, 2018 when killing a mob you can make it appear an npc where this mob is dead, I would like that by killing the mob the npc appears where dead this is a summary of what has been achieved monster "1@pop1",50,53,"Guardian Chest",3733,1,"Erza::OnErzaDead"; warp "1@pop1",49,50; set hecho, 1; end; OnErzaDead: enablenpc "Chest Novice"; sleep 500000; disablenpc "Chest Novice"; end; 1@pop1,51,51,4 script Chest Novice 10005,{ Quote Link to comment Share on other sites More sharing options...
0 n0tttt Posted November 25, 2018 Group: Members Topic Count: 4 Topics Per Day: 0.00 Content Count: 303 Reputation: 118 Joined: 12/10/16 Last Seen: Saturday at 05:58 AM Share Posted November 25, 2018 (edited) Could you test this? monster "1@pop1",50,53,"Guardian Chest",3733,1,"Erza::OnErzaDead"; warp "1@pop1",49,50; set hecho, 1; end; OnErzaDead: set .@id,killedgid; getunitdata .@id,.@data; set .@x,.@data[UMOB_X]; set .@y,.@data[UMOB_Y]; enablenpc "Chest Novice"; unitwarp getnpcid(0,"Chest Novice"),"1@pop1",.@x,.@y; sleep 500000; disablenpc "Chest Novice"; end; Edited November 25, 2018 by n0tttt Quote Link to comment Share on other sites More sharing options...
0 Giant Whisper Posted November 25, 2018 Group: Members Topic Count: 55 Topics Per Day: 0.01 Content Count: 190 Reputation: 3 Joined: 04/11/12 Last Seen: March 24 Author Share Posted November 25, 2018 this error comes out in the console, npc_enable: Attempted to hide a non-existing NPC Chest Novice (flag=0) this is the npc is in the same script 1@pop1,51,51,4 script Chest Novice 10005,{ rentitem 1599,1012000; rentitem 2199,1012000; disablenpc strnpcinfo(0); warp "prontera",58,59; end; } Quote Link to comment Share on other sites More sharing options...
0 n0tttt Posted November 25, 2018 Group: Members Topic Count: 4 Topics Per Day: 0.00 Content Count: 303 Reputation: 118 Joined: 12/10/16 Last Seen: Saturday at 05:58 AM Share Posted November 25, 2018 It's because disablenpc gets executed twice. This should fix it: monster "1@pop1",50,53,"Guardian Chest",3733,1,"Erza::OnErzaDead"; warp "1@pop1",49,50; set hecho, 1; end; OnErzaDead: set .@id,killedgid; getunitdata .@id,.@data; set .@x,.@data[UMOB_X]; set .@y,.@data[UMOB_Y]; enablenpc "Chest Novice"; unitwarp getnpcid(0,"Chest Novice"),"1@pop1",.@x,.@y; sleep 500000; if(getmapxy(.@m$,.@x,.@y,UNITTYPE_NPC,"Chest Novice") != 0) disablenpc "Chest Novice"; end; 1@pop1,51,51,4 script Chest Novice 10005,{ rentitem 1599,1012000; rentitem 2199,1012000; disablenpc strnpcinfo(0); awake "Erza"; warp "prontera",58,59; end; } Quote Link to comment Share on other sites More sharing options...
0 Giant Whisper Posted November 25, 2018 Group: Members Topic Count: 55 Topics Per Day: 0.01 Content Count: 190 Reputation: 3 Joined: 04/11/12 Last Seen: March 24 Author Share Posted November 25, 2018 when killing the mob the npc still does not appear where the mob has died warning: buildin_getunitdata: invalid object type debug: source (NPC): Erza at protenra (151,190) Quote Link to comment Share on other sites More sharing options...
0 n0tttt Posted November 25, 2018 Group: Members Topic Count: 4 Topics Per Day: 0.00 Content Count: 303 Reputation: 118 Joined: 12/10/16 Last Seen: Saturday at 05:58 AM Share Posted November 25, 2018 Do you have rAthena updated at least to this commit? https://github.com/rathena/rathena/commit/c856b07c45aed6c5842ee19a940f7e76f780221c How did you kill the monster? By command or manually? Quote Link to comment Share on other sites More sharing options...
0 Giant Whisper Posted November 25, 2018 Group: Members Topic Count: 55 Topics Per Day: 0.01 Content Count: 190 Reputation: 3 Joined: 04/11/12 Last Seen: March 24 Author Share Posted November 25, 2018 thank you very much n0tttt excuse me could you help me in this script Quote Link to comment Share on other sites More sharing options...
Question
Giant Whisper
when killing a mob you can make it appear an npc where this mob is dead, I would like that by killing the mob the npc appears where dead
this is a summary of what has been achieved
monster "1@pop1",50,53,"Guardian Chest",3733,1,"Erza::OnErzaDead";
warp "1@pop1",49,50;
set hecho, 1;
end;
OnErzaDead:
enablenpc "Chest Novice";
sleep 500000;
disablenpc "Chest Novice";
end;
1@pop1,51,51,4 script Chest Novice 10005,{
Link to comment
Share on other sites
6 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.