[Release]Ancient-Devil's-Quest!5165 source!

02/28/2010 21:51 killersub#1
okay so since I think, no one has converted this from lotf to new lotf I decided to save them time and convert it myself...here is a fully working ancient devil's quest (without the mobs, SORRY I'm not such a pro at coding lol =/) ENJOY!

Let's define our variables,etc...

In character.cs go somewhere around line 1711 and add this:

Code:
public string ADJob = "";
go to mob.cs and find this:

Code:
else if (MyMath.ChanceSuccess(DropRates.Meteor))
and under it put this:

Code:
#region Map Drops
                    if (Char != null)
                        if (MyMath.ChanceSuccess(10))
                            if (Name == "WarriorDevil")
                            {
                                DI2.Info.ID = 710011;
                                DI2.Info.MaxDur = DI2.Info.DBInfo.Durability;
                                DI2.Info.CurDur = DI2.Info.MaxDur;
                            }
                    #region Map Drops
                    if (Char != null)
                        if (MyMath.ChanceSuccess(10))
                            if (Name == "TrojanDevil")
                            {
                                DI2.Info.ID = 710012;
                                DI2.Info.MaxDur = DI2.Info.DBInfo.Durability;
                                DI2.Info.CurDur = DI2.Info.MaxDur;
                            }
                    #region Map Drops
                    if (Char != null)
                        if (MyMath.ChanceSuccess(10))
                            if (Name == "FireDevil")
                            {
                                DI2.Info.ID = 710013;
                                DI2.Info.MaxDur = DI2.Info.DBInfo.Durability;
                                DI2.Info.CurDur = DI2.Info.MaxDur;
                            }
                    #region Map Drops
                    if (Char != null)
                        if (MyMath.ChanceSuccess(10))
                            if (Name == "WaterDevil")
                            {
                                DI2.Info.ID = 710014;
                                DI2.Info.MaxDur = DI2.Info.DBInfo.Durability;
                                DI2.Info.CurDur = DI2.Info.MaxDur;
                            }
                    #region Map Drops
                    if (Char != null)
                        if (MyMath.ChanceSuccess(10))
                            if (Name == "ArcherDevil")
                            {
                                DI2.Info.ID = 710015;
                                DI2.Info.MaxDur = DI2.Info.DBInfo.Durability;
                                DI2.Info.CurDur = DI2.Info.MaxDur;
                            }
Now for the NPC itself...

Ancient-Devil's-Quest:

