Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 11-13-2007, 09:29 PM
Deas_Voice Deas_Voice is offline
Deas
Deas_Voice's Avatar
Join Date: Jun 2007
Location: Sweden
Posts: 2,264
Deas_Voice is a jewel in the roughDeas_Voice is a jewel in the rough
Send a message via AIM to Deas_Voice Send a message via MSN to Deas_Voice Send a message via Yahoo to Deas_Voice
Unhappy problem with addguildmember..

Hey, i want this to add to the guildguildname.txt,
so if i chat /AddGuild guildname accountname nickname it wound appear in the
guildguildname.txt
ex: /addguild LAT Deas_Voice Neo (then my account and nick appear in the guildLAT.txt as Deas_Voice:Neo)

PHP Code:
//#SERVERSIDE
function onActionServerSide() {
  if (
params[0] == "AddGuild") {
    
with (findplayer(params[0])) {
    
addguildmember( @params[1],params[0],player.nick);
 
//addguildmember(str guildname, str accountname, str nickname);
      
}
    }
  }

//#CLIENTSIDE
function onPlayerChats(){
 if (
player.chat.starts ("/AddGuild ")) {
triggerserver("gui",this.name,"AddGuild",player.account,player.chat.substring(10));
  }

get it?
and im also wondring whats the param for playernick so i used player.nick
please help me
__________________
.
WTF is real life, and where do I Download it?
There is no Real Life, just AFK!
since 2003~
I Support~
ღAeonღ | ღTestbedღ | ღDelteriaღ

if you are going to rep me, don't be an idiot, leave your name!
I got nothing but love for you
Reply With Quote
  #2  
Old 11-13-2007, 10:52 PM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
player.nick is the correct param, however, player.nick would also include the guild name at the end of the nickname.

Example:
player.guild: "Moon"
player.nick: "*Inverness (Moon)"
__________________
Reply With Quote
  #3  
Old 11-15-2007, 02:07 PM
Deas_Voice Deas_Voice is offline
Deas
Deas_Voice's Avatar
Join Date: Jun 2007
Location: Sweden
Posts: 2,264
Deas_Voice is a jewel in the roughDeas_Voice is a jewel in the rough
Send a message via AIM to Deas_Voice Send a message via MSN to Deas_Voice Send a message via Yahoo to Deas_Voice
Quote:
Originally Posted by Inverness View Post
player.nick is the correct param, however, player.nick would also include the guild name at the end of the nickname.

Example:
player.guild: "Moon"
player.nick: "*Inverness (Moon)"
no i want (tryd) to make so u have to do the "setnick Neo (Moon)"
but insted of having to download the guildMoon.txt and add it, u can say "/addguild Moon Deas_Voice Neo" then it happear in the file by it self
then u have to use "setnick" insted of a "/stafftag" thats controld by a player flag.
__________________
.
WTF is real life, and where do I Download it?
There is no Real Life, just AFK!
since 2003~
I Support~
ღAeonღ | ღTestbedღ | ღDelteriaღ

if you are going to rep me, don't be an idiot, leave your name!
I got nothing but love for you
Reply With Quote
  #4  
Old 11-15-2007, 04:16 PM
xAndrewx xAndrewx is offline
Registered User
xAndrewx's Avatar
Join Date: Sep 2004
Posts: 5,260
xAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud of
HTML Code:
function onActionServerside(option) {
  if (temp.option == "createGuild") {  
    temp.guildName = player.chat.substring(9).trim();
    addGuildMember(temp.guildName, player.account, player.nick);

    player.chat = "Created guild:" SPC temp.guildName @ "!";
    player.guild = temp.guildName;
  }
}
//#CLIENTSIDE
function onPlayerChats() {
  if (player.chat.starts("/addGuild")) {
    triggerserver("weapon", this.name, "createGuild");
  }
}
You might want to actually check if the guild already exists
__________________
Reply With Quote
  #5  
Old 11-15-2007, 04:58 PM
Deas_Voice Deas_Voice is offline
Deas
Deas_Voice's Avatar
Join Date: Jun 2007
Location: Sweden
Posts: 2,264
Deas_Voice is a jewel in the roughDeas_Voice is a jewel in the rough
Send a message via AIM to Deas_Voice Send a message via MSN to Deas_Voice Send a message via Yahoo to Deas_Voice
Quote:
Originally Posted by xAndrewx View Post
You might want to actually check if the guild already exists
and if i want to add other peppol to the file by this command?
that was my idea from the start
__________________
.
WTF is real life, and where do I Download it?
There is no Real Life, just AFK!
since 2003~
I Support~
ღAeonღ | ღTestbedღ | ღDelteriaღ

if you are going to rep me, don't be an idiot, leave your name!
I got nothing but love for you
Reply With Quote
  #6  
Old 11-15-2007, 06:47 PM
xAndrewx xAndrewx is offline
Registered User
xAndrewx's Avatar
Join Date: Sep 2004
Posts: 5,260
xAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud of
HTML Code:
function onActionServerside(option) {
  if (temp.option == "addMember") {
    temp.chat = player.chat.substring(4).trim().tokenize();
    addGuildMember("Guild Name Here", temp.chat[0], temp.chat[1]);
  }
}
//#CLIENTSIDE
function onPlayerChats() {
  if (player.chat.starts("/add")) {
    triggerserver("weapon", this.name, "addMember");
  }
}
/add "account name" "nickname"
^- Need the commas
__________________
Reply With Quote
  #7  
Old 11-16-2007, 03:13 AM
Knightmare1 Knightmare1 is offline
Billy Allan
Knightmare1's Avatar
Join Date: Apr 2007
Posts: 804
Knightmare1 can only hope to improve
wow neo, youve gotten way better than when we worked on moon light, i cant wait to see how u improve on levels!
__________________
I am the devil, I am here to do to devils work.
Reply With Quote
  #8  
Old 11-16-2007, 03:52 PM
Deas_Voice Deas_Voice is offline
Deas
Deas_Voice's Avatar
Join Date: Jun 2007
Location: Sweden
Posts: 2,264
Deas_Voice is a jewel in the roughDeas_Voice is a jewel in the rough
Send a message via AIM to Deas_Voice Send a message via MSN to Deas_Voice Send a message via Yahoo to Deas_Voice
Quote:
Originally Posted by Knightmare1 View Post
wow neo, youve gotten way better than when we worked on moon light, i cant wait to see how u improve on levels!
thanks ,
have chris made a apartment system yet.

and andrew thanks you too.
__________________
.
WTF is real life, and where do I Download it?
There is no Real Life, just AFK!
since 2003~
I Support~
ღAeonღ | ღTestbedღ | ღDelteriaღ

if you are going to rep me, don't be an idiot, leave your name!
I got nothing but love for you
Reply With Quote
  #9  
Old 11-16-2007, 11:48 PM
Knightmare1 Knightmare1 is offline
Billy Allan
Knightmare1's Avatar
Join Date: Apr 2007
Posts: 804
Knightmare1 can only hope to improve
Quote:
Originally Posted by Deas_Voice View Post
thanks ,
have chris made a apartment system yet.

and andrew thanks you too.

i dont know about the system... hes working on cars i think
__________________
I am the devil, I am here to do to devils work.
Reply With Quote
Reply

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 12:34 AM.


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