[REQUEST]Npc That switch silvers for cps.

07/19/2009 05:38 -Instinct#1
Hello, Well i need an npc that switches silvers for cps and cps for silvers.I made sure that searched before i posted this also advanced search but if theirs still a guide for it out their it will be greatly appreciated if you post it here for me xD And if i typo in anything sorry :/

Ty in Advance :D
07/19/2009 05:39 Pete1990#2
this isnt to flame you but code it your self npcs are the easy ones to even do.
07/19/2009 05:42 -Instinct#3
Quote:
Originally Posted by Pete1990 View Post
this isnt to flame you but code it your self npcs are the easy ones to even do.
I would but im learning as am going so if someone posts somthing i should learn from it.
07/19/2009 05:51 Pete1990#4
look at other npcs in ur source u will find one to look off of.
07/19/2009 05:58 -Instinct#5
Quote:
Originally Posted by Pete1990 View Post
look at other npcs in ur source u will find one to look off of.
Thx for the suggestion Pete but im still new to this so i need some help so yeah..
07/19/2009 06:10 f0am#6
Kk all you need is this


NPC Dialog
NPC Control
Send Packets for CPs
Checking CPs
If & Else for CP Checking
07/19/2009 06:11 12tails#7
take cpadmin and change the DB code for silver ....

and them put the cps u wnat and another things ^^
07/19/2009 06:12 hunterman01#8
What source are you using if its coemu ill Give you a little bit but will not do the whole thing
07/19/2009 06:39 12tails#9
here is bro ( if is LOTF source )
Search for
if (CurrentNPC == 1010)
and above it add
Quote:
if (CurrentNPC == 354784)
{
SendPacket(General.MyPackets.NPCSay("Text"));
SendPacket(General.MyPackets.NPCLink("CPS", 1));
SendPacket(General.MyPackets.NPCLink("No money.", 255));
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCFinish());
}
them search for: if (CurrentNPC == 1010) again... it must take you to the npc controls....them add it above: if (CurrentNPC == 1010)

Quote:
if (CurrentNPC == 354784)
{
if (MyChar.Silvers >= the ammount u wan't to remove gold from inventory to take cps u wan't to)
{
MyChar.Silvers -= the same value as u put before;
MyChar.CPs += the cpos u wan't to take whith it;
SendPacket(General.MyPackets.Vital(MyChar.UID, 4, MyChar.Silvers));
SendPacket(General.MyPackets.Vital(MyChar.UID, 30, MyChar.CPs));
}
}
if i'm wrong in something.... post it.... but i tryed and works fine
07/19/2009 06:40 f0am#10
Here....As requested on MSN

*EDITED FIXED

Code:
                            #region Trader
                            if (CurrentNPC == 1200)
                            {
                                SendPacket(General.MyPackets.NPCSay("Hey kid, Want to trade?"));
                                SendPacket(General.MyPackets.NPCLink("CPs for Silvers", 1));
                                SendPacket(General.MyPackets.NPCLink("Silvers for CPs", 2));
                                SendPacket(General.MyPackets.NPCLink("Bak Off BiTch!", 255));
                                SendPacket(General.MyPackets.NPCSetFace(30));
                                SendPacket(General.MyPackets.NPCFinish());
                            }
                            #endregion
