Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

NPC rewarding Player.

Newbie Spellweaver
Joined
Sep 13, 2007
Messages
23
Reaction score
0
Hey, I need help over here. I am using ShadowCO source, and I need to make Reborn NPC give us something when we do reborn, like a DBScroll. So what I mean is how I make a NPC give you a item after you done something.

Oh, and how I make a NPC changing something for other ? Like you give 1 DB and he gives you 15kk...


Thanks in advance, Ruby.
 
Newbie Spellweaver
Joined
Aug 21, 2007
Messages
67
Reaction score
0
Hey, I need help over here. I am using ShadowCO source, and I need to make Reborn NPC give us something when we do reborn, like a DBScroll. So what I mean is how I make a NPC give you a item after you done something.

Oh, and how I make a NPC changing something for other ? Like you give 1 DB and he gives you 15kk...


Thanks in advance, Ruby.
At RB i can't help you because it will take me a lot but here it is how to make a NPC exchange a DB for 15kk:
This comes in NPCsay region
Code:
                        if (CurrentNPC == xxxxx) //npc id here(u have to create it in mysql/navicat)
                        {
                            SendPacket(General.MyPackets.NPCSay("I can exchange One DragonBall for 15 mil.Do you accept??"));
                            SendPacket(General.MyPackets.NPCLink("Yes", 1));
                            SendPacket(General.MyPackets.NPCLink("No", 255));
                            SendPacket(General.MyPackets.NPCSetFace(30));
                            SendPacket(General.MyPackets.NPCFinish());
                        }
