Jump to content
  • 0
DanTheMan

donpcevent with passing rid

Question

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

  • 0

NPC 1:

set .char_id,getcharid(0);
donpcevent "NPC2:Event";
end;

Continue:
set [email protected]_rid,getvariableofnpc(.char_id,NPC2);
attachrid([email protected]_rid);
[...] code [...]

-/-/-/-/-/-

NPC2:

Event:
set [email protected]_rid,getvariableofnpc(.char_id,NPC1);
attachrid([email protected]_rid);
[...] code [...]
set .char_id,getcharid(0);
donpcevent "NPC1:Continue";

  • Like 1
Link to comment
Share on other sites

  • 0

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 [email protected]_rid,getvariableofnpc(.char_id,"instance_command");
	attachrid([email protected]_rid);
	
	disable_items;

 

Link to comment
Share on other sites

  • 0

Sorry, my bad...

change getcharid(0) to getcharid(3)

 

Edited by Start
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...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.