[RELEASE]THE FIRST NPC I'VE EVER CODED!

02/25/2010 22:29 CompacticCo#31
Congrats on your first code, good luck!
02/26/2010 05:34 5supertao#32
Good job lil buddy.. xD Now twist it around so you understand it more.. xD
02/26/2010 10:20 .Ocularis#33
Quote:
Originally Posted by 12tails View Post
good...
but have a way to make it more simple.... for example:
Code:
#region
                            case 300002:
                                {
                                    if (Control == 0)
                                    {
                                        GC.AddSend(Packets.NPCSay("Would you like to change your job?"));
                                        GC.AddSend(Packets.NPCLink("Sure!", 1));
                                        GC.AddSend(Packets.NPCLink("No thanks.", 255));
                                        GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                        GC.AddSend(Packets.NPCFinish());
                                    }

                                    else if (Control == 1)
                                    {

                                        GC.AddSend(Packets.NPCSay("Alright choose the job."));
                                        GC.AddSend(Packets.NPCLink("Trojan", 15));
                                        GC.AddSend(Packets.NPCLink("Warrior", 25));
                                        GC.AddSend(Packets.NPCLink("Archer", 45));
                                        GC.AddSend(Packets.NPCLink("WaterTaoist", 135));
                                        GC.AddSend(Packets.NPCLink("FireTaoist", 145));
                                        GC.AddSend(Packets.NPCLink("Ninja", 55));
                                        GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                        GC.AddSend(Packets.NPCFinish());

                                    }

                                    else if (Control >= 15 && Control <= 145)
                                    {
                                        GC.MyChar.Job = Control;
                                    }
                                        break;
                                }
                            #endregion
it's just an example... : D
Why does this code make me think people from a certain country which seem to be the root of all evil would find a way to click on every npc in their view while they're clicking the job they want... by then their control would be 09372092374097 and would do something quite undesirable :s


This was a problem with many WoW servers... 'control' could be packet edited to crash the server because the control codes were used to change values... Bad idea :s


Which would open a new topic... for server security.
If WPE can do that. WPE can do that with ANY npc that gives out things such as cps.. or items
Perhaps that would be a good thing to figure a new way to patch that hack issue up...
02/26/2010 14:49 Korvacs#34
I address this earlier in the thread :)
02/27/2010 03:48 copz1337#35
LMFAO you people still giving feedback after like 2 months. :D
02/28/2010 17:09 arab4life#36
I got to say this.
Nice Job.