Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 07-17-2007, 12:40 AM
killerogue killerogue is offline
Registered Omega
killerogue's Avatar
Join Date: Apr 2006
Location: United States
Posts: 1,920
killerogue is on a distinguished road
Send a message via AIM to killerogue Send a message via MSN to killerogue
Parteeeeee

PHP Code:
function onCreated() {
  
createParty({"James""John""Ky"});
  
onTimeout();
}

public function 
createParty(members) {
  
temp.keys getstringkeys("this.party");
  
temp.pindex keys.size();
  
  
makevar("this.party" pindex) = members;
  
setTimer(.05);
}

public function 
destroyParty() {
}

public function 
partyChecks() {
  if (
getstringkeys("this.party") != null)
    return 
true;
  else if (
getstringkeys("this.party") == null)
    return 
false;
}

public function 
playerInParty(acct) {
  for (
temp.party getstringkeys("this.party")) {
    if (
acct in makevar("this.party" party)) return {trueacct};
  }
  return {
falseacct};
}

public function 
addMember() {
}

public function 
removeMember() {
}

public function 
updateParties() {
  for (
temp.party getstringkeys("this.party")) {
    echo(
party);
    if (
this.(@ "party" party).size() <= 1) {
      echo(
"party has 1 or less member(s)");
    }
    else {
      echo(
"party has more than one member(s)");
    }
  }
}

function 
onTimeout() {
  if (
partyChecks() == true) {
    
updateParties();
    
setTimer(.05);
  }
  else
    return;

Party system I'm working on for a project. Was wondering why this also continuously insists upon echoing "Checks" when I echo party. :o
__________________


REMEMBER, IF YOU REP ME, LEAVE A NAME!

Quote:
Originally Posted by haunter View Post
Graal admins don't die. They go to hell and regroup.
Quote:
Originally Posted by Inverness View Post
Without scripters, your graphics and levels wouldn't do anything but sit there and look pretty.
Reply With Quote
Reply


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:00 PM.


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