Search the Commands

Home  All  a  b  c  d  e  f  g  h  i  j  k  l  m  n  o  p  q  r  s  t  u  v  w  x  y  z 

Details for command callsub:
 
* callsub "Label"{,"Argument",...,"Argument"};
 
This command will go to a specified label within the current script (do NOT use
quotes around it) coming in as if it were a 'callfunc' call, and pass it
arguments given, if any, which can be recovered there with 'getarg'. When done
there, you should use the 'return' command to go back to the point from where
this label was called. This is used when there is a specific thing the script
will do over and over, this lets you use the same bit of code as many times as
you like, to save space and time, without creating extra NPC objects which are
needed with 'callfunc'. A label is not callable in this manner from another
script.

mes "[Woman]"
mes "Lets see if you win";
callsub Check;
mes "Well done you have won";
Check:
set @win, rand(2);
if(@win==0) return;
mes "Sorry you lost";

Valid XHTML 1.0 Strict Valid CSS!