Code:
#region Trader

                            if (CurrentNPC == 1200)
                            {
                                if (Control == 1)
                                {
                                    SendPacket(General.MyPackets.NPCSay("Pick.."));
                                    SendPacket(General.MyPackets.NPCLink("500k Silvers [215]", 3));
                                    SendPacket(General.MyPackets.NPCLink("5M Silvers [2150]", 4));
                                    SendPacket(General.MyPackets.NPCLink("nVm!", 255));
                                    SendPacket(General.MyPackets.NPCSetFace(30));
                                    SendPacket(General.MyPackets.NPCFinish());
                                }
                                if (Control == 2)
                                {
                                    SendPacket(General.MyPackets.NPCSay("Pick.."));
                                    SendPacket(General.MyPackets.NPCLink("215 CPs [500k]", 5));
                                    SendPacket(General.MyPackets.NPCLink("2150 CPs [5M]", 6));
                                    SendPacket(General.MyPackets.NPCLink("nVm!", 255));
                                    SendPacket(General.MyPackets.NPCSetFace(30));
                                    SendPacket(General.MyPackets.NPCFinish());
                                }
                                if (Control == 3)
                                {
                                    if (MyChar.CPs >= 215)
                                    {
                                        MyChar.CPs -= 215;
                                        SendPacket(General.MyPackets.Vital((long)MyChar.UID, 30, MyChar.CPs));
                                        MyChar.Silvers += 500000;
                                        SendPacket(General.MyPackets.Vital((long)MyChar.UID, 4, MyChar.Silvers));
                                    }
                                    else
                                    {
                                        SendPacket(General.MyPackets.NPCSay("Get the hell out! Stupid Thief!"));
                                        SendPacket(General.MyPackets.NPCLink("Oh ShiT!", 255));
                                        SendPacket(General.MyPackets.NPCSetFace(30));
                                        SendPacket(General.MyPackets.NPCFinish());
                                    }
                                }
                                if (Control == 4)
                                {
                                    if (MyChar.CPs >= 2150)
                                    {
                                        MyChar.CPs -= 215;
                                        SendPacket(General.MyPackets.Vital((long)MyChar.UID, 30, MyChar.CPs));
                                        MyChar.Silvers += 5000000;
                                        SendPacket(General.MyPackets.Vital((long)MyChar.UID, 4, MyChar.Silvers));
                                    }
                                    else
                                    {
                                        SendPacket(General.MyPackets.NPCSay("Get the hell out! Stupid Thief!"));
                                        SendPacket(General.MyPackets.NPCLink("Oh ShiT!", 255));
                                        SendPacket(General.MyPackets.NPCSetFace(30));
                                        SendPacket(General.MyPackets.NPCFinish());
                                    }
                                }
                                if (Control == 5)
                                {
                                    if (MyChar.Silvers >= 500000)
                                    {
                                        MyChar.CPs += 215;
                                        SendPacket(General.MyPackets.Vital((long)MyChar.UID, 30, MyChar.CPs));
                                        MyChar.Silvers -= 500000;
                                        SendPacket(General.MyPackets.Vital((long)MyChar.UID, 4, MyChar.Silvers));
                                    }
                                    else
                                    {
                                        SendPacket(General.MyPackets.NPCSay("Get the hell out! Stupid Thief!"));
                                        SendPacket(General.MyPackets.NPCLink("Oh ShiT!", 255));
                                        SendPacket(General.MyPackets.NPCSetFace(30));
                                        SendPacket(General.MyPackets.NPCFinish());
                                    }
                                }
                                if (Control == 6)
                                {
                                    if (MyChar.Silvers >= 5000000)
                                    {
                                        MyChar.CPs += 2150;
                                        SendPacket(General.MyPackets.Vital((long)MyChar.UID, 30, MyChar.CPs));
                                        MyChar.Silvers -= 5000000;
                                        SendPacket(General.MyPackets.Vital((long)MyChar.UID, 4, MyChar.Silvers));
                                    }
                                    else
                                    {
                                        SendPacket(General.MyPackets.NPCSay("Get the hell out! Stupid Thief!"));
                                        SendPacket(General.MyPackets.NPCLink("Oh ShiT!", 255));
                                        SendPacket(General.MyPackets.NPCSetFace(30));
                                        SendPacket(General.MyPackets.NPCFinish());
                                    }
                                }

                            }

                            #endregion
07/19/2009 06:42 hunterman01#11
Honestly it is one of the easiest npcs out there 0.0
07/19/2009 06:43 xXxTwiztedKidxXx#12
Kk we got it thanks
#request Close
PS im with -instinct
07/19/2009 09:12 kinshi88#13
#Closed