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
  #3  
Old 09-04-2005, 03:47 AM
Torankusu_2002 Torankusu_2002 is offline
'been round.
Torankusu_2002's Avatar
Join Date: Nov 2001
Posts: 1,246
Torankusu_2002 is on a distinguished road
Quote:
Originally Posted by Polo
Well, if your numbers have some form of pattern, then yes its possible.

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.
Yeah, I think you got the gist of what I was trying to show with my example.
I was going to store them in an array, but I've never really toyed with them before. you'd get them like this, right?
experienceammounts = {0,100,300,600};

if (experience >= #I(experienceammounts,2)){
blah
}

right? I've never used string arrays before, if that's what I would use.
__________________
torankusu's
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 09:00 PM.


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