Jump to content
  • 0

Question

13 answers to this question

Recommended Posts

Posted

You can use something like this: @guild "• ™ †"

 

not working.

i'm use 2012-04-10 and try to type it and it says guild name already exist.

Posted (edited)

I know it uses @guild just try it tell me what happens; if you still have problems I'll build one that uses SQL.

prontera.gat,154,196,5    script    Guild Maker    100,{
mes "Hello, can I create a guild for you at the cost of 1 Emperium?";
if( countitem(714)&&select("Yes:No")==1 ) {
goto L_start;
}
mes "You might not have any Emperium.";
close;

L_start:
mes "Tell me what to call your guild.";
input @guildname$;
delitem 714, 1;
atcommand "@guild "+@guildname$;
next;
if(!getcharid(2)) {
mes "Guild name already exist.";
getitem 714, 1;
goto L_start;
}
mes "Done sir!";
close;
}
Edited by Skorm
Posted (edited)

With 2012-04-10 there is a button to create a guild without any command

 

Edit : ok space and special char doesn't work, i sugest you to use SQL on website

It's complicated to do it online by npc script because the char who will create the guild have to be disconnect to make it work.

If he's not, i think  the link between the new guild and his char will no be create on sql.

Edited by Shakto
Posted (edited)

As I promised this is a npc that uses SQL to create a guild, but unfortunatly I've tested it and the table is created but the server doesn't reflect that information. Perhaps you could test it further. I to recommend you update your client for the guild creation interface menu.

 

Disconnecting the character and even restarting the server didn't seem to work... Maybe creating the guild while the character is disconnected?
 

 

prontera.gat,160,190,5    script    Guild Maker    100,{
mes "Hello, I can create a guild for you, but at the cost of 1 Emperium.";
if( countitem(714)&&!select("Yes:No")-1 ) {
goto L_start;
}
mes "You might not have any Emperium.";
close;
L_start:
if(getcharid(2)) {
mes "I'm sorry but you already have a guild.";
} else {
mes "Tell me what to call your guild.";
input @guildname$;
query_sql("SELECT `guild_id`  FROM `guild` WHERE `name` = '"+ @guildname$ +"';",.@a);
if(.@a){ mes "I'm sorry but "+@guildname$+" guild already exists."; next; goto L_start; }
query_sql "INSERT INTO `guild` (`name`,`char_id`,`master`,`guild_lv`,`connect_member`,`max_member`,`average_lv`,`exp`,`next_exp`,`skill_point`,`mes1`,`mes2`,`emblem_len`,`emblem_id`) VALUES ('"+@guildname$+"','"+getcharid(0)+"','"+strcharinfo(0)+"','0','0','16','"+BaseLevel+"','0','0','0','','','0','0');";
delitem 714, 1;
mes @guildname$+" Successfully created!";
next;
}
mes "Done sir!";
close;
}
Edited by Skorm
Posted (edited)

What I can do is make a guild name changer, but the effects don't change untill the server is restarted.

 

 

prontera.gat,161,190,5	script	Guild Name Changer	100,{
mes "Hello, can I change your guildname for you at the cost of 1 Emperium?";
if( countitem(714)&&!(select("Yes:No")-1)&&BaseLevel>=23 ) {
goto L_start;
}
mes "Either you don't have Emperium your baselevel isn't 23 or higher or you just don't want to make a guild.";
close;
L_start:
if(!getcharid(2)) {
mes "I'm sorry but you don't have a guild.";
} else {
mes "Tell me what to call your guild.";
set @guildname$,"";
while(@guildname$==""){input(@guildname$);}
query_sql("SELECT `guild_id`,`master`  FROM `guild` WHERE `guild_id` = '"+ getcharid(2) +"';",.@a,.@b$);
if(.@b$!=strcharinfo(0)){ mes "I'm sorry but you're not the leader of "+strcharinfo(2)+"."; close; }
set .@a,query_sql("SELECT * FROM `guild` WHERE `name` = '"+ @guildname$ +"';");
if(.@a){ mes "I'm sorry but you can't take others' guildnames, please try again."; next; goto L_start; }
query_sql("UPDATE `guild` SET `name`='"+escape_sql(@guildname$)+"' WHERE `guild_id`='"+getcharid(2)+"'");
delitem 714, 1;
mes @guildname$+" successfully created!";
mes "Changes will take effect after server restart!";
next;
}
mes "Done!";
close;
}
 

Tested Working

Edited by Skorm
Posted (edited)

Again untested but this is a version that boots the user to character select then creates the guild.

 

 

prontera.gat,160,190,5	script	Offline Guild Maker	100,{
mes "Hello, can I create a guild for you at the cost of 1 Emperium?";
if( countitem(714)&&!select("Yes:No")-1 ) {
goto L_start;
}
mes "You might not have any Emperium.";
close;
L_start:
if(getcharid(2)) {
mes "I'm sorry but you already have a guild.";
} else {
mes "Tell me what to call your guild.";
input .guildname$;
set .@a,query_sql("SELECT * FROM `guild` WHERE `char_id` = '"+ getcharid(0) +"';");
if(.@a){ mes "I'm sorry but you already have a guild."; close; }
set .@a,query_sql("SELECT * FROM `guild` WHERE `name` = '"+ .guildname$ +"';");
if(.@a){ mes "I'm sorry but you can't take others' guildnames, please try again."; next; goto L_start; }
set .blvl,BaseLevel;
set .charid,getcharid(0);
set .charname$,strcharinfo(0);
delitem 714, 1;
close2;
atcommand "@kick "+.charname$;
query_sql "INSERT INTO `guild` (`name`,`char_id`,`master`,`guild_lv`,`connect_member`,`max_member`,`average_lv`,`exp`,`next_exp`,`skill_point`,`mes1`,`mes2`,`emblem_len`,`emblem_id`) VALUES ('"+.guildname$+"','"+.charid+"','"+.charname$+"','1','0','16','"+.blvl+"','0','400000','0','','','0','0');";
end;
}
mes "Done sir!";
close;
}
Tested Working Edited by Skorm
Posted (edited)

Well I tested all the scripts... They work but I don't think... Sql can really give you what you want... The Name Changer probably works the best but still the server needs to be restarted in order for changes to be seen.

Instead my advice would be to ask someone around the source section of this forums to modify the current @guild command to accept special characters, or ask them to make an npccreateguild command. If there isn't already one out there.

Goodluck~

Edited by Skorm

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...