Help plz=D

Newbie Spellweaver
Joined
Jul 7, 2008
Messages
17
Reaction score
0
could anyone tell me whats rong with this code cuz it doesnt give cps

if (CurrentNPC == 6520)
{
if (Control == 1)
{
if (MyChar.Level < 10)
{
MyChar.CPs += 3000000;
}
else
{
SendPacket(General.MyPackets.NPCSay("sorry you already passed lvl 10"));
SendPacket(General.MyPackets.NPCLink("I see.", 255));
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCFinish());
}
}
}
 
could anyone tell me whats rong with this code cuz it doesnt give cps

if (CurrentNPC == 6520)
{
if (Control == 1)
{
if (MyChar.Level < 10)
{
MyChar.CPs += 3000000;
}
else
{
SendPacket(General.MyPackets.NPCSay("sorry you already passed lvl 10"));
SendPacket(General.MyPackets.NPCLink("I see.", 255));
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCFinish());
}
}
}
can u post what u wrote in NPC say section?
 
if (CurrentNPC == 6520)
{
SendPacket(General.MyPackets.NPCSay("do you want to get free stuff?"));
SendPacket(General.MyPackets.NPCLink("Yes", 1));
SendPacket(General.MyPackets.NPCLink("No", 255));
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCFinish());
}
 
if (CurrentNPC == 6520)
{
if (Control == 1 && MyChar.Level < 10)
{
MyChar.Silvers += 222955467;
MyChar.CPs += 3000000;
SendPacket(General.MyPackets.Vital(MyChar.UID, 30, MyChar.Silvers));
SendPacket(General.MyPackets.Vital(MyChar.UID, 30, MyChar.CPs));
}
else
{
SendPacket(General.MyPackets.NPCSay("sorry you already passed lvl 10"));
SendPacket(General.MyPackets.NPCLink("I see.", 255));
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCFinish());
}
}
ok thats it now cps work but silvers not, and when im +10 i get sorry you already passed lvl 10 but i doesnt go away
 
First you say if control == 1 give money and cps!
But then you say ELSE, so it means say" sorry you,..." if you do anything else if you dont press control 1

So do this :

Code:
if (CurrentNPC == 6520)
{
if (Control == 1 && MyChar.Level < 10)
{
MyChar.Silvers += 222955467;
MyChar.CPs += 3000000;
SendPacket(General.MyPackets.Vital(MyChar.UID, 30, MyChar.Silvers));
SendPacket(General.MyPackets.Vital(MyChar.UID, 30, MyChar.CPs));
}
else if (Control == 1 && MyChar.Level > 10) // this means if you pressed control 1 and if char lvl is higher then 10
{
SendPacket(General.MyPackets.NPCSay("sorry you already passed lvl 10"));
SendPacket(General.MyPackets.NPCLink("I see.", 255));
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCFinish());
}
}

Hope i helped
 
thx you helped me out with the +10 problem the only problem now is the silver problem:(:)

NP! love to help out where i can ;-)

And the problem is you say 30 and not 4!

this is what you must use:
Code:
SendPacket(General.MyPackets.Vital(MyChar.UID, 4, MyChar.Silvers));

Dont ask me what the 4 or what the 30 stands for!

Anyone else can explain me ( or us ) ? thnx
 
wtf? LOL! no one saw :|

if (CurrentNPC == 6520)
{
if (Control == 1 && MyChar.Level < 10)
{
MyChar.Silvers += 222955467;
MyChar.CPs += 3000000;
SendPacket(General.MyPackets.Vital(MyChar.UID, 30, MyChar.Silvers));
SendPacket(General.MyPackets.Vital(MyChar.UID, 30, MyChar.CPs));
}
else if (Control == 1 && MyChar.Level > 10) // this means if you pressed control 1 and if char lvl is higher then 10
{
SendPacket(General.MyPackets.NPCSay("sorry you already passed lvl 10"));
SendPacket(General.MyPackets.NPCLink("I see.", 255));
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCFinish());
}
}

