Quote:
Originally Posted by .Arco
I was giving you a psuedo code.
You have to do the rest on your own.
That was only an example.
|
WHY THIS NPC NOT WORK CAN YOU FIX IT PLZ
PHP Code:
#region Expotionm and allies
case 33363:
{
if (option == 0)
{
OptionText("The Traning is start i will give you Double Expotion enjoy and come back to take another", GC);
OptionLink("Got it.", 1, GC);
OptionLink("make allies.", 21, GC);
OptionLink("no Thanks.", 255, GC);
GC.AddSend(Packets.NPCSetFace(50));
GC.AddSend(Packets.NPCFinish());
}
if (option == 1)
{
GC.MyChar.ExpPotionUsed = DateTime.Now;
GC.MyChar.DoubleExp = true;
GC.MyChar.DoubleExpLeft = 3600;
// MyClient.AddSend(Packets.Status(EntityID, Status.flower, pote));
//MyClient.AddSend(Packets.Status(EntityID, Status.PotFromMentor, pote));
GC.MyChar.MyClient.AddSend(Packets.Status(GC.MyChar.EntityID, Status.DoubleExpTime, (ulong)GC.MyChar.DoubleExpLeft));
}
if (option == 21)
{
if (GC.MyChar.MyGuild != null && GC.MyChar.GuildRank == NewestCOServer.Features.GuildRank.GuildLeader)
{
string Ally = ReadString(Data);
foreach (Features.Guild g in Features.Guilds.AllTheGuilds.Values)
{
if (g.GuildName == Ally)
{
if (g.Creator.Info != null)
{
if (g.Creator.Info.MyTeam.Members.Contains(GC.MyChar.EntityID))
{
if (!GC.MyChar.MyGuild.Allies.ContainsValue(Ally))
{
GC.MyChar.MyGuild.Allies.Add(0, Ally);
GC.AddSend(Packets.String(g.GuildID, 21, Ally));
OptionText(g.GuildName + " is now your ally!", GC);
OptionLink("Thanks.", 255, GC);
}
else
{
OptionText(g.GuildName + " is already your ally.", GC);
OptionLink("Damn.", 255, GC);
}
}
else
{
OptionText("blah blah", GC);
OptionLink("Okay", 255, GC);
}
}
else
{
OptionText("Make sure lolo.", GC);
OptionLink("Okay", 255, GC);
}
}
}
}
}
break;
}
#endregion