DanTheMan Posted March 2, 2020 Group: Members Topic Count: 5 Topics Per Day: 0.00 Content Count: 13 Reputation: 0 Joined: 01/28/20 Last Seen: March 6, 2020 Share Posted March 2, 2020 Hi! Is it possible to execute "donpcevent" with passing the RID of the attached player? Basically executing another script while passing the RID and ending the initial script. Greetings, Dan Quote Link to comment Share on other sites More sharing options...
0 n0tttt Posted March 2, 2020 Group: Members Topic Count: 4 Topics Per Day: 0.00 Content Count: 303 Reputation: 118 Joined: 12/10/16 Last Seen: Friday at 02:39 AM Share Posted March 2, 2020 Either integrate the part onto the script or use close2 + doevent. Quote Link to comment Share on other sites More sharing options...
0 Start Posted March 2, 2020 Group: Members Topic Count: 0 Topics Per Day: 0 Content Count: 9 Reputation: 2 Joined: 01/26/13 Last Seen: August 7, 2024 Share Posted March 2, 2020 NPC 1: set .char_id,getcharid(0); donpcevent "NPC2:Event"; end; Continue: set .@char_rid,getvariableofnpc(.char_id,NPC2); attachrid(.@char_rid); [...] code [...] -/-/-/-/-/- NPC2: Event: set .@char_rid,getvariableofnpc(.char_id,NPC1); attachrid(.@char_rid); [...] code [...] set .char_id,getcharid(0); donpcevent "NPC1:Continue"; 1 Quote Link to comment Share on other sites More sharing options...
0 DanTheMan Posted March 2, 2020 Group: Members Topic Count: 5 Topics Per Day: 0.00 Content Count: 13 Reputation: 0 Joined: 01/28/20 Last Seen: March 6, 2020 Author Share Posted March 2, 2020 Thanks for the suggestion! It doesn't seem to work tho. Map server says: [Error]: buildin_disableitemuse: fatal error ! player not attached! [Debug]: Function: disable_items (no parameters) [Debug]: Source (NPC): Taho at ma_scene01 (174,179) That's what I wrote in the initial script: set .char_id,getcharid(0); donpcevent "Taho::OnAtCommand"; end; And that's what I wrote in the script to be executed: OnAtCommand: set .@char_rid,getvariableofnpc(.char_id,"instance_command"); attachrid(.@char_rid); disable_items; Quote Link to comment Share on other sites More sharing options...
0 Start Posted March 2, 2020 Group: Members Topic Count: 0 Topics Per Day: 0 Content Count: 9 Reputation: 2 Joined: 01/26/13 Last Seen: August 7, 2024 Share Posted March 2, 2020 (edited) Sorry, my bad... change getcharid(0) to getcharid(3) Edited March 2, 2020 by Start Quote Link to comment Share on other sites More sharing options...
0 DanTheMan Posted March 2, 2020 Group: Members Topic Count: 5 Topics Per Day: 0.00 Content Count: 13 Reputation: 0 Joined: 01/28/20 Last Seen: March 6, 2020 Author Share Posted March 2, 2020 Works now although the server just crashed, hehe. Doesn't have anything to do with that part tho. Thanks a lot! Quote Link to comment Share on other sites More sharing options...
0 Start Posted March 2, 2020 Group: Members Topic Count: 0 Topics Per Day: 0 Content Count: 9 Reputation: 2 Joined: 01/26/13 Last Seen: August 7, 2024 Share Posted March 2, 2020 kkkkkkkk Quote Link to comment Share on other sites More sharing options...
Question
DanTheMan
Hi!
Is it possible to execute "donpcevent" with passing the RID of the attached player? Basically executing another script while passing the RID and ending the initial script.
Greetings,
Dan
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.