Ninetynine Posted December 1, 2012 Posted December 1, 2012 (edited) 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 December 1, 2012 by AnnieRuru topic split - http://rathena.org/board/topic/74698-requesting-this-npc/ Quote
Ryokem Posted December 1, 2012 Posted December 1, 2012 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; } Quote
Ninetynine Posted December 3, 2012 Author Posted December 3, 2012 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) Quote
GmOcean Posted December 3, 2012 Posted December 3, 2012 (edited) 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 December 3, 2012 by GmOcean Quote
Ryokem Posted December 3, 2012 Posted December 3, 2012 I still get an error: 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 ) Quote
Ninetynine Posted December 3, 2012 Author Posted December 3, 2012 Ok, it's working now. Thanks a bunch! Request done, problem solved. Quote
orpheusro Posted July 11, 2013 Posted July 11, 2013 Can i request the Correct Script? Or the Final Script ? so im just can copy and paste itu. Quote
Question
Ninetynine
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 AnnieRurutopic split - http://rathena.org/board/topic/74698-requesting-this-npc/
8 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.