Code:
#region Ancient-Devils-Quest
                            case 9535:
                            {
                                GC.AddSend(Packets.NPCSay("The Ancient Devil was sealed in this Island. The seal's power is very weak now."));
                                GC.AddSend(Packets.NPCSay("The devil will awake soon. Can you help us?"));
                                GC.AddSend(Packets.NPCLink("How can I help you?", 1));
                                GC.AddSend(Packets.NPCLink("Just passing by.", 255));
                                GC.AddSend(Packets.NPCSetFace(30));
                                GC.AddSend(Packets.NPCFinish());
                            }
                            if (Control == 1)
                                {
                                    GC.AddSend(Packets.NPCSay("First, get 5 Amulers. Each amulet is protected by a Guard of different professions."));
                                    GC.AddSend(Packets.NPCSay(" Only if you are of the same profession, can you challenge the Guard. So you had better ask a friend for help."));
                                    GC.AddSend(Packets.NPCSay(" After you gather the 5 Amulets, click on the yellow marks on the ground to bring out the devil and its guards."));
                                    GC.AddSend(Packets.NPCSay(" Enable PK mode to kill them. Will you help us?"));
                                    GC.AddSend(Packets.NPCLink("Yes. I shall try.", 2));
                                    GC.AddSend(Packets.NPCLink("Let me think it over.", 255));
                                    GC.AddSend(Packets.NPCSetFace(30));
                                    GC.AddSend(Packets.NPCFinish());
                                }
                                if (Control == 2)
                                {
                                    GC.MyChar.Teleport(1082, 189, 233);
                                }
                                break;
                            #endregion
                            #region Trojan Guard
                            case 9536:
                            {
                                GC.MyChar.ADJob = "Trojan";
                                if (GC.MyChar.InventoryContains(710017, 1))
                                {
                                    GC.AddSend(Packets.NPCSay("Since you have passed the test and obtained the " + GC.MyChar.ADJob + " Cert., I will give you the " + GC.MyChar.ADJob + " Amulet."));
                                    GC.AddSend(Packets.NPCLink("Thanks.", 2));
                                    GC.AddSend(Packets.NPCSetFace(30));
                                    GC.AddSend(Packets.NPCFinish());
                                }
                                else
                                {
                                    GC.AddSend(Packets.NPCSay("To obtain the " + GC.MyChar.ADJob + " Amulet, you must enable PK mode to kill the " + GC.MyChar.ADJob + "Devil and give me the " + GC.MyChar.ADJob + " Cert. Are you ready?"));
                                    GC.AddSend(Packets.NPCLink("Yeah.", 1));
                                    GC.AddSend(Packets.NPCLink("Not yet.", 255));
                                    GC.AddSend(Packets.NPCSetFace(30));
                                    GC.AddSend(Packets.NPCFinish());
                                }
                            }
                            if (Control == 1)
                                {
                                    if (GC.MyChar.Job == 10 || GC.MyChar.Job == 11 || GC.MyChar.Job == 12 || GC.MyChar.Job == 13 || GC.MyChar.Job == 14 || GC.MyChar.Job == 15)
                                    {
                                        GC.MyChar.Teleport(1082, 076, 175);
                                    }
                                    else
                                    {
                                        GC.AddSend(Packets.NPCSay("Sorry, only a " + GC.MyChar.ADJob + " can challenge this test."));
                                        GC.AddSend(Packets.NPCLink("I see.", 255));
                                        GC.AddSend(Packets.NPCSetFace(30));
                                        GC.AddSend(Packets.NPCFinish());
                                    }
                                }
                                if (Control == 2)
                                {
                                    if (GC.MyChar.InventoryContains(710017, 1))
                                    {
                                        GC.MyChar.RemoveItem(GC.MyChar.NextItem(710017));
                                        GC.MyChar.AddItem(710012);
                                    }
                                }
                                break;
                            #endregion
                            #region Fire Guard
                            case 9537:
                            {
                                GC.MyChar.ADJob = "Fire";
                                if (GC.MyChar.InventoryContains(710018, 1))
                                {
                                    GC.AddSend(Packets.NPCSay("Since you have passed the test and obtained the " + GC.MyChar.ADJob + " Cert., I will give you the " + GC.MyChar.ADJob + " Amulet."));
                                    GC.AddSend(Packets.NPCLink("Thanks.", 2));
                                    GC.AddSend(Packets.NPCSetFace(30));
                                    GC.AddSend(Packets.NPCFinish());
                                }
                                else
                                {
                                    GC.AddSend(Packets.NPCSay("To obtain the " + GC.MyChar.ADJob + " Amulet, you must enable PK mode to kill the " + GC.MyChar.ADJob + "Devil and give me the " + GC.MyChar.ADJob + " Cert. Are you ready?"));
                                    GC.AddSend(Packets.NPCLink("Yeah.", 1));
                                    GC.AddSend(Packets.NPCLink("Not yet.", 255));
                                    GC.AddSend(Packets.NPCSetFace(30));
                                    GC.AddSend(Packets.NPCFinish());
                                }
                            }
                            if (Control == 1)
                                {
                                    if (GC.MyChar.Job == 142 || GC.MyChar.Job == 143 || GC.MyChar.Job == 144 || GC.MyChar.Job == 145)
                                    {
                                        GC.MyChar.Teleport(1082, 295, 168);
                                    }
                                    else
                                    {
                                        GC.AddSend(Packets.NPCSay("Sorry, only a " + GC.MyChar.ADJob + " can challenge this test."));
                                        GC.AddSend(Packets.NPCLink("I see.", 255));
                                        GC.AddSend(Packets.NPCSetFace(30));
                                        GC.AddSend(Packets.NPCFinish());
                                    }
                                }
                                if (Control == 2)
                                {
                                    GC.MyChar.RemoveItem(GC.MyChar.NextItem(710018));
                                    GC.MyChar.AddItem(710013);
                                }
                                break;
                            #endregion
                            #region Water Guard
                            case 9538:
                            {
                                GC.MyChar.ADJob = "Water";
                                if (GC.MyChar.InventoryContains(710019, 1))
                                {
                                    GC.AddSend(Packets.NPCSay("Since you have passed the test and obtained the " + GC.MyChar.ADJob + " Cert., I will give you the " + GC.MyChar.ADJob + " Amulet."));
                                    GC.AddSend(Packets.NPCLink("Thanks.", 2));
                                    GC.AddSend(Packets.NPCSetFace(30));
                                    GC.AddSend(Packets.NPCFinish());
                                }
                                else
                                {
                                    GC.AddSend(Packets.NPCSay("To obtain the " + GC.MyChar.ADJob + " Amulet, you must enable PK mode to kill the " + GC.MyChar.ADJob + "Devil and give me the " + GC.MyChar.ADJob + " Cert. Are you ready?"));
                                    GC.AddSend(Packets.NPCLink("Yeah.", 1));
                                    GC.AddSend(Packets.NPCLink("Not yet.", 255));
                                    GC.AddSend(Packets.NPCSetFace(30));
                                    GC.AddSend(Packets.NPCFinish());
                                }
                            }
                            if (Control == 1)
                                {
                                    if (GC.MyChar.Job == 132 || GC.MyChar.Job == 133 || GC.MyChar.Job == 134 || GC.MyChar.Job == 135)
                                    {
                                        GC.MyChar.Teleport(1082, 168, 295);
                                    }
                                    else
                                    {
                                        GC.AddSend(Packets.NPCSay("Sorry, only a " + GC.MyChar.ADJob + " can challenge this test."));
                                        GC.AddSend(Packets.NPCLink("I see.", 255));
                                        GC.AddSend(Packets.NPCSetFace(30));
                                        GC.AddSend(Packets.NPCFinish());
                                    }
                                }
                                if (Control == 2)
                                {
                                    GC.MyChar.RemoveItem(GC.MyChar.NextItem(710019));
                                    GC.MyChar.AddItem(710014);
                                }
                                break;
                            #endregion
                            #region Archer Guard
                            case 9539:
                            {
                                GC.MyChar.ADJob = "Archer";
                                if (GC.MyChar.InventoryContains(710020, 1))
                                {
                                    GC.AddSend(Packets.NPCSay("Since you have passed the test and obtained the " + GC.MyChar.ADJob + " Cert., I will give you the " + GC.MyChar.ADJob + " Amulet."));
                                    GC.AddSend(Packets.NPCLink("Thanks.", 2));
                                    GC.AddSend(Packets.NPCSetFace(30));
                                    GC.AddSend(Packets.NPCFinish());
                                }
                                else
                                {
                                    GC.AddSend(Packets.NPCSay("To obtain the " + GC.MyChar.ADJob + " Amulet, you must enable PK mode to kill the " + GC.MyChar.ADJob + "Devil and give me the " + GC.MyChar.ADJob + " Cert. Are you ready?"));
                                    GC.AddSend(Packets.NPCLink("Yeah.", 1));
                                    GC.AddSend(Packets.NPCLink("Not yet.", 255));
                                    GC.AddSend(Packets.NPCSetFace(30));
                                    GC.AddSend(Packets.NPCFinish());
                                }
                            }
                            if (Control == 1)
                                {
                                    if (GC.MyChar.Job == 40 || GC.MyChar.Job == 41 || GC.MyChar.Job == 42 || GC.MyChar.Job == 43 || GC.MyChar.Job == 44 || GC.MyChar.Job == 45)
                                    {
                                        GC.MyChar.Teleport(1082, 323, 302);
                                    }
                                    else
                                    {
                                        GC.AddSend(Packets.NPCSay("Sorry, only a " + GC.MyChar.ADJob + " can challenge this test."));
                                        GC.AddSend(Packets.NPCLink("I see.", 255));
                                        GC.AddSend(Packets.NPCSetFace(30));
                                        GC.AddSend(Packets.NPCFinish());
                                    }
                                }
                                if (Control == 2)
                                {
                                    GC.MyChar.RemoveItem(GC.MyChar.NextItem(710020));
                                    GC.MyChar.AddItem(710015);
                                }
                                break;
                            #endregion
                            #region Warrior Guard
                            case 9540:
                            {
                                GC.MyChar.ADJob = "Warrior";
                                if (GC.MyChar.InventoryContains(710016, 1))
                                {
                                    GC.AddSend(Packets.NPCSay("Since you have passed the test and obtained the " + GC.MyChar.ADJob + " Cert., I will give you the " + GC.MyChar.ADJob + " Amulet."));
                                    GC.AddSend(Packets.NPCLink("Thanks.", 2));
                                    GC.AddSend(Packets.NPCSetFace(30));
                                    GC.AddSend(Packets.NPCFinish());
                                }
                                else
                                {
                                    GC.AddSend(Packets.NPCSay("To obtain the " + GC.MyChar.ADJob + " Amulet, you must enable PK mode to kill the " + GC.MyChar.ADJob + "Devil and give me the " + GC.MyChar.ADJob + " Cert. Are you ready?"));
                                    GC.AddSend(Packets.NPCLink("Yeah.", 1));
                                    GC.AddSend(Packets.NPCLink("Not yet.", 255));
                                    GC.AddSend(Packets.NPCSetFace(30));
                                    GC.AddSend(Packets.NPCFinish());
                                }
                            }
                                if (Control == 1)
                                {
                                    if (GC.MyChar.Job == 20 || GC.MyChar.Job == 21 || GC.MyChar.Job == 22 || GC.MyChar.Job == 23 || GC.MyChar.Job == 24 || GC.MyChar.Job == 25)
                                    {
                                        GC.MyChar.Teleport(1082, 168, 295);
                                    }
                                    else
                                    {
                                        GC.AddSend(Packets.NPCSay("Sorry, only a " + GC.MyChar.ADJob + " can challenge this test."));
                                        GC.AddSend(Packets.NPCLink("I see.", 255));
                                        GC.AddSend(Packets.NPCSetFace(30));
                                        GC.AddSend(Packets.NPCFinish());
                                    }
                                }
                                if (Control == 2)
                                {
                                    GC.MyChar.RemoveItem(GC.MyChar.NextItem(710016));
                                    GC.MyChar.AddItem(710011);
                                }
                        break;
                        #endregion