This comes in NPCdo region
Code:
[SIZE=2][COLOR=#800000]
[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]if[/COLOR][/SIZE][SIZE=2][COLOR=#800000] (CurrentNPC == xxxxx) //npc id here(u have to create it in mysql/navicat)
{
[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]if[/COLOR][/SIZE][SIZE=2][COLOR=#800000] (Control == 1) //this is for the "Yes" button at npc say...
{
[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]if[/COLOR][/SIZE][SIZE=2][COLOR=#800000] (MyChar.InventoryContains(1088000, 1)) //check if ur character have one dragonball
{
MyChar.RemoveItem(MyChar.ItemNext(1088000));//remove the dragonball
MyChar.Silvers += 15000000;//get the money
[SIZE=2][COLOR=#800000]SendPacket([/COLOR][/SIZE][SIZE=2][COLOR=#2b91af]General[/COLOR][/SIZE][SIZE=2][COLOR=#800000].MyPackets.Vital(MyChar.UID, 4, MyChar.Silvers));//idk how to explain is just something to change ur money instantly,if this is not here it won't show u have 15kk more money until u relog...[/COLOR][/SIZE]
[SIZE=2][COLOR=#800000]}[/COLOR][/SIZE]
[SIZE=2][COLOR=#800000]}[/COLOR][/SIZE]
[SIZE=2][COLOR=#800000]}
[/COLOR][/SIZE][/COLOR][/SIZE]
 
Newbie Spellweaver
Joined
Sep 13, 2007
Messages
23
Reaction score
0
Thanks, Does it take too much time making NPC rewarding you ? :S

Thanks for the NPC giving 15kk.. How I make the NPC like exchanging money for cps ?
 
Newbie Spellweaver
Joined
Aug 21, 2007
Messages
67
Reaction score
0
Thanks, Does it take too much time making NPC rewarding you ? :S

Thanks for the NPC giving 15kk.. How I make the NPC like exchanging money for cps ?
Nope it doesn't take a lot of time but i wrtoe too much at RB to get SDG,SPG,SRG and i forgto it:p...With money to cps easy to:
NPC say region:
Code:
[SIZE=2][COLOR=#800000]
[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]if[/COLOR][/SIZE][SIZE=2][COLOR=#800000] (CurrentNPC == xxxxxx)
{
SendPacket([/COLOR][/SIZE][SIZE=2][COLOR=#2b91af]General[/COLOR][/SIZE][SIZE=2][COLOR=#800000].MyPackets.NPCSay([/COLOR][/SIZE][SIZE=2][COLOR=#a31515]"I can exchange 200,000 silvers into 20 cps and 2,000,000 silvers into 200 cps. Do you want to trade?"[/COLOR][/SIZE][SIZE=2][COLOR=#800000]));
SendPacket([/COLOR][/SIZE][SIZE=2][COLOR=#2b91af]General[/COLOR][/SIZE][SIZE=2][COLOR=#800000].MyPackets.NPCLink([/COLOR][/SIZE][SIZE=2][COLOR=#a31515]"200k to 20 cps"[/COLOR][/SIZE][SIZE=2][COLOR=#800000], 1));
SendPacket([/COLOR][/SIZE][SIZE=2][COLOR=#2b91af]General[/COLOR][/SIZE][SIZE=2][COLOR=#800000].MyPackets.NPCLink([/COLOR][/SIZE][SIZE=2][COLOR=#a31515]"2 mil to 200 cps"[/COLOR][/SIZE][SIZE=2][COLOR=#800000], 2));
SendPacket([/COLOR][/SIZE][SIZE=2][COLOR=#2b91af]General[/COLOR][/SIZE][SIZE=2][COLOR=#800000].MyPackets.NPCLink([/COLOR][/SIZE][SIZE=2][COLOR=#a31515]"No"[/COLOR][/SIZE][SIZE=2][COLOR=#800000], 255));
SendPacket([/COLOR][/SIZE][SIZE=2][COLOR=#2b91af]General[/COLOR][/SIZE][SIZE=2][COLOR=#800000].MyPackets.NPCSetFace(30));
SendPacket([/COLOR][/SIZE][SIZE=2][COLOR=#2b91af]General[/COLOR][/SIZE][SIZE=2][COLOR=#800000].MyPackets.NPCFinish());
}
[/COLOR][/SIZE]
NPC do region:
Code:
[SIZE=2][COLOR=#800000]
[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]if[/COLOR][/SIZE][SIZE=2][COLOR=#800000] (CurrentNPC == xxxxxx)
{
[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]if[/COLOR][/SIZE][SIZE=2][COLOR=#800000] (Control == 1)
{
[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]if[/COLOR][/SIZE][SIZE=2][COLOR=#800000] (MyChar.Silvers >= 200000)
{
MyChar.Silvers -= 200000;
MyChar.CPs += 20;
SendPacket([/COLOR][/SIZE][SIZE=2][COLOR=#2b91af]General[/COLOR][/SIZE][SIZE=2][COLOR=#800000].MyPackets.Vital(MyChar.UID, 4, MyChar.Silvers));
SendPacket([/COLOR][/SIZE][SIZE=2][COLOR=#2b91af]General[/COLOR][/SIZE][SIZE=2][COLOR=#800000].MyPackets.Vital(MyChar.UID, 30, MyChar.CPs));
}
[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]else
[/COLOR][/SIZE][SIZE=2][COLOR=#800000]{
SendPacket([/COLOR][/SIZE][SIZE=2][COLOR=#2b91af]General[/COLOR][/SIZE][SIZE=2][COLOR=#800000].MyPackets.NPCSay([/COLOR][/SIZE][SIZE=2][COLOR=#a31515]"You don't have enough Money."[/COLOR][/SIZE][SIZE=2][COLOR=#800000]));
SendPacket([/COLOR][/SIZE][SIZE=2][COLOR=#2b91af]General[/COLOR][/SIZE][SIZE=2][COLOR=#800000].MyPackets.NPCLink([/COLOR][/SIZE][SIZE=2][COLOR=#a31515]"Damn."[/COLOR][/SIZE][SIZE=2][COLOR=#800000], 255));
SendPacket([/COLOR][/SIZE][SIZE=2][COLOR=#2b91af]General[/COLOR][/SIZE][SIZE=2][COLOR=#800000].MyPackets.NPCSetFace(30));
SendPacket([/COLOR][/SIZE][SIZE=2][COLOR=#2b91af]General[/COLOR][/SIZE][SIZE=2][COLOR=#800000].MyPackets.NPCFinish());
}
}
[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]if[/COLOR][/SIZE][SIZE=2][COLOR=#800000] (Control == 2)
{
[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]if[/COLOR][/SIZE][SIZE=2][COLOR=#800000] (MyChar.Silvers >= 2000000)
{
MyChar.Silvers -= 2000000;
MyChar.CPs += 200;
SendPacket([/COLOR][/SIZE][SIZE=2][COLOR=#2b91af]General[/COLOR][/SIZE][SIZE=2][COLOR=#800000].MyPackets.Vital(MyChar.UID, 4, MyChar.Silvers));
SendPacket([/COLOR][/SIZE][SIZE=2][COLOR=#2b91af]General[/COLOR][/SIZE][SIZE=2][COLOR=#800000].MyPackets.Vital(MyChar.UID, 30, MyChar.CPs));
}
[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]else
[/COLOR][/SIZE][SIZE=2][COLOR=#800000]{
SendPacket([/COLOR][/SIZE][SIZE=2][COLOR=#2b91af]General[/COLOR][/SIZE][SIZE=2][COLOR=#800000].MyPackets.NPCSay([/COLOR][/SIZE][SIZE=2][COLOR=#a31515]"You don't have enough Money."[/COLOR][/SIZE][SIZE=2][COLOR=#800000]));
SendPacket([/COLOR][/SIZE][SIZE=2][COLOR=#2b91af]General[/COLOR][/SIZE][SIZE=2][COLOR=#800000].MyPackets.NPCLink([/COLOR][/SIZE][SIZE=2][COLOR=#a31515]"Damn."[/COLOR][/SIZE][SIZE=2][COLOR=#800000], 255));
SendPacket([/COLOR][/SIZE][SIZE=2][COLOR=#2b91af]General[/COLOR][/SIZE][SIZE=2][COLOR=#800000].MyPackets.NPCSetFace(30));
SendPacket([/COLOR][/SIZE][SIZE=2][COLOR=#2b91af]General[/COLOR][/SIZE][SIZE=2][COLOR=#800000].MyPackets.NPCFinish());
}
}
}
[/COLOR][/SIZE]
 
Newbie Spellweaver
Joined
Sep 13, 2007
Messages
23
Reaction score
0
Thanks..

How I do a NPC teleport me to a place, but to do that, I need to be lvl 100 and have give 200 cps to get teleported ?
 
Newbie Spellweaver
Joined
Aug 21, 2007
Messages
67
Reaction score
0
Thanks..

How I do a NPC teleport me to a place, but to do that, I need to be lvl 100 and have give 200 cps to get teleported ?
NPC say region:
Code:
[SIZE=2][COLOR=#800000]
[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]if[/COLOR][/SIZE][SIZE=2][COLOR=#800000] (CurrentNPC == xxxxxx)
{
SendPacket([/COLOR][/SIZE][SIZE=2][COLOR=#2b91af]General[/COLOR][/SIZE][SIZE=2][COLOR=#800000].MyPackets.NPCSay([/COLOR][/SIZE][SIZE=2][COLOR=#a31515]"I can take you to visit the x place, but you have to be lvl 100. The fee will be 200 CPS. Do you accept?"[/COLOR][/SIZE][SIZE=2][COLOR=#800000]));
SendPacket([/COLOR][/SIZE][SIZE=2][COLOR=#2b91af]General[/COLOR][/SIZE][SIZE=2][COLOR=#800000].MyPackets.NPCLink([/COLOR][/SIZE][SIZE=2][COLOR=#a31515]"Yes"[/COLOR][/SIZE][SIZE=2][COLOR=#800000], 1));
SendPacket([/COLOR][/SIZE][SIZE=2][COLOR=#2b91af]General[/COLOR][/SIZE][SIZE=2][COLOR=#800000].MyPackets.NPCLink([/COLOR][/SIZE][SIZE=2][COLOR=#a31515]"No"[/COLOR][/SIZE][SIZE=2][COLOR=#800000], 255));
SendPacket([/COLOR][/SIZE][SIZE=2][COLOR=#2b91af]General[/COLOR][/SIZE][SIZE=2][COLOR=#800000].MyPackets.NPCSetFace(30));
SendPacket([/COLOR][/SIZE][SIZE=2][COLOR=#2b91af]General[/COLOR][/SIZE][SIZE=2][COLOR=#800000].MyPackets.NPCFinish());
}
[/COLOR][/SIZE]
NPC do region
Code:
[SIZE=2][COLOR=#0000ff]if[/COLOR][/SIZE][SIZE=2][COLOR=#800000] (CurrentNPC == xxxxxx)
{
[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]if[/COLOR][/SIZE][SIZE=2][COLOR=#800000] (Control == 1)
{
[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]if[/COLOR][/SIZE][SIZE=2][COLOR=#800000] (MyChar.Level >= 100)
{
[SIZE=2][COLOR=#800000]MyChar.CPs -= 200;[/COLOR][/SIZE][SIZE=2][COLOR=#800000]
SendPacket([/COLOR][/SIZE][SIZE=2][COLOR=#2b91af]General[/COLOR][/SIZE][SIZE=2][COLOR=#800000].MyPackets.Vital(MyChar.UID, 30, MyChar.CPs));[/COLOR][/SIZE]
[SIZE=2][COLOR=#800000]MyChar.Teleport(mapid, x, y);//ex: MyChar.Teleport(1351, 250, 250) this will send you to lab
[/COLOR][/SIZE][SIZE=2][COLOR=#800000]}
[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]else
[/COLOR][/SIZE][SIZE=2][COLOR=#800000]{
SendPacket([/COLOR][/SIZE][SIZE=2][COLOR=#2b91af]General[/COLOR][/SIZE][SIZE=2][COLOR=#800000].MyPackets.NPCSay([/COLOR][/SIZE][SIZE=2][COLOR=#a31515]"You don't have enough CPS."[/COLOR][/SIZE][SIZE=2][COLOR=#800000]));
SendPacket([/COLOR][/SIZE][SIZE=2][COLOR=#2b91af]General[/COLOR][/SIZE][SIZE=2][COLOR=#800000].MyPackets.NPCLink([/COLOR][/SIZE][SIZE=2][COLOR=#a31515]"Damn."[/COLOR][/SIZE][SIZE=2][COLOR=#800000], 255));
SendPacket([/COLOR][/SIZE][SIZE=2][COLOR=#2b91af]General[/COLOR][/SIZE][SIZE=2][COLOR=#800000].MyPackets.NPCSetFace(30));
SendPacket([/COLOR][/SIZE][SIZE=2][COLOR=#2b91af]General[/COLOR][/SIZE][SIZE=2][COLOR=#800000].MyPackets.NPCFinish());
}
[/COLOR][/SIZE][/COLOR][/SIZE]
I put map ids to help you with teleports.

 

Attachments

You must be registered for see attachments list
Back
Top