Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   problem with addguildmember.. (https://forums.graalonline.com/forums/showthread.php?t=77555)

Deas_Voice 11-13-2007 09:29 PM

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:)

Inverness 11-13-2007 10:52 PM

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)"

Deas_Voice 11-15-2007 02:07 PM

Quote:

Originally Posted by Inverness (Post 1358263)
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)"

x_x 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.

xAndrewx 11-15-2007 04:16 PM

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 ^^

Deas_Voice 11-15-2007 04:58 PM

Quote:

Originally Posted by xAndrewx (Post 1358492)
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^^

xAndrewx 11-15-2007 06:47 PM

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

Knightmare1 11-16-2007 03:13 AM

wow neo, youve gotten way better than when we worked on moon light, i cant wait to see how u improve on levels! :D

Deas_Voice 11-16-2007 03:52 PM

Quote:

Originally Posted by Knightmare1 (Post 1358623)
wow neo, youve gotten way better than when we worked on moon light, i cant wait to see how u improve on levels! :D

thanks :) ,
have chris made a apartment system yet. x_x

and andrew thanks you too.

Knightmare1 11-16-2007 11:48 PM

Quote:

Originally Posted by Deas_Voice (Post 1358666)
thanks :) ,
have chris made a apartment system yet. x_x

and andrew thanks you too.


i dont know about the system... hes working on cars i think


All times are GMT +2. The time now is 07:55 PM.

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