Jump to content
  • 0

command to show book interface


Nullifier

Question


  • Group:  Members
  • Topic Count:  45
  • Topics Per Day:  0.01
  • Content Count:  140
  • Reputation:   11
  • Joined:  09/28/14
  • Last Seen:  

is there a way to make the book interface pop out whenever a command is typed, example @serverinfo, this will pop out the server info interface like the one below.

 

image.png.c8a1da9991be0daa41df51a6945df655.png

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  232
  • Reputation:   86
  • Joined:  06/30/18
  • Last Seen:  

You could combine bindatcmd and readbook.

*bindatcmd "<command>","<NPC object name>::<event label>"{,<atcommand level>,<charcommand level>};

This command will bind a NPC event label to an atcommand. Upon execution of the
atcommand, the user will invoke the NPC event label. Each atcommand is only allowed
one binding. If you rebind, it will override the original binding.
Note: The default level for atcommand is 0 while the default level for charcommand is 100.

The following variables are set upon execution:
	.@atcmd_command$       =  The name of the @command used.
	.@atcmd_parameters$[]  =  Array containing the given parameters, starting from an index of 0.
	.@atcmd_numparameters  =  The number of parameters defined.

Example:
	When a user types the command "@test", an angel effect will be shown.

	-	script	atcmd_example	-1,{
	OnInit:
		bindatcmd "test",strnpcinfo(3) + "::OnAtcommand";
		end;
	OnAtcommand:
		specialeffect2 EF_ANGEL2;
		end;
	}
*readbook <book id>,<page>;

This command will open a book item at the specified page.

 

Edited by Winterfox
  • MVP 1
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...