press +thanks if this helped you in any way, even an idea!
if U find a thread with a 5165 converted version please tell me so I can give the full credits to the owner or request a close...anywas again, ENJOY!

EDIT: ADDED Mob drops! still working on spawns and infos...plz give me time as i am a noob at coding XD
02/28/2010 22:06 walmartboi#2
Even though I'm not gonna use this, good job. Just to let you know, you didn't code the monster drops, spawns, or mob info for the AD quest. lol.
02/28/2010 22:09 Decker_#3
Yeah, we need mobspawns and mobinfo :D
02/28/2010 22:16 killersub#4
Quote:
Originally Posted by walmartboi View Post
Even though I'm not gonna use this, good job. Just to let you know, you didn't code the monster drops, spawns, or mob info for the AD quest. lol.
Like I said at the top lol? I was in a hurry and I wasn't going to mess around with shit if I dunno wat I'm doing lmao...anyways I'll get started on dat in a lil bit...

Quote:
Originally Posted by Decker_ View Post
Yeah, we need mobspawns and mobinfo :D
what I told him :D
02/28/2010 22:23 ramix#5
good release bro

you have little erros

Quote:
public string ADJob "";
fixed is

Quote:
public string ADJob = "";
and

Quote:
GC.MyChar.RemoveItem(GC.MyChar.ItemNext
fixed is

Quote:
GC.MyChar.RemoveItem(GC.MyChar.NextItem
keep it good work ;)
02/28/2010 22:32 killersub#6
Quote:
Originally Posted by ramix View Post
good release bro

you have little erros



fixed is



and



fixed is



keep it good work ;)
#UPDATED!
03/14/2010 12:48 Paralyzer[GM]#7
Anybody got the mobspawn then ?
03/14/2010 16:48 -Shunsui-#8
Insted of all that
Code:
if (GC.MyChar.Job == 20 || GC.MyChar.Job == 21 || GC.MyChar.Job == 22 || GC.MyChar.Job == 23 || GC.MyChar.Job == 24 || GC.MyChar.Job == 25)
why not do
Code:
if (GC.MyChar.Job >= 20 && GC.MyChar.Job <= 25)
03/14/2010 16:55 killersub#9
Quote:
Originally Posted by -Shunsui- View Post
Insted of all that
Code:
if (GC.MyChar.Job == 20 || GC.MyChar.Job == 21 || GC.MyChar.Job == 22 || GC.MyChar.Job == 23 || GC.MyChar.Job == 24 || GC.MyChar.Job == 25)
why not do
Code:
if (GC.MyChar.Job >= 20 && GC.MyChar.Job <= 25)
remember...dis is converted straight from lotf lol...meaning I have not touched it :D...
03/14/2010 18:50 coreymills#10
i'll work on the spawns and all if i have them done befor there released i'll release them
03/14/2010 21:04 killersub#11
Quote:
Originally Posted by coreymills View Post
i'll work on the spawns and all if i have them done befor there released i'll release them
dat will b appreciated lol...and thanks for da help! XD
04/11/2010 16:25 coreymills#12
Sorry it took so long but i've had other things to do but here are the spawns and a few fixes. i fixed up the npc's alittle more when u had the cert it still did not take it or anything
put this is NPCDialog.cs
put this in MobInfos.txt
Quote:
8417 TrojanDevil 1 205 70 9436 700 0 0 420 396 1 2 2 True 10 100 1000 200 12 False
8418 WarriorDevil 1 205 70 23588 700 0 0 650 700 1 2 2 True 10 100 1000 200 12 False
8419 WaterDevil 1 205 70 38550 65000 0 91 0 0 2 2 21 1001 3 True 12 100 1000 500 12 False
8888 FireDevil 1 205 70 38550 65000 0 182 0 0 2 2 21 1002 3 True 15 100 1000 500 12 False
8421 ArcherDevil 1 205 70 33964 700 0 0 470 500 1 2 2 True 10 100 1000 200 12 False
then in MobSpawns.txt put this
Quote:
8417 3 1082 77 165 83 171
8888 4 1082 283 162 291 171
8419 4 1082 160 279 169 288
8421 4 1082 315 298 321 304
8418 4 1082 164 75 171 83
in Portals.txt add this
Quote:
1082 099 171 1082 191 230
1082 272 176 1082 191 230
1082 182 281 1082 191 230
1082 308 283 1082 191 230
1082 170 099 1082 191 230
the mibs were dropping the wrong items goback to the mob drops and replace them with this
i have the drops set at 50 for testing perposes u can set it to wat ever u want
sorry but i dont know how to make the AncientDevil Spawn
04/12/2010 12:22 Paralyzer[GM]#13
Hey, what is it in NPCs.txt ?
04/12/2010 13:56 -NewDawn-#14
Why are you using a second job title in character.cs?
Why not just use GC.MyChar.Job and have the guards check for it before they enter the specialized class zones? I really don't see a point in it.

