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 09-01-2011, 10:49 AM
greggiles greggiles is offline
Registered User
greggiles's Avatar
Join Date: Sep 2007
Posts: 149
greggiles has a spectacular aura about
Party system

I did some research on the forums, and i have yet to see a thread on how to make a party system. Such as the one in zodiac, or maloria. What is the process someone would take to make one. I thought about it long and hard but i wouldnt know where to start.

Any thoughts?
Reply With Quote
  #2  
Old 09-01-2011, 11:06 AM
Tricxta Tricxta is offline
The Muffin Man
Tricxta's Avatar
Join Date: Oct 2010
Location: Australia
Posts: 563
Tricxta is a jewel in the roughTricxta is a jewel in the rough
Use guilds and just trigger the server which triggers the players with the same guild tag as the sending player. Then if you want you can always step it up so instead of relying on guilds you could create a database and have a new record for each group although I'm not sure even how I would do that that lol. Go with the guild idea and life will be easy >: )
Reply With Quote
  #3  
Old 09-01-2011, 11:30 AM
Mark Sir Link Mark Sir Link is offline
Kevin Azite
Mark Sir Link's Avatar
Join Date: Sep 2005
Posts: 1,489
Mark Sir Link is just really niceMark Sir Link is just really nice
Send a message via AIM to Mark Sir Link
I'd personally do something like have a class called "party" or whatever else you want to name it with a few functions like addPlayer, removePlayer, getPlayers, invitePlayer etc.

then create a party by doing something like

PHP Code:
function newParty(){
  
temp.party = new TStaticVar("Party_"@player.account);
  
party.join("party");
  
party.addPlayer(player);

then in the class

PHP Code:
public function addPlayer(pobj){
  
pobj.party this;
  
this.members.add(pobj);

then when a player wants to invite someone, imagine by some chat command on the client that triggers the server with the account name

PHP Code:
function onActionServerside(cmdtarget){
  if(
cmd == "inv"){
    
player.party.invitePlayer(findplayer(target));
  }
  if(
cmd == "create"){
    
newParty();
  }

Reply With Quote
  #4  
Old 09-01-2011, 11:48 AM
Tricxta Tricxta is offline
The Muffin Man
Tricxta's Avatar
Join Date: Oct 2010
Location: Australia
Posts: 563
Tricxta is a jewel in the roughTricxta is a jewel in the rough
you good sir sure showed me up :0, rep+ although it doesn't count for anything lol, it's the thought that counts
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 07:47 PM.


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