Difference between revisions of "End"

From Hercules Wiki
Jump to: navigation, search
(Created page with "Category:Script_Command ==Syntax== *end; ==Description== This command will stop the execution for this particular script. It is the normal way to end a script which d...")
 

Latest revision as of 00:16, 12 February 2013

Contents

Syntax

  • end;

Description

This command will stop the execution for this particular script. It is the normal way to end a script which does not use mes, otherwise use close.

Examples

   if(BaseLevel <= 10) {
      npctalk "Look at that you are still a n00b";
      end;
   }
   if(BaseLevel <= 20) {
      npctalk "Look at that you are getting better, but still a n00b";
      end;
   }
   if(BaseLevel <= 30) {
      npctalk "Look at that you are getting there, you are almost 2nd profession now right???";
      end;
   }
   if(BaseLevel <= 40) {
      npctalk "Look at that you are almost 2nd profession";
      end;
   }

Notes

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