View Full Version : setguild::HELP
Ven-elexver1
04-07-2008, 08:44 PM
sill not got setguild working i know they are a way yo make a npc auto join you to a guild i have sen it done . but as how they did it I'm not sure all i can find is this fix but i don't know how or where to run it ...............................
XS(XS__setguild);
XS(XS__setguild)
{
dXSARGS;
if (items != 2)
Perl_croak(aTHX_ "Usage: setguild(new_guild_id, new_rank)");
unsigned long new_guild_id = (unsigned long)SvUV(ST(0));
int new_rank = (int)SvIV(ST(1));
quest_manager.setguild(new_guild_id, new_rank);
XSRETURN_EMPTY;
}
Its all Greek to me!
Ven-elexver1
04-08-2008, 05:29 PM
hum. i have still had no luck finding out what to do with this code .or getting my npc to auto add players to guild 1. Once you say join I can show my quest if that helps ?
Striat
04-08-2008, 05:48 PM
Okay, should be in the quest section.
You'll need to make sure your guild table has the guild in it you're trying to join. Also, need to make sure guild_ranks set for the guild.
So, for example, you could use
quest::setguild(1,2);
The 1 corresponds to the guildid and 2 refers to rank for that guild.
Ven-elexver1
04-08-2008, 06:36 PM
yea is in wrong place your right . but yea my guild is made and set as ID 1 rank is 0 and rank is set member 0 but its still not working i have looked all over forums i have found about 4 post but none have a fix. i know it works because a server on here has it running but not sure how they did it.
Ven-elexver1
04-08-2008, 06:49 PM
heres my quest
#npcsname.pl
sub EVENT_SAY {
if ($text =~/Hail/i){
quest::say ("Greetings, $name.The Followers of Light is a Light Race Only Guild You must pick a guild based on your race before you exit Tutorial Light Races are humman Barbarian Erudite High Elf Wood Elf Half Elf Dwarf Halfling Gnome froglok Vah Shir Are you ready to [join] ?"); }
if ($text =~ /join/i) {quest::setguild(3,0);}
}
Aramid
04-08-2008, 07:24 PM
yea is in wrong place your right . but yea my guild is made and set as ID 1 rank is 0 and rank is set member 0 but its still not working i have looked all over forums i have found about 4 post but none have a fix. i know it works because a server on here has it running but not sure how they did it.
A stupid question I'm sure, but in this post you say your Guild ID is 1.
But in your code
if ($text =~ /join/i) {quest::setguild(3,0);}
Your trying to assign ID of 3. Which is it?
Also, does the NPC execute this part of the code?
if ($text =~/Hail/i){
quest::say ("Greetings, $name.The Followers of Light is a Light Race Only Guild You must pick a guild based on your race before you exit Tutorial Light Races are humman Barbarian Erudite High Elf Wood Elf Half Elf Dwarf Halfling Gnome froglok Vah Shir Are you ready to [join] ?"); }
Ven-elexver1
04-08-2008, 07:53 PM
sorry friend i have 2 npc's for two guilds Followers of light is ID 3 and the DarkBrotherhood is guild ID 1 . Both are set to rank 0 members .My Npc's will do the hail = part of the quest and you can type join but at that point i get nothing i have tried 2 diff Char and a player logged in and tried but the quest will not add you to the Guild i also checked Guild member list in Navicat its not adding any one
Ven-elexver1
04-08-2008, 08:03 PM
The Guys at Raid Addicts server has it working on a npc so im sure it can be done
Aramid
04-08-2008, 08:31 PM
Yes, it can and I just did it on my server and it works as advertised. Maybe it's the way you have it laid out....
sub EVENT_SAY {
if ($text=~/Hail/i) {
quest::say("This is where you have your text... ready to [join]");
}
if ($text=~/join/i) {
quest::setguild(1,0);
}
}
If you make any changes to a quest file, you have to be in the zone and enter #reloadpl (with proper status'd account) to get it to reload the quest file with your changes...
Ven-elexver1
04-08-2008, 08:36 PM
K ill try that lay out . i just been reseting the server after i do quest i use a quest editor so ill copy your quest and paste it BRB
Aramid
04-08-2008, 08:38 PM
ok, but no need to reset the server, just type in the #reloadpl with a character with GM Status (might not need be that high). saves you a lot of time.
Ven-elexver1
04-08-2008, 08:53 PM
humm still not working on thing i did was add #LightLord.pl then skiped a line and add your quest like i have done most quest but its the same he will respond to hail but not join
Aramid
04-08-2008, 09:01 PM
humm still not working on thing i did was add #LightLord.pl then skiped a line and add your quest like i have done most quest but its the same he will respond to hail but not join
#Lightlord.pl is nothing but a Comment in the file anyway.
Are there any members in the guild now?
Can the Guild Leader invite someone in the normal way?
You aren't already in the guild by any chance are you?
Ven-elexver1
04-08-2008, 09:04 PM
i was looking at most quests on other npc's in tutorialb and this is what i see thay dont have #LightLord .pl or any npc name most have #zone: Tutrialb and that is all the queen does have her name on it but some where in this part could be the issue maybe im no quest wrighter so I'm not sure
Ven-elexver1
04-08-2008, 09:08 PM
guild leader can invite normal
I'm not in a guild
Only guild leader is in guild right now
Aramid
04-08-2008, 09:15 PM
Any line with a # at the beginning just makes it a comment line.
#This is a comment
#MYNpcName.pl <=- Is a comment line
#These lines do not get executed in the script
You get the idea.
I just tried mine and if I am in the guild, the hail responds but when I say join, nothing happens which is what should happen.
I'm out of ideas.... as long as after you typed it in again, you typed in #reloadpl and it showed you that it did something.... or restarted the emu.
Ven-elexver1
04-08-2008, 09:20 PM
yea bro im not in a guild i did the #reloadpl I'm at a loss also i think cavedude may know something to run on the peq db to make setguild work ill have to try him Ty for the time and help man i did find out #reloadpl saves me a lot of rebooting lol Ty once more
Aramid
04-08-2008, 11:03 PM
One last thing, in your DB, under Guilds, is the minstatus set to 0?
Ven-elexver1
04-13-2008, 08:59 AM
Yea minstat 0
Ven-elexver1
04-13-2008, 11:48 AM
are they a sql command to turn this on in DB or something looks like the quest is fin but the DB or pearl is not doing the setguild.
Ven-elexver1
04-13-2008, 03:45 PM
looks like if i use my gm and do a test #setguild charid,guildid,rankid it works the only thing diff from the quest is the charid in quest it is quest::setguild(3,0)
so you only use the guild id of 3 and rank id of 0 could you add to the quest a way to auto add the players charID in the servers DB ? not sure how to do this
Ven-elexver1
04-13-2008, 06:28 PM
I'm to the point i give up i have changed every thing i can think of ! dont understand whats up with Peq and the setguild::
Aramid
04-13-2008, 08:22 PM
I'm to the point i give up i have changed every thing i can think of ! dont understand whats up with Peq and the setguild::
Out of curiosity, which NPC are you using for this? One that already existed or one that you added?
The command works and it works with the Peq database.
Ven-elexver1
04-14-2008, 03:26 PM
hay man. yea its a npc i made. hes in tutB
Ven-elexver1
04-20-2008, 08:02 AM
my issue is still ongoing with setguild:: anyone got a clue ? TY
Aramid
04-20-2008, 09:34 AM
Have you tried it on an existing NPC by any chance? I tested it on Castlen Drewe in POK as he doesn't have a quest yet and it worked as advertised.
trevius
04-20-2008, 05:06 PM
Maybe it needs to have the qglobal set for the NPC in the npc_types table. I know you need it set to 1 (0 is default) to use quest globals, and maybe it or something similar needs to be set for this to work properly.
Ven-elexver1
04-22-2008, 07:33 PM
TY. I'll try that and let ya know
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.