Graal Forums  

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

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 03-31-2002, 05:12 PM
nyghtGT nyghtGT is offline
Banned
nyghtGT's Avatar
Join Date: Jun 2001
Posts: 3,993
nyghtGT is on a distinguished road
Send a message via AIM to nyghtGT
Class Equilization

OK, this is an NPC I am working on for Eternal Destiny so please dont steal it. I would like to know some things i could do to make it better plus any tips to get it to work right.
NPC Code:

NPC Code:

// NPC made by Nyght
// Class Equilization
if (playerenters&&!joined) {
set joined;
setstring server.people,#v(strtofloat(#s(server.people))+=1) ;
}
if (playerchats&&startswith(joinclass,#c)) {
this.warrior=strtofloat(#s(server.people))*.30;
tokenize #c;
if (strequals(#t(1),warrior)) {
if (this.warrior<strtofloat(#s(server.warrior))) {
message You can not choose this class because it allready has enough participants!;
sleep 1.25;
message ;
} else {
joinclasswarrior();
}
}
message If you are not transfered to class level, check spelling and try again!;
}
// Functions
function joinclasswarrior() {
set warriorclass;
setstring server.warrior,#v(strtofloat(#s(server.warrior))+= 1);
setlevel2 warrior.graal,32,32;
}




Its rougly suppose to work out like, if the warrior class is less then 30% of the servers total population then the person can join the class ...

Please, any help is appreciated ...
Reply With Quote
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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:37 AM.


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