If you really want to save time, why don't you make a statement at the top of NPCDialog.cs that reads the job number and then spits out the String of the job title? Then you could use it for all of the NPC Dialogs.
03/23/2012 04:16 awesome100able#15
I don`t even think there is a 5165 Source yet that is working without Any bugs.

______________________

5165=Fail Unless its edited alot. Like my friends Source Maced5165 its a good one here is what it includes and, IF elitepvpers is lucky he might even release it.
He is releasing it on 5CoBotter 5cobotters.forumbuild.com <-- there

His source details:

Max + 15
Max +14 stone (It still will let u get the gear +15)
3 rebirth
About 3-4 bugs (I will fix them if i get the release o.o)
There is monk but there is bug once ur level 137 u will auto get level 200
Max level 200
Ninja (Finnaly he made it full working)
Terato dragon (But it dies in 1 hit he could not fix it...)
FrozenGrotto ( Wont let u get out unless u use tc scroll)
It could (PROBALY) be known as #1 most edited 5165 source...
toke him like 8 months to make it hes not that GOOD of a C# coder but he can pretty much code anything TAkes him some time....
More details:

Tower/Fan (Upgrade all the way to level 200)
Level 175 wepons and gears..
HE has his own client u will be lucky if u find it... he hasent uploaded it but yeaah..
There is one problem with the source though It only works on NON-HAMACHI hamachi
will not work for this and its hosted on NewestCOServer if u don not mind