Jump to content
  • 0

Cancel Script?


LatSo

Question


  • Group:  Members
  • Topic Count:  69
  • Topics Per Day:  0.02
  • Content Count:  296
  • Reputation:   2
  • Joined:  04/11/13
  • Last Seen:  

Sorry for the bad topic title.

 

anyways, what script is that when a player clicks cancel button then this script will execute?

I mean for example, if you will input a menu in the npc there will always be a cancel button. My request is that, if a player clicks that button this script will execute.

 

I hope this explains my request.

 

thank you!

Link to comment
Share on other sites

3 answers to this question

Recommended Posts


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

mes "Hit 'Cancel' Buton";
if( prompt( "Continue","Close" ) == 2 ){
	mes "It's Closed now.";
}else{
	mes "Wew..it CONTINUED.";
}
close;

prompt

'prompt' works almost the same as select, except that when a character clicks
the Cancel button, this function will return 255 instead.
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  69
  • Topics Per Day:  0.02
  • Content Count:  296
  • Reputation:   2
  • Joined:  04/11/13
  • Last Seen:  

will test this

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  1268
  • Reputation:   382
  • Joined:  02/03/12
  • Last Seen:  

I'd also like to add prompt works really well with items scripts for example...

 

if( prompt( "Continue","Close" ) > 200 ){
	dispbottom "It's Closed now.";
	end;
} else {
	dispbottom "Wew..it CONTINUED.";
	end;
}

Would allow you to recall this script much faster than if you were to press the cancel button on a normal select menu.

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