Jump to content
  • 0

hello to all help pls


Jayz

Question


  • Group:  Members
  • Topic Count:  59
  • Topics Per Day:  0.01
  • Content Count:  396
  • Reputation:   53
  • Joined:  07/24/12
  • Last Seen:  

how to make input = goto?

example

map,123,123,5 script [Test Script] 105,{

mes "Hello what label you want to go??";

mes "label1 or label 2??";

next;

input .label;

goto .label;

// if input the label is incorrect we have failed message like sorry your label is not correct..

label1:

mes "this is label 1";

close;

label2:

mes "this is label 2";

close;

Edited by zaido78
Link to comment
Share on other sites

5 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  83
  • Topics Per Day:  0.02
  • Content Count:  248
  • Reputation:   1
  • Joined:  06/27/12
  • Last Seen:  

switch(select("Label1","Label2")) {
case 1:
mes "Label1";
close;
case 2:
next;
mes "Label2";
close; }
}

Edited by Nochii
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  59
  • Topics Per Day:  0.01
  • Content Count:  396
  • Reputation:   53
  • Joined:  07/24/12
  • Last Seen:  

@Nochii

not this..

:(

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  50
  • Reputation:   0
  • Joined:  07/24/12
  • Last Seen:  

if( .label == label1 ) goto label1;
if( .label == label2 ) goto label2;

label1;
//codes
close;
end;
label1;
//codes
close;
end;

This a simple ways to do it, you can give it a try

You could just do what Nochii did there, much simpler for players so they can choose from a menu, instead of inputting s set of string

Well, just my comment, since I have no idea what you are planning *cheers*

Edited by xRyusuke
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  10
  • Reputation:   0
  • Joined:  03/03/12
  • Last Seen:  

map,123,123,5	script	[Test Script] 105,{
mes "Hello what label you want to go??";
mes "label1 or label 2??";
next;
input .label$;
if((.label$ != "label1") || (.label$ != "label2")){
mes "I'm sorry but your input was not a valid label";
close;
}
goto .label$;
// if input the label is incorrect we have failed message like sorry your label is not correct..

label1:
mes "this is label 1";
close;

label2:
mes "this is label 2";
close;
}

Try this. I noticed you didn't put a "$" at the end of the .label input, meaning it wouldn't of been counted as a text string.

Edited by Pavi
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  59
  • Topics Per Day:  0.01
  • Content Count:  396
  • Reputation:   53
  • Joined:  07/24/12
  • Last Seen:  

ok thanks

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