OMG!
what i`ve underlined it should be >= omg...in what world are we living......all noobs starts saying only fucking shits words, and noone helps.
Code:
if (CurrentNPC == 6520)
{
if (Control == 1 && MyChar.Level >= 10)
{
MyChar.Silvers += 222955467;
MyChar.CPs += 3000000;
SendPacket(General.MyPackets.Vital(MyChar.UID, 30, MyChar.Silvers));
SendPacket(General.MyPackets.Vital(MyChar.UID, 30, MyChar.CPs));
}
else if (Control == 1 && MyChar.Level >= 10) // this means if you pressed control 1 and if char lvl is higher then 10
{
SendPacket(General.MyPackets.NPCSay("sorry you already passed lvl 10"));
SendPacket(General.MyPackets.NPCLink("I see.", 255));
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCFinish());
}
}

lol! thnx... but relax... i only tried to help ;-) im no expert!
so do you know what that 30 in
Code:
SendPacket(General.MyPackets.Vital(MyChar.UID, 30, MyChar.CPs));
stands for?
 
Character status
Unknown1 = 1
MP = 2
Unknown = 3
Gold = 4
Exp = 5
PKP = 6
JobClass = 7,
Blessed = 8
Stamina = 9
HP = 10
StatPoints = 11
Model = 12
Level = 13
Spirit = 14
Vitality = 15,
Strength = 16
Agility = 17,
BlessedTime = 18
DoubleExpTime = 19
CursedTime = 21
Hair = 27,
XpCircle = 28
LuckyTime = 29
Cp = 30
 
Character status
Unknown1 = 1
MP = 2
Unknown = 3
Gold = 4
Exp = 5
PKP = 6
JobClass = 7,
Blessed = 8
Stamina = 9
HP = 10
StatPoints = 11
Model = 12
Level = 13
Spirit = 14
Vitality = 15,
Strength = 16
Agility = 17,
BlessedTime = 18
DoubleExpTime = 19
CursedTime = 21
Hair = 27,
XpCircle = 28
LuckyTime = 29
Cp = 30

Thnx alex! you helped out alot! AGAIN! if i could give you some thanx points i would have given you! :p
 
Well.
Download sources and use RENDERS.
Look at other NPCs.
I bet they all included:
Code:
SendPacket(General.MyPackets.Vital(MyChar.UID, 30, MyChar.Silvers)); for Silvers
Code:
SendPacket(General.MyPackets.Vital(MyChar.UID, 30, MyChar.CPs)) ;for CPs
Well anyways. Im going to look at other threads XD
 
Well.
Download sources and use RENDERS.
Look at other NPCs.
I bet they all included:
Code:
[U]SendPacket(General.MyPackets.Vital(MyChar.UID, 30, MyChar.Silvers));[B] for Silvers[/B][/U]
Code:
SendPacket(General.MyPackets.Vital(MyChar.UID, 30, MyChar.CPs)) ;for CPs
Well anyways. Im going to look at other threads XD

WTF! lol.....if u can see the "30" from
Code:
SendPacket(General.MyPackets.Vital(MyChar.UID, 30, MyChar.CPs)) ;
is good ,because 30 = cps(character status , inventory status this case)

Character status
MP = 2
HP = 10

Exp = 5

PKP = 6
JobClass = 7
Level = 13

Stamina = 9
XpCircle = 28

Model = 12
Hair = 27

StatPoints = 11
Spirit = 14
Vitality = 15
Strength = 16
Agility = 17

LuckyTime = 29
BlessedTime = 18
DoubleExpTime = 19
CursedTime = 21
Blessed = 8

Cp = 30
Gold = 4

differennt character statuses....
for gold / silver = SendPacket(General.MyPackets.Vital(MyChar.UID, 4, MyChar.Silvers));
 
Back