End

From Hercules Wiki
Revision as of 00:16, 12 February 2013 by Mysterious (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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.