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 end:
 
* end;
 
This command will stop the execution for this particular script. The two
versions are prefectly equivalent. It is the normal way to end a script which
does not use 'mes'.

if (BaseLevel<=10) goto L_Lvl10;
if (BaseLevel<=20) goto L_Lvl20;
if (BaseLevel<=30) goto L_Lvl30;
if (BaseLevel<=40) goto L_Lvl40;
if (BaseLevel<=50) goto L_Lvl50;
if (BaseLevel<=60) goto L_Lvl60;
if (BaseLevel<=70) goto L_Lvl70;
L_Lvl10:
npctalk "Look at that you are still a n00b";
end;
L_Lvl20:
npctalk "Look at that you are getting better, but still a n00b";
end;
L_Lvl30:
npctalk "Look at that you are getting there, you are almost 2nd profession now right???";
end;
L_Lvl40:
npctalk "Look at that you are almost 2nd profession";
end;

Without the use if 'end' it would travel through the labels until the end of the
script. If you were lvl 10 or less, you would see all the speech lines, the use
of 'end' stops this, and ends the script.

Examples:

> if (BaseLevel<=10) goto L_Lvl10;
> if (BaseLevel<=20) goto L_Lvl20;
> if (BaseLevel<=30) goto L_Lvl30;
> if (BaseLevel<=40) goto L_Lvl40;
> if (BaseLevel<=50) goto L_Lvl50;
> if (BaseLevel<=60) goto L_Lvl60;
> if (BaseLevel<=70) goto L_Lvl70;
> L_Lvl10:
> npctalk "Look at that you are still a n00b";
> end;
> L_Lvl20:
> npctalk "Look at that you are getting better, but still a n00b";
> end;
> L_Lvl30:
> npctalk "Look at that you are getting there, you are almost 2nd profession now right???";
> end;
> L_Lvl40:
> npctalk "Look at that you are almost 2nd profession";
> end;
Without the use of 'end' it would travel through the labels until the end of the script. If you were lvl 10 or less, you would see all the speech lines, the use of 'end' stops this, and ends the script.

Valid XHTML 1.0 Strict Valid CSS!