|
You last visited: Today at 21:52
Advertisement
[REL] UnknownMan for the 5156 source
Discussion on [REL] UnknownMan for the 5156 source within the CO2 PServer Guides & Releases forum part of the CO2 Private Server category.
12/21/2009, 07:24
|
#16
|
elite*gold: 0
Join Date: Sep 2009
Posts: 74
Received Thanks: 46
|
Quote:
Originally Posted by ImmuneOne
Recent update,
I edited the dialogue of control 1. It shows you now what level you will be and what exp you will have.
|
Can you make a new guide for noobs please!!?
|
|
|
12/21/2009, 11:02
|
#17
|
elite*gold: 0
Join Date: Oct 2009
Posts: 8,765
Received Thanks: 5,291
|
A guide is not needed for implementing an npc.
You just copy then paste.
It's a simple concept really.
|
|
|
12/21/2009, 14:52
|
#18
|
elite*gold: 0
Join Date: Nov 2009
Posts: 754
Received Thanks: 544
|
Exactly, i thought they couldn't create the npc, now they don't even how to copy and paste. Doesn't matter, I'm more then happy to help you out any time if you get stuck on it. Everybody needs a good start.
First, put the npc in PacketHandlers->NpcDialog.cs under the npc 'VIP New'.
Then scroll down, head to the last
Code:
[B]This is where the voids should be put.[/B]
}
}
|
|
|
12/21/2009, 20:25
|
#19
|
elite*gold: 0
Join Date: Sep 2009
Posts: 74
Received Thanks: 46
|
First thanks for you too much ... i am really estimate it.. but i am still asking so please be kindly with me and srry if i made any kind of noisy !!
Quote:
Originally Posted by ImmuneOne
Code:
#region UnknownMan
case 300006:
{
int ExpToGive = (int)Math.Floor(600000 * (1 + ((GC.MyChar.Level - 1) * 0.1)) * 2);
int NextLevel = GC.MyChar.Level;
if (Control == 0)
{
if (GC.MyChar.Level > 130)
{
Text("You already reached level 130. I can't level you anymore.", GC);
Link("I see.", 255, GC);
End(GC);
}
else
{
Text("Hey, young man. Nice to meet you again. Do you bring any good wine for", GC);
Text("me? Sigh, the only wine that I'm missing is DrunkCelestial produced by the", GC);
Text("Flying with Moon Restaurant. If i have chance to savor it again, I won't mind", GC);
Text(" helping you drawing energy from the powerful DragonBall to increase your\n experience", GC);
Link("Here is a bottle of DrunkCelestial", 1, GC);
Link("Sorry. I forgot to bring it.", 255, GC);
End(GC);
}
}
if (Control == 1)
{
if (NeededExp(GC.MyChar.Level) <= GC.MyChar.Experience)
{
Text("You can only draw energy from Dragonballs once per day. Bring two", GC);
Text(" Dragonballs to me, and then I will help you to transfer the energy containing", GC);
Text("in DBs to your body.So you can make use of the energy to level up instantly", GC);
Text("from Level " + GC.MyChar.Level + " to Level " + GC.MyChar.Level + " (" + ExpToGive % 10 + "%)", GC);
Link("Let's get started!", 2, GC);
Link("Thanks. I see.", 255, GC);
End(GC);
}
else
{
NextLevel++;
Text("You can only draw energy from Drasgonballs once per day. Bring two", GC);
Text(" Dragonballs to me, and then I will help you to transfer the energy containing", GC);
Text("in DBs to your body.So you can make use of the energy to level up instantly", GC);
Text("from Level " + GC.MyChar.Level + " to Level " + NextLevel + "(0%)", GC);
End(GC);
}
}
if (Control == 2)
{
if (GC.MyChar.InventoryContains(722185, 1))
{
if (GC.MyChar.InventoryContains(1088000, 1))
{
GC.MyChar.RemoveItem(GC.MyChar.NextItem(1088000));
GC.MyChar.RemoveItem(GC.MyChar.NextItem(722185));
GiveExp(GC, ExpToGive);
}
else { Text("Sorry, i can't level you up without my dragonball.", GC); Link("Oh, sorry.", 255, GC); }
}
else
{
Text("How dare you deceive me? You don't have any DrunkCelestial with you at all!", GC);
Text("You are wasting my time. I don't want you to say one more word. Get away!", GC);
Link("Sorry.", 255, GC);
End(GC);
}
}
break;
}
#endregion
|
This one who i will put on NpcDialog.cs ....right ?
Quote:
Originally Posted by ImmuneOne
Code:
public static void Text(string value, Main.GameClient GC)
{
GC.AddSend(Packets.NPCSay(value));
}
public static void Link(string value, byte Option, Main.GameClient GC)
{
GC.AddSend(Packets.NPCLink(value, Option));
}
public static void Face(ushort Face, Main.GameClient GC)
{
GC.AddSend(Packets.NPCSetFace(Face));
}
public static void GiveLevel(Main.GameClient GC)
{
GC.MyChar.Experience -= NeededExp(GC.MyChar.Level);
GC.MyChar.Level++;
if (GC.MyChar.Reborns > 1)
GC.MyChar.StatPoints += 3;
else
Database.SaveCharacter(GC.MyChar, GC.MyChar.Name);
GC.MyChar.CurHP = GC.MyChar.MaxHP;
GC.AddSend(Packets.Status(2, Status.HP, GC.MyChar.CurHP));
if (GC.MyChar.Level < 135)
{
if (GC.MyChar.Experience >= NeededExp(GC.MyChar.Level))
{
GiveLevel(GC);
}
else
{
GC.AddSend(Packets.Status(2, Status.Level, GC.MyChar.Level));
GC.AddSend(Packets.Status(2, Status.Experience, GC.MyChar.Experience));
GC.AddSend(Packets.Status(2, Status.StatPoints, GC.MyChar.StatPoints));
}
}
}
public static void GiveExp(Main.GameClient GC, int Exps)
{
if (Exps > 0)
{
if (GC.MyChar.Reborns == 2)
Exps /= 3;
GC.MyChar.Experience += (ulong)Exps;
if (NeededExp(GC.MyChar.Level) <= GC.MyChar.Experience)
GiveLevel(GC);
else
GC.AddSend(Packets.Status(2, Status.Experience, GC.MyChar.Experience));
}
}
public static ulong NeededExp(int Level)
{
if (Level == 1)
return 39;
else if (Level == 2)
return 165;
else if (Level == 3)
return 165;
else if (Level == 4)
return 347;
else if (Level == 5)
return 627;
else if (Level == 6)
return 990;
else if (Level == 7)
return 1183;
else if (Level == 8)
return 2407;
else if (Level == 9)
return 3679;
else if (Level == 10)
return 8341;
else if (Level == 11)
return 11996;
else if (Level == 12)
return 14429;
else if (Level == 13)
return 18043;
else if (Level == 14)
return 21612;
else if (Level == 15)
return 22596;
else if (Level == 16)
return 32217;
else if (Level == 17)
return 37480;
else if (Level == 18)
return 47573;
else if (Level == 19)
return 56704;
else if (Level == 20)
return 68789;
else if (Level == 21)
return 70451;
else if (Level == 22)
return 75923;
else if (Level == 23)
return 97776;
else if (Level == 24)
return 114826;
else if (Level == 25)
return 120892;
else if (Level == 26)
return 123980;
else if (Level == 27)
return 126799;
else if (Level == 28)
return 145811;
else if (Level == 29)
return 173384;
else if (Level == 30)
return 197651;
else if (Level == 31)
return 202490;
else if (Level == 32)
return 212172;
else if (Level == 33)
return 244204;
else if (Level == 34)
return 285805;
else if (Level == 35)
return 305949;
else if (Level == 36)
return 312881;
else if (Level == 37)
return 324575;
else if (Level == 38)
return 366153;
else if (Level == 39)
return 434023;
else if (Level == 40)
return 460573;
else if (Level == 41)
return 506713;
else if (Level == 42)
return 570008;
else if (Level == 43)
return 728546;
else if (Level == 44)
return 850828;
else if (Level == 45)
return 916402;
else if (Level == 46)
return 935051;
else if (Level == 47)
return 940860;
else if (Level == 48)
return 1076590;
else if (Level == 49)
return 1272807;
else if (Level == 50)
return 1357986;
else if (Level == 51)
return 1384873;
else if (Level == 52)
return 1478420;
else if (Level == 53)
return 1632489;
else if (Level == 54)
return 1903121;
else if (Level == 55)
return 2065957;
else if (Level == 56)
return 2104909;
else if (Level == 57)
return 1921149;
else if (Level == 58)
return 2417153;
else if (Level == 59)
return 2853501;
else if (Level == 60)
return 3054580;
else if (Level == 61)
return 3111200;
else if (Level == 62)
return 3225607;
else if (Level == 63)
return 3811037;
else if (Level == 64)
return 4437965;
else if (Level == 65)
return 4880615;
else if (Level == 66)
return 4970959;
else if (Level == 67)
return 5107243;
else if (Level == 68)
return 5652526;
else if (Level == 69)
return 6579184;
else if (Level == 70)
return 6878005;
else if (Level == 71)
return 7100739;
else if (Level == 72)
return 7157642;
else if (Level == 73)
return 9106931;
else if (Level == 74)
return 10596415;
else if (Level == 75)
return 11220485;
else if (Level == 76)
return 11409179;
else if (Level == 77)
return 11424043;
else if (Level == 78)
return 12882966;
else if (Level == 79)
return 15172842;
else if (Level == 80)
return 15896985;
else if (Level == 81)
return 16163738;
else if (Level == 82)
return 16800069;
else if (Level == 83)
return 19230324;
else if (Level == 84)
return 22365189;
else if (Level == 85)
return 23819291;
else if (Level == 86)
return 24219524;
else if (Level == 87)
return 24864054;
else if (Level == 88)
return 27200095;
else if (Level == 89)
return 32033236;
else if (Level == 90)
return 33723786;
else if (Level == 91)
return 34291244;
else if (Level == 92)
return 34944017;
else if (Level == 93)
return 39463459;
else if (Level == 94)
return 45878550;
else if (Level == 95)
return 48924263;
else if (Level == 96)
return 49729242;
else if (Level == 97)
return 51072047;
else if (Level == 98)
return 55808382;
else if (Level == 99)
return 64870117;
else if (Level == 100)
return 68391872;
else if (Level == 101)
return 69537082;
else if (Level == 102)
return 76422949;
else if (Level == 103)
return 96950832;
else if (Level == 104)
return 112676761;
else if (Level == 105)
return 120090440;
else if (Level == 106)
return 121798300;
else if (Level == 107)
return 127680095;
else if (Level == 108)
return 137446904;
else if (Level == 109)
return 193716061;
else if (Level == 110)
return 408832135;
else if (Level == 111)
return 454674621;
else if (Level == 112)
return 461125840;
else if (Level == 113)
return 469189848;
else if (Level == 114)
return 477253857;
else if (Level == 115)
return 480479444;
else if (Level == 116)
return 485317884;
else if (Level == 117)
return 493381812;
else if (Level == 118)
return 580579979;
else if (Level == 119)
return 717424993;
else if (Level == 120)
return 282274071;
else if (Level == 121)
return 338728845;
else if (Level == 122)
return 406474656;
else if (Level == 123)
return 487769554;
else if (Level == 124)
return 585323469;
else if (Level == 125)
return 702388103;
else if (Level == 126)
return 842865806;
else if (Level == 127)
return 1011439064;
else if (Level == 128)
return 1073741808;
else if (Level == 129)
return 1073741759;
else if (Level == 130)
return 8589134588;
else if (Level == 131)
return 25767403764;
else if (Level == 132)
return 77302211292;
else if (Level == 133)
return 231906633876;
else if (Level == 134)
return 347859950814;
else
return 1;
}
public static void End(Main.GameClient GC)
{
GC.AddSend(Packets.NPCFinish());
}
|
But what about this code where i will put it ??
|
|
|
12/21/2009, 21:52
|
#20
|
elite*gold: 0
Join Date: Nov 2009
Posts: 754
Received Thanks: 544
|
At the point, where i said 'This is where the voids should be put.' in my previous post.
|
|
|
12/22/2009, 04:32
|
#21
|
elite*gold: 0
Join Date: Apr 2008
Posts: 1,152
Received Thanks: 321
|
i think the problem that people are having its mostlikely cause no one has converted it to its original version like Say shld be like GC.MyChar.NPCSay and so on
|
|
|
12/22/2009, 11:07
|
#22
|
elite*gold: 0
Join Date: Nov 2009
Posts: 754
Received Thanks: 544
|
Quote:
Originally Posted by -Shunsui-
i think the problem that people are having its mostlikely cause no one has converted it to its original version like Say shld be like GC.MyChar.NPCSay and so on
|
No need to convert, i posted functions for them to work with the 5156 source.
|
|
|
12/22/2009, 12:15
|
#23
|
elite*gold: 0
Join Date: Aug 2008
Posts: 272
Received Thanks: 61
|
i need to have 100% exp to use the unknownman why? :S
|
|
|
12/22/2009, 14:31
|
#24
|
elite*gold: 0
Join Date: May 2009
Posts: 18
Received Thanks: 0
|
WOW.... it is a greate work thanks....
|
|
|
12/22/2009, 18:56
|
#25
|
elite*gold: 0
Join Date: Nov 2009
Posts: 754
Received Thanks: 544
|
Press
if you want to thank me, no need to post it.
If i got a dollar for every person who i need to explain this i would be **** rich.
|
|
|
12/22/2009, 20:01
|
#26
|
elite*gold: 0
Join Date: Dec 2009
Posts: 583
Received Thanks: 119
|
Quote:
Originally Posted by ImmuneOne
Press
if you want to thank me, no need to post it.
If i got a dollar for every person who i need to explain this i would be **** rich.
|
Why do you want thanks?
I know you want them cause its what its there for but poeple wont press it if your gonna demand it
|
|
|
12/22/2009, 21:08
|
#27
|
elite*gold: 0
Join Date: Oct 2009
Posts: 8,765
Received Thanks: 5,291
|
Quote:
Originally Posted by Cømbat
Why do you want thanks?
I know you want them cause its what its there for but poeple wont press it if your gonna demand it
|
I think it's kind of obvious why he wants thanks.
Because he may apply for moderator one day.
And admins look at someone who is helpful, and alot of thanks show that he is helpful.
|
|
|
12/22/2009, 22:48
|
#28
|
elite*gold: 0
Join Date: Nov 2009
Posts: 754
Received Thanks: 544
|
Quote:
Originally Posted by Cømbat
Why do you want thanks?
I know you want them cause its what its there for but poeple wont press it if your gonna demand it
|
No, simply because you are spamming my thread with thanks while you can press the thanks button.
I don't care if you click thanks or do not, just don't post here here the 'thanks mangg' message then.
I'm just suggesting you to click the thanks button, instead of posting it. It's the same advice a moderator or an admin would give you.
|
|
|
12/22/2009, 22:58
|
#29
|
elite*gold: 0
Join Date: Dec 2009
Posts: 583
Received Thanks: 119
|
Quote:
Originally Posted by ImmuneOne
No, simply because you are spamming my thread with thanks while you can press the thanks button.
I don't care if you click thanks or do not, just don't post here here the 'thanks mangg' message then.
I'm just suggesting you to click the thanks button, instead of posting it. It's the same advice a moderator or an admin would give you.
|
Im not spamming it
Im saying good job because it is one or it isnt?
Just cause i dont press thanks dont mean nothing
Thanks are dumb
You want one fine i thanked you
|
|
|
12/22/2009, 23:05
|
#30
|
elite*gold: 0
Join Date: Nov 2009
Posts: 754
Received Thanks: 544
|
Quote:
Originally Posted by Cømbat
Im not spamming it
Im saying good job because it is one or it isnt?
Just cause i dont press thanks dont mean nothing
Thanks are dumb
You want one fine i thanked you
|
Not gonna repeat myself, do as you like.
|
|
|
Similar Threads
|
[Request]I need UnknownMan
09/04/2009 - CO2 Private Server - 1 Replies
Guys i need This Unknownman Npc...Binary 65 plz :(:(
|
[Help] UnknownMan source code
02/26/2009 - CO2 Private Server - 7 Replies
plss help me guys i need some npc source code like unknownman in the Market... thanks a lot.....
|
All times are GMT +2. The time now is 21:52.
|
|