[Release]5165 MagicGates

01/28/2010 21:23 Olodady#1
This is the code for the MagicGate:
Code:
723071 MagicGate 0 0 0 0 0 0 0 0 0 0 0 7521750 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 QuestItem Teleport~to~any~city 5
Take the number "723071"
Open Character.cs or Characters.cs
And add this:
Code:
                    #region MagicGates
                    case 723071:
                        {
                            if (Loc.Map != 6000 && Loc.Map != 6001)
                            {
                                Teleport(1009, 22, 23);
                                RemoveItem(I);
                            }
                            else
                                MyClient.LocalMessage(2005, "Cannot use teleport scrolls in jail.");
                            break;
                        }

                    #endregion
That is the scroll
Now for the NPC open NPC.txt in OldCODB
Scroll it to the bottom
And type this:
Code:
999999966 60 2 0 1009 27 15
After you done that Open NPCDialog.cs and type this:
Code:
                            #region MagicGateNPC
                            case 999999966:
                                {
                                    if (Control == 0)
                                    {
                                        GC.AddSend(Packets.NPCSay("Hey want me to teleport you to somewhere?"));
                                        GC.AddSend(Packets.NPCLink("Twin City", 1));
                                        GC.AddSend(Packets.NPCLink("Phoenix Castle", 2));
                                        GC.AddSend(Packets.NPCLink("Ape City", 3));
                                        GC.AddSend(Packets.NPCLink("Desert City", 4));
                                        GC.AddSend(Packets.NPCLink("Bird Island", 5));
                                        GC.AddSend(Packets.NPCLink("Market", 6));
                                        GC.AddSend(Packets.NPCLink("Just passing by.", 255));
                                        GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                        GC.AddSend(Packets.NPCFinish());
                                    }
                                    else if (GC.MyChar.Silvers >= 100)
                                    {
                                        if (Control == 1) GC.MyChar.Teleport(1002, 429, 379);
                                        if (Control == 2) GC.MyChar.Teleport(1011, 188, 264);
                                        if (Control == 3) GC.MyChar.Teleport(1020, 565, 562);
                                        if (Control == 4) GC.MyChar.Teleport(1000, 500, 650);
                                        if (Control == 5) GC.MyChar.Teleport(1015, 717, 571);
                                        if (Control == 6) GC.MyChar.Teleport(1036, 211, 196);
                                    }
                                    else
                                    {
                                        GC.AddSend(Packets.NPCSay("."));
                                        GC.AddSend(Packets.NPCLink("I see.", 255));
                                        GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                        GC.AddSend(Packets.NPCFinish());
                                    }
                                    break;
                                }
                            #endregion
Press F5
Enjoy
Leave a reply if I forgot something
Credits for inspiration to pro4never
01/29/2010 00:49 QuickCo#2
nice :) pro4never release that first for co emu :)
01/29/2010 11:56 Olodady#3
i know i just converted it to 5165 :)
04/28/2010 20:02 masternek#4
i have a problem, when i copy+paste the character.cs thing, it givesme alot of errors :x help please?
04/29/2010 06:19 Arcо#5
Quote:
Originally Posted by masternek View Post
i have a problem, when i copy+paste the character.cs thing, it givesme alot of errors :x help please?
What errors are you getting?
04/29/2010 13:42 pro4never#6
Wasn't this already converted by someone for 5165?

Regardless, decent job. Hopefully ppl enjoy it.

Could have sworn that it already got converted though O_O
05/14/2010 08:58 Arcо#7
Well p4n, he converted it first, I did second.
The difference between ours is his teleports you to an npc and mine brings up the dialog box upfront.
05/14/2010 14:29 LetsGo42#8
Whats a MagicGate?:o haha
05/14/2010 14:41 Arcо#9
Its a scroll that drops that takes you to any of the main cities you choose.
05/30/2010 17:22 masternek#10
Quote:
Originally Posted by .Arco View Post
What errors are you getting?

im getting this:


[Only registered and activated users can see links. Click Here To Register...]

Uploaded with [Only registered and activated users can see links. Click Here To Register...]
05/30/2010 19:26 pro4never#11
Quote:
Originally Posted by masternek View Post
im getting this:


[Only registered and activated users can see links. Click Here To Register...]

Uploaded with [Only registered and activated users can see links. Click Here To Register...]
You put the code in the wrong spot. Search for existing use item case numbers and paste under one of those... basically you are doing it wrong atm.
05/31/2010 08:51 sawickas#12
Quote:
Originally Posted by masternek View Post
im getting this:


[Only registered and activated users can see links. Click Here To Register...]

Uploaded with [Only registered and activated users can see links. Click Here To Register...]
Change case id
05/31/2010 18:36 pro4never#13
Quote:
Originally Posted by sawickas View Post
Change case id
.... no he doesn't....

He needs to move it up 1-2 }'s...

he put it at the very end AFTER the end of the switch statement that controls what item is being used. Therefor he gets errors related to the code he put in but also errors concerning the section after it because the { }'s do not match up.
06/01/2010 01:10 masternek#14
alright. ill try. :) in some secs ill put the answer xD, thx for try helpme
06/01/2010 01:18 masternek#15
alright. now i have 2 errors:


constant value "723071"cannot be comverted to ushort

and


the name "I" does not exist in the current context