Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 09-04-2005, 01:39 AM
Polo Polo is offline
Classic Systems Admin
Join Date: Sep 2002
Location: Vancouver, Canada
Posts: 735
Polo is on a distinguished road
Send a message via AIM to Polo
Well, if your numbers have some form of pattern, then yes its possible.

NPC Code:
//Example Only. 
//This is a simple one that increases the Experience Gap between each level by 100.
//Assumes you dont reset Experience each level.
if (Experience > (Level^2 + Level)*50) {
...
}



You could also have all the ammounts stored in an array and then just look through it using thier current level as the index.

NPC Code:
//Example Only. 
ExperienceAmmounts = {0,100,300,600,1000}; //Etc...
if (Experience > ExperienceAmmounts[Level]) {
...
}



If the scripts are wrong well meh its late. They're just examples anyway.
__________________
Be good little players, or Master Storm will ban you!



Proof that the staff are crazy..
*Ghost Pirate: I'm a little teacup short and stubbe here is my raygun here is my butt
DragonX: Jumping jack rabbits Batman! Our eggo waffles have been stolen! To the batmobile Robin!
X-Mann (RC): I have a head ache
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 03:20 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.