Jump to content
  • 0

change guild leader option


Ninetynine

Question


  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  11
  • Reputation:   0
  • Joined:  10/18/12
  • Last Seen:  

Can someone add a change guild leader option by paying zeny in this script? Please and thanks.

Example:

- 1m per Change Guild Leader

- Cannot change Guild Leader during WOE

Edited by AnnieRuru
topic split - http://rathena.org/board/topic/74698-requesting-this-npc/
Link to comment
Share on other sites

8 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  205
  • Reputation:   19
  • Joined:  10/12/12
  • Last Seen:  

Try to check the wiki page about the Guildchangegm command, there's a fully example about how to do it: Guildchangegm

About he 2 conditions, just add an if statement for every of them:

• 1m per Change Guild Leader

if( Zeny < 1000000 ) {
   mes "not Enough Zeny";
   close;
}

//Paying...
set Zeny, Zeny - 1000000;

• Cannot change Guild Leader during WOE

if( agitcheck() ) {
   mes "You can't change the GM while WoE is active! Come back later.";
   close;
}

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  11
  • Reputation:   0
  • Joined:  10/18/12
  • Last Seen:  

I tried using the guildchange script but having an error.

mes "Hey "+strcharinfo(0)+"!";

set @GID,getcharid(2); //Get the ID of the Guild you're in, if any

if(@GID==0) goto L_NoGuild;

if(strcharinfo(0)==getguildmaster(@GID)) goto L_GuildMaster;

mes "You need to be the Guild Master of the Guild you want to transfer ownership of.";

close;

L_GuildMaster:

mes "So you wanna change ownership huh?! This can be arranged :)";

next;

mes "All I need you to do is type in the name of the character you want to be the new Guild Master.";

input @newgm$; //Here you would type the name Akkarin

if(getcharid(0,@newgm$) == 0) goto L_NotExist; //Check to see if "Akkarin" actually exisits

mes "Ah, so you want "+@newgm+" to be the new Guild Master of "+GetGuildName(@GID)+"?"; //Fetch the name of the guild using the Guild ID and getguildname().

next;

switch (select(" - Yes, do it!: - I'll need to think about it..")) {

case 1:

if(guildchangegm(@GID,@newgm$)) == 1){ //If command returned a success value (1)

mes "Awesome, you're no longer in-charge!";

} else {

mes "Something went wrong, and i don't know why D:!";

}

close;

case 2:

mes "Come back when you've made up your mind!";

close;

}

L_NoGuild:

mes "You need to be in a guild first o.O";

close;

L_NotExist:

mes "That character doesn't exist. Make sure you've typed their name correctly!";

close;

Getting error from this: if(guildchangegm(@GID,@newgm$)) == 1){ //If command returned a success value (1)

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  31
  • Topics Per Day:  0.01
  • Content Count:  666
  • Reputation:   93
  • Joined:  04/27/12
  • Last Seen:  

prontera,158,180,4	script	GM Changer	123,{
if( agitcheck() || agitcheck2() ){ mes "You cannot change guild masters during WoE"; close; }
mes "Hey "+ strcharinfo(0) +"!";
if( !getcharid(2) ){mes "You need to be in a guild first o.O"; close;}
if( strcharinfo(0) != getguildmaster(getcharid(2)) )
{mes "You need to be the Guild Master of the Guild you want to transfer ownership of."; close;}
mes "So you wanna change ownership huh?! This can be arranged.";
next;
mes "All I need you to do is type in the name of the character you want to be the new Guild Master.";
input .@newgm$;
if( !getcharid(0,.@newgm$) )
{mes "That character doesn't exist. Make sure you'vvev typed their name correctly!"; close;}
mes "Ah, so you want " + .@newgm$ +" to be the new Guild Master of "+ getguildname(getcharid(2) +"?";
next;
if( select( "-Yes, do it! : - I'll need to think about it..") == 2 )
{mes "Come back when you've made up your mind!"; close;}
if( zeny < 1000000 ){ mes "You need:  1,000,000 zeny to change guild masters."; close;}
if( !guildchangegm( getcharid(2), .@newgm$ ) )
{mes "Something went wrong, and I don't know why D:!"; close;}
set zeny,zeny - 1000000;
mes "Awesome, you're no longer in-charge!";
close;
}

To fix your issue without my script:

if(guildchangegm(@GID,@newgm$)) == 1){ //If command returned a success value (1)

INTO

if(guildchangegm(@GID,@newgm$) == 1){ //If command returned a success value (1)

ALSO

mes "Ah, so you want "+@newgm+" to be the new Guild Master of "+GetGuildName(@GID)+"?"; //Fetch the name of the guild using the Guild ID and getguildname().

INTO

mes "Ah, so you want "+@newgm$+" to be the new Guild Master of "+GetGuildName(@GID)+"?"; //Fetch the name of the guild using the Guild ID and getguildname().

Edited by GmOcean
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  11
  • Reputation:   0
  • Joined:  10/18/12
  • Last Seen:  

I still get an error:

errorqu.png

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  31
  • Topics Per Day:  0.01
  • Content Count:  666
  • Reputation:   93
  • Joined:  04/27/12
  • Last Seen:  

Opps lol my bad, i updated my post.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  205
  • Reputation:   19
  • Joined:  10/12/12
  • Last Seen:  

I still get an error:

errorqu.png

Copy-Paste back GM Ocean's fixed script or put a comma on there

if( select("-Yes, do it!","-I'll need to think about it.." ) == 2 )

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  11
  • Reputation:   0
  • Joined:  10/18/12
  • Last Seen:  

Ok, it's working now. Thanks a bunch! Request done, problem solved.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  1
  • Reputation:   0
  • Joined:  03/29/13
  • Last Seen:  

Can i request the Correct Script? Or the Final Script ? so im just can copy and paste itu.

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