Jump to content
  • 0

Guild Script


rans

Question


  • Group:  Members
  • Topic Count:  104
  • Topics Per Day:  0.02
  • Content Count:  429
  • Reputation:   60
  • Joined:  08/19/12
  • Last Seen:  

Can i Request for a npc script that will invite you to a certain guild 
for example four guild

Upon on 1st login there will be 4 npc (4 guild)
you will choose which NPC or guild you want to join.
..

Also a npc that will change your guild (if you want to move on another guild) - disabled during woe time
 

Edited by Ako si Ranz
Link to comment
Share on other sites

8 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  26
  • Topics Per Day:  0.01
  • Content Count:  130
  • Reputation:   11
  • Joined:  11/26/16
  • Last Seen:  

On 8/12/2014 at 10:23 AM, Emistry said:

it would be better to use source mod.

http://upaste.me/648510601a30ea563

 

try change

map->       // map_
guild->     // guild_

Hello sir, can I request a mirror of this source. upaste.me is on maintenance for about 3 days now.

Thank you.

Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  292
  • Reputation:   199
  • Joined:  05/03/13
  • Last Seen:  

I tried to make a working script. but I still have the problem that I have to restart the server the make it work :( but i am still working on the problem

prontera,155,160,5	script	Guild	70,{
	mes "Join Guild!";
	if(select("Join:Cancel") -1) end;
	mes getcharid(3);
	mes getcharid(0);
	mes strcharinfo(0);
	next;
	atcommand "@kick "+strcharinfo(0);
	query_sql("INSERT INTO `guild_member` (guild_id, account_id, char_id, position, name) VALUES ('1', "+getcharid(3)+", "+getcharid(0)+", '1', '"+strcharinfo(0)+"')");
	query_sql("UPDATE `rathena`.`char` SET `guild_id` = '1' WHERE `char`.`char_id` = "+getcharid(0));
	end;
}

This is not the requested script but maybe you like it too. :)

The script lists all guilds and tell the guildmembers if some1 wants to join.

//by Normynator

prontera,155,160,5    script    Guild    70,{

function makeCategory;
function guildMember;    

    query_sql("SELECT guild_id FROM `guild`", @id$);    
    for(.@b = 0; .@b < getarraysize(@id$); .@b++){
        dispbottom @id$[.@b];
    }
        
    mes "[Guild Joiner]";
    mes "Which Guild do you want to join?";
    set .@selected,select(makeCategory()) -1;
    next;
    
    mes "You selected: " + @gl$[.@selected -1];
    mes "Do you want to join this Guild?";
    if(select("Yes:No") -1) end;
    next;
    
    mes "The Npc sent a request to the Guild";
    query_sql("SELECT name FROM `guild_member` WHERE guild_id = "+ @id$[.@selected - 1], @m$);
    for(.@a = 0; .@a < getarraysize(@m$); .@a++){
        //dispbottom @m$[.@a];
        message @m$[.@a], "Player "+  strcharinfo(0)+ " wants to Join your Guild!";
        set @m$[.@a], "";
    }
    end;
    
    function makeCategory {
        set .@make_string$,"";
        for(.@i = 0; .@i < getarraysize(@id$) ; .@i++){
            query_sql("SELECT name FROM `guild` WHERE guild_id = "+ @id$[.@i], @gl$);
            set .@make_string$,.@make_string$+":"+@gl$;
        }
        return .@make_string$;    
    }
    
    function guildMember {
        query_sql("SELECT name FROM `guild_member` WHERE guild_id = "+ @id$[.@selected - 1], @m$);
        return @m$;
    }
}
Edited by Normynator
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  104
  • Topics Per Day:  0.02
  • Content Count:  429
  • Reputation:   60
  • Joined:  08/19/12
  • Last Seen:  

 

I tried to make a working script. but I still have the problem that I have to restart the server the make it work :( but i am still working on the problem

prontera,155,160,5	script	Guild	70,{
	mes "Join Guild!";
	if(select("Join:Cancel") -1) end;
	mes getcharid(3);
	mes getcharid(0);
	mes strcharinfo(0);
	next;
	atcommand "@kick "+strcharinfo(0);
	query_sql("INSERT INTO `guild_member` (guild_id, account_id, char_id, position, name) VALUES ('1', "+getcharid(3)+", "+getcharid(0)+", '1', '"+strcharinfo(0)+"')");
	query_sql("UPDATE `rathena`.`char` SET `guild_id` = '1' WHERE `char`.`char_id` = "+getcharid(0));
	end;
}

This is not the requested script but maybe you like it too. :)

The script lists all guilds and tell the guildmembers if some1 wants to join.

//by Normynator

prontera,155,160,5    script    Guild    70,{

function makeCategory;
function guildMember;    

    query_sql("SELECT guild_id FROM `guild`", @id$);    
    for(.@b = 0; .@b < getarraysize(@id$); .@b++){
        dispbottom @id$[.@b];
    }
        
    mes "[Guild Joiner]";
    mes "Which Guild do you want to join?";
    set .@selected,select(makeCategory()) -1;
    next;
    
    mes "You selected: " + @gl$[.@selected -1];
    mes "Do you want to join this Guild?";
    if(select("Yes:No") -1) end;
    next;
    
    mes "The Npc sent a request to the Guild";
    query_sql("SELECT name FROM `guild_member` WHERE guild_id = "+ @id$[.@selected - 1], @m$);
    for(.@a = 0; .@a < getarraysize(@m$); .@a++){
        //dispbottom @m$[.@a];
        message @m$[.@a], "Player "+  strcharinfo(0)+ " wants to Join your Guild!";
        set @m$[.@a], "";
    }
    end;
    
    function makeCategory {
        set .@make_string$,"";
        for(.@i = 0; .@i < getarraysize(@id$) ; .@i++){
            query_sql("SELECT name FROM `guild` WHERE guild_id = "+ @id$[.@i], @gl$);
            set .@make_string$,.@make_string$+":"+@gl$;
        }
        return .@make_string$;    
    }
    
    function guildMember {
        query_sql("SELECT name FROM `guild_member` WHERE guild_id = "+ @id$[.@selected - 1], @m$);
        return @m$;
    }
}

Hi, 

thank you for your reply 

but i am going to disable the guild making in the server so only 4 guilds (made by gm)

will be enable in the whole server.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  23
  • Topics Per Day:  0.01
  • Content Count:  78
  • Reputation:   7
  • Joined:  11/26/12
  • Last Seen:  

whats going on? how about problem must server restart? arleady fix?

Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  292
  • Reputation:   199
  • Joined:  05/03/13
  • Last Seen:  

no not yet, was no time ti fix it ^^ i'll fix it as soon as possible

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2346
  • Joined:  10/28/11
  • Last Seen:  

it would be better to use source mod.

http://upaste.me/648510601a30ea563

 

try change

map->       // map_
guild->     // guild_
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  23
  • Topics Per Day:  0.01
  • Content Count:  78
  • Reputation:   7
  • Joined:  11/26/12
  • Last Seen:  

I want to make my RO 12 guild which particular but without members and without a guild leader

But the player can not make a guild

player can only join 12 guild that I created

how to join the guild should ask to NPC Guild

choose the desired player guild

eg ISIS guild, then the NPC to see if ISIS've got guild leader?

if not then the NPC will give the message there is no head of the guild if you want to be a guild leader is then you should membauar 1,000,000,000 z if yes then the player will pay and be a guild leader

If you already have a guild leader then no confirmation whether you sure you want to join? if yes then join ...

kira2 how? is it possible?

if so what should I do?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  23
  • Topics Per Day:  0.01
  • Content Count:  78
  • Reputation:   7
  • Joined:  11/26/12
  • Last Seen:  

bump

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...