Jump to content

Question

7 answers to this question

Recommended Posts

  • 0
Posted

Use announce with the SELF target.
It will appears as a global message but only for the player that triggered it.

  • 0
Posted

I'm using, which I really wanted to appear just on the screen, not in chat

harboro1,215,212,1    script    #RR04    111,5,5,{
    end;

OnTouch:
    npctalk "West: The inn, East: The Sheriff's Office", "", bc_self;
    end;
}

  • 0
Posted

You're looking for showscript:

harboro1,215,212,3	script	#rockno04	111,5,5,{
	end;
OnTouch:
	showscript "West: The Inn, East: The Sheriff's Office", getnpcid(0, "#rockno04"), SELF, getcharid(3);
	end;
}

If you want others to see it as well, then you'd use:

harboro1,215,212,3	script	#rockno04	111,5,5,{
	end;
OnTouch:
	showscript "West: The Inn, East: The Sheriff's Office", getnpcid(0, "#rockno04");
	end;
}

 

  • Upvote 2
  • Love 1
  • 0
Posted
[Warning]: script: showscript: self can't be used for non-players objects.
[Debug]: Source (NPC): #rockno04 at prontera (155,185)

should be

prontera,155,185,3	script	#rockno04	111,5,5,{
	end;
OnTouch:
	showscript "West: The Inn, East: The Sheriff's Office", getcharid(3), SELF;
	end;
}

 

  • Upvote 1
  • 0
Posted (edited)
41 minutes ago, AnnieRuru said:

[Warning]: script: showscript: self can't be used for non-players objects.
[Debug]: Source (NPC): #rockno04 at prontera (155,185)

should be


prontera,155,185,3	script	#rockno04	111,5,5,{
	end;
OnTouch:
	showscript "West: The Inn, East: The Sheriff's Office", getcharid(3), SELF;
	end;
}

 

Hmmm, that script won't work though, it will be shown on the character instead of the NPC. It looks like I modified the script command to work with any input and I've added an extra parameter for the player_gid. My bad!

So... it doesn't seem possible to achieve the original goal without modifying your function in the source...! The closest you'll get to is the latest option:

harboro1,215,212,3	script	#rockno04	111,5,5,{
	end;
OnTouch:
	showscript "West: The Inn, East: The Sheriff's Office", getnpcid(0);
	end;
}

It's visible by other players, but it's not a huge deal for what you're trying to do.

Edited by Tokei
  • Upvote 1

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...