[Help]Can't get GuildDirector to work

09/22/2008 04:48 FuzionZero#1
Source Base: LOTF
Source Version: TCWNN v1.0

First off let me start by saying I have tried to the best of my (very noobish) abilities to get the GD to work. I have fixed the values in the dialogues so that they are directing to the proper replies of the choices.

At first I was under the impression that I was able to edit the source using solely Notepad, which seemed to be able to read the .cs files fine. I was even convinced that my change to the DB Drop Rates was working. But I was then told I must use Microsoft Visual C# in order to rebuild the project. So I got it installed. But honestly I still have no idea how to get my changes to take effect. I have the GuildDirector set up correctly, or at least I think I do.

Can someone please help me out here. I have looked all over the place for help, but no luck. This is honestly my last resort for help. If you guys could please help me either on here or MSN I would really appreciate it. Thanks.
09/22/2008 06:34 taguro#2
I added you to msn, and I'll help you sort it out. =)
09/22/2008 07:18 _Emme_#3
Thanks for doing a GOOD request/help post,you can add my MSN for help with whatever you need,because I love to help people that really deserves it.

[Only registered and activated users can see links. Click Here To Register...]
09/22/2008 08:17 elragal_30#4
Quote:
Originally Posted by FuzionZero View Post
Source Base: LOTF
Source Version: TCWNN v1.0

First off let me start by saying I have tried to the best of my (very noobish) abilities to get the GD to work. I have fixed the values in the dialogues so that they are directing to the proper replies of the choices.

At first I was under the impression that I was able to edit the source using solely Notepad, which seemed to be able to read the .cs files fine. I was even convinced that my change to the DB Drop Rates was working. But I was then told I must use Microsoft Visual C# in order to rebuild the project. So I got it installed. But honestly I still have no idea how to get my changes to take effect. I have the GuildDirector set up correctly, or at least I think I do.

Can someone please help me out here. I have looked all over the place for help, but no luck. This is honestly my last resort for help. If you guys could please help me either on here or MSN I would really appreciate it. Thanks.
yes you can see C# files with any Text editor
but u must have some compiler
so u can use MS VS C# (the best) or u can use small editor like ""Sharp Developer"
about GD : is it not create guilds only or don't make all jobs
this from my code and it work try it
(make copy from ur files be4 edit it)

this NPc code ,make sure from NPC ID BY click on it +Ctrl
Quote:
if (CurrentNPC == 155)
{
SendPacket(General.MyPackets.NPCSay("Hi I'm GuildAdmin And I can create an guild for you.Do you want?"));
SendPacket(General.MyPackets.NPCLink("Sure, I Want!", 1));
SendPacket(General.MyPackets.NPCLink("Make DeputyLeader", 3));
SendPacket(General.MyPackets.NPCLink("Disband my guild.", 5));
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCFinish());
}
then go to its control part
change with :
Quote:
if (CurrentNPC == 155)
{
if (Control == 6)
{
MyChar.MyGuild.Disband(MyChar);
}
if (Control == 5)
{
if (MyChar.GuildPosition == 100)
{
SendPacket(General.MyPackets.NPCSay("Are you sure you want to disband your guild?"));
SendPacket(General.MyPackets.NPCLink("Yes.", 6));
SendPacket(General.MyPackets.NPCLink("No, actually.", 255));
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCFinish());
}
else
{
SendPacket(General.MyPackets.NPCSay("Only guild leader can disband his/her guild."));
SendPacket(General.MyPackets.NPCLink("Ok.", 255));
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCFinish());
}
}
if (Control == 3)
{
SendPacket(General.MyPackets.NPCSay("Enter the name of your guildmate you want to deputize."));
SendPacket(General.MyPackets.NPCLink2("Deputize", 4));
SendPacket(General.MyPackets.NPCLink("Nevermind.", 255));
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCFinish());
}
if (Control == 4)
{
if (MyChar.GuildPosition == 100)
{
if (MyChar.MyGuild.DLs.Count <= 6)
{
string Name = "";
for (int i = 14; i < 14 + Data[13]; i++)
{
Name += Convert.ToChar(Data[i]);
}

uint CharID = 0;

foreach (DictionaryEntry DE in MyChar.MyGuild.Members)
{
string nm = (string)DE.Value;
string[] Splitter = nm.Split(':');

if (Splitter[0] == Name)
CharID = uint.Parse(Splitter[1]);
}

if (World.AllChars.Contains(CharID))
{
if (MyChar.MyGuild.Members.Contains(CharID))
MyChar.MyGuild.Members.Remove(CharID);
Character Char = (Character)World.AllChars[CharID];
Char.GuildPosition = 90;

MyChar.MyGuild.DLs.Add(CharID, Char.Name + ":" + Char.UID.ToString() + ":" + Char.Level.ToString() + ":" + Char.GuildDonation.ToString());

Char.MyClient.SendPacket(General.MyPackets.GuildIn fo(Char.MyGuild, Char));
}
else
{
SendPacket(General.MyPackets.NPCSay("The player you want to deputize must be in your guild and online."));
SendPacket(General.MyPackets.NPCLink("Damn.", 255));
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCFinish());
}
}
else
{
SendPacket(General.MyPackets.NPCSay("A guild can have only 6 deputy leaders."));
SendPacket(General.MyPackets.NPCLink("Ok.", 255));
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCFinish());
}
}
else
{
SendPacket(General.MyPackets.NPCSay("Only guild leaders can deputize, you are not one."));
SendPacket(General.MyPackets.NPCLink("Damn.", 255));
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCFinish());
}
}
if (Control == 1)
{
if (MyChar.MyGuild == null && MyChar.GuildPosition == 0)
{
SendPacket(General.MyPackets.NPCSay("It will cost you 1,000,000 silvers, and you need to be level 95 at least."));
SendPacket(General.MyPackets.NPCLink2("Create Guild", 2));
SendPacket(General.MyPackets.NPCLink("Nevermind.", 255));
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCFinish());
}
}
if (Control == 2)
{
if (MyChar.MyGuild == null && MyChar.GuildPosition == 0)
{
if (MyChar.Silvers >= 1000000)
{
if (MyChar.Level >= 95)
{
string GuildName = "";
for (int i = 14; i < 14 + Data[13]; i++)
{
GuildName += Convert.ToChar(Data[i]);
}

MyChar.Silvers -= 1000000;
SendPacket(General.MyPackets.Vital(MyChar.UID, 4, MyChar.Silvers));

ushort GuildID = (ushort)General.Rand.Next(0, 65000);

DataBase.NewGuild(GuildID, GuildName, MyChar);
Guilds.NewGuild(GuildID, GuildName, MyChar);
MyChar.GuildID = GuildID;
MyChar.GuildPosition = 100;
MyChar.GuildDonation = 1000000;
MyChar.MyGuild = (Guild)Guilds.AllGuilds[GuildID];

SendPacket(General.MyPackets.GuildName(MyChar.Guil dID, MyChar.MyGuild.GuildName));
SendPacket(General.MyPackets.GuildInfo(MyChar.MyGu ild, MyChar));
SendPacket(General.MyPackets.GuildName(MyChar.Guil dID, MyChar.MyGuild.GuildName));
}
else
{
SendPacket(General.MyPackets.NPCSay("You aren't high level enough."));
SendPacket(General.MyPackets.NPCLink("Ok.", 255));
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCFinish());
}
}
else
{
SendPacket(General.MyPackets.NPCSay("You don't have enough silvers."));
SendPacket(General.MyPackets.NPCLink("Ok.", 255));
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCFinish());
}
}

}
}
or u can see on it what error in ur codes
be sure that controls numbers is same at dialouge and control part also be sure from ur NPC ID
i hope it can help
09/22/2008 10:02 FuzionZero#5
Thank you all. Taguro helped me out earlier. I now have a new source, that is a lot better. I guess there were problems in the source I previously had. Now I have working guilds.

I have now moved on to my next task of getting a successful RB system in. I have set up the NPC using emildayan1's guides. But now, for a better system, I am trying to get it so RBs get to set their own points.

First problem I ran into was emil's guides did not tell me I have to set another line of code to save the given bonus attribute points. I actually figured out the solution to that all on my own. (Yah I'm proud of myself xD).

But now, because leveling still auto-sets the attribute points, any given bonus points cant be used till 130+ because, lets say a Trojan sets some points on Spirit, leveling will auto-set Spirit points to 0. So at the moment I'm trying to find a way to fix that, but I am not confident I can solve this one.

Again. Any help would be greatly appreciate. Thanks to everyone.
09/22/2008 14:18 elragal_30#6
oh good work man
i also on my way for this
about points search for stats part at ur source (I think at GetcharacterInfo())
and u'll find some thing like that
Quote:
public static void GetStats(Character Charr)
{
string str = "0";
string agi = "0";
string vit = "0";
string spi = "0";
string lv;

if (Charr.Level > 120)
lv = "120";
else
lv = Convert.ToString(Charr.Level);

if (Charr.Job > 9 && Charr.Job < 16)
{
str = (Stats.ReadValue("Trojan", "Strength[" + lv + "]"));
agi = (Stats.ReadValue("Trojan", "Agility[" + lv + "]"));
vit = (Stats.ReadValue("Trojan", "Vitality[" + lv + "]"));
spi = (Stats.ReadValue("Trojan", "Spirit[" + lv + "]"));
}
if (Charr.Job > 19 && Charr.Job < 26)
{
str = (Stats.ReadValue("Warrior", "Strength[" + lv + "]"));
agi = (Stats.ReadValue("Warrior", "Agility[" + lv + "]"));
vit = (Stats.ReadValue("Warrior", "Vitality[" + lv + "]"));
spi = (Stats.ReadValue("Warrior", "Spirit[" + lv + "]"));
}
if (Charr.Job > 39 && Charr.Job < 46)
{
str = (Stats.ReadValue("Archer", "Strength[" + lv + "]"));
agi = (Stats.ReadValue("Archer", "Agility[" + lv + "]"));
vit = (Stats.ReadValue("Archer", "Vitality[" + lv + "]"));
spi = (Stats.ReadValue("Archer", "Spirit[" + lv + "]"));
}
if (Charr.Job > 129 && Charr.Job < 136 || Charr.Job > 139 && Charr.Job < 146 || Charr.Job == 100 || Charr.Job == 101)
{
str = (Stats.ReadValue("Taoist", "Strength[" + lv + "]"));
agi = (Stats.ReadValue("Taoist", "Agility[" + lv + "]"));
vit = (Stats.ReadValue("Taoist", "Vitality[" + lv + "]"));
spi = (Stats.ReadValue("Taoist", "Spirit[" + lv + "]"));
}

Charr.Str = ushort.Parse(str);
Charr.Agi = ushort.Parse(agi);
Charr.Vit = ushort.Parse(vit);
Charr.Spi = ushort.Parse(spi);
}
and u will find file calles stats.ini at ur Debug /release folder
instead of make it get stats from this file make it
i mean instead when character go from Lvl 9 >> ot 10 make
Quote:
str= 10
agi =xx
vit =00
blah blah
make it add to current stats
so make agi = agi +xx (that u want to add
sorry for quickly posting as i'm still at first part in allocat bouns