Jump to content
  • 0

donpcevent with passing rid


Question

Posted

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 

6 answers to this question

Recommended Posts

  • 0
Posted

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";

  • Like 1
  • 0
Posted

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;

 

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...