[Release]NPC To Change Jobs

02/15/2010 12:59 [GM]#1
iam a noob coder but here is my first steps in codeing

hope u guys like it


Code:
#region jobs changer
case 301552:
{
if (Control == 0)
{
GC.AddSend(Packets.NPCSay("Would you like to change your job only for its only for 1kk CPS"));
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", 4));
GC.AddSend(Packets.NPCLink("Warrior", 5));
GC.AddSend(Packets.NPCLink("Archer", 6));
GC.AddSend(Packets.NPCLink("WaterTaoist", 7));
GC.AddSend(Packets.NPCLink("FireTaoist", 8));
GC.AddSend(Packets.NPCLink("Ninja", 9));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());

}

else if (Control == 4)
{
if (GC.MyChar.CPs >= 1000000)
{
GC.MyChar.Job = 15;
GC.MyChar.CPs -= 1000000;
}
else
{
GC.AddSend(Packets.NPCSay("You don't have enough Cps."));
GC.AddSend(Packets.NPCLink("I see.", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
}
else if (Control == 5)
{
if (GC.MyChar.CPs >= 1000000)
{
GC.MyChar.Job = 25;
GC.MyChar.CPs -= 1000000;
}
else
{
GC.AddSend(Packets.NPCSay("You don't have enough Cps."));
GC.AddSend(Packets.NPCLink("I see.", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
}
else if (Control == 6)
{
if (GC.MyChar.CPs >= 1000000)
{
GC.MyChar.Job = 45;
GC.MyChar.CPs -= 1000000;
}
else
{
GC.AddSend(Packets.NPCSay("You don't have enough Cps."));
GC.AddSend(Packets.NPCLink("I see.", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
}
else if (Control == 7)
{
if (GC.MyChar.CPs >= 1000000)
{
GC.MyChar.Job = 135;
GC.MyChar.CPs -= 1000000;
}
else
{
GC.AddSend(Packets.NPCSay("You don't have enough Cps."));
GC.AddSend(Packets.NPCLink("I see.", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
}
else if (Control == 8)
{
if (GC.MyChar.CPs >= 1000000)
{
GC.MyChar.Job = 145;
GC.MyChar.CPs -= 1000000;
}
else
{
GC.AddSend(Packets.NPCSay("You don't have enough Cps."));
GC.AddSend(Packets.NPCLink("I see.", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
}
else if (Control == 9)
{
if (GC.MyChar.CPs >= 1000000)
{
GC.MyChar.Job = 55;
GC.MyChar.CPs -= 1000000;
}
else
{
GC.AddSend(Packets.NPCSay("You don't have enough Cps."));
GC.AddSend(Packets.NPCLink("I see.", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
}
break;
}
#endregion
02/15/2010 16:07 Decker_#2
good job, but I think something like this has already been released.
02/15/2010 17:57 [GM]#3
Quote:
Originally Posted by _Decker View Post
good job, but I think something like this has already been released.
oh i didn't see anything like this before
02/15/2010 19:46 [GM]#4
Quote:
Originally Posted by copz1337 View Post
Yeah look there is a similarity. But I don't care, if it means that much to you then forget I said anything. It's not a big deal. And yeah I'd suggest you fix the NPC because all it does is checks if you have the CPs, it doesn't remove them.


no it removes the cps try it yourself



#edit
_Decker i gave u a thanks cause u gave me a one lol
02/15/2010 19:51 copz1337#5
Quote:
Originally Posted by [GM] View Post
no it removes the cps try it yourself
#edit- ah alright now I noticed the negative sign in there, before the equal sign. my bad..

Code:
GC.MyChar.CPs [COLOR="Red"]-[/COLOR]= 1000000;
02/15/2010 20:10 killersub#6
Quote:
Originally Posted by copz1337 View Post
This has already been released. Reported.
roflmao...y u gonna report him for? he's just a newbie trying to learn C# give him a break bro...this thread is not breaking the rules whatsoever...next time if you don't have something nice to say don't say it at all...

@[GM] u did a nice job don't listen to the "pro's"...
02/15/2010 21:52 Arcо#7
Great to see other people learning c#.
Keep getting better bro!
02/15/2010 21:56 Decker_#8
I never said he stole, I thanked him. I just said something similiar like this has been released. But if he did code it hiself he did a good job, so I thank him for that! :D
02/15/2010 22:03 [GM]#9
Quote:
Originally Posted by .Arco View Post
Great to see other people learning c#.
Keep getting better bro!

.Arco u r my teacher i learnt alot from u


Quote:
Originally Posted by _Decker View Post
I never said he stole, I thanked him. I just said something similiar like this has been released. But if he did code it hiself he did a good job, so I thank him for that! :D

and i gave u a thanks too lol xD
02/15/2010 22:06 Korvacs#10
Cleaned.

Please dont spam an entire thread because something is similar to something else, if its a significant difference then it can stay, if its almost identical then it will be removed, thats it, instead of spamming this thread, report it, only one of you did so, yet alot of you felt the need to comment on it. I will happily look into things if they are reported, not if they are spammed.