|
You last visited: Today at 17:16
Advertisement
[Release]Simple,but useful-Luckytime Giver! 5165 source!
Discussion on [Release]Simple,but useful-Luckytime Giver! 5165 source! within the CO2 PServer Guides & Releases forum part of the CO2 Private Server category.
02/19/2010, 02:30
|
#1
|
elite*gold: 0
Join Date: May 2009
Posts: 884
Received Thanks: 211
|
[Release]Simple,but useful-Luckytime Giver! 5165 source!
well I kno it's pretty simple...but like I say In all my posts...I'm a newb ...I don't know if this has been released yet(post if it has) so I'll share it with you guys here...I intended this for the "newbies" to learn how to get a simple NPC to give a skill through the payment of 1k cps once they reach the 2nd rb state(available "ONCE" only)...
HERES THE CODE! ENJOY!
let's define our variables, etc...
in character.cs find
Quote:
public byte RebornSkill = 0;
|
and under it add
Quote:
public byte ClaimRBSkill = 0;
|
now for the NPC...
Code:
#region Bless(Luckytime)
case 6861:
{
if (Control == 0)
{
GC.AddSend(Packets.NPCSay("Welcome stranger! I have been noticing some young adventurers reborning all the time and not getting the LuckyTime they desire,"));
GC.AddSend(Packets.NPCSay(" I am here to help all those troubled conquerors with their LuckyTime problems!What do you say?"));
GC.AddSend(Packets.NPCLink("I want LuckyTime.", 1));
GC.AddSend(Packets.NPCLink("Maybe later.", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
if (Control == 1)
{
GC.AddSend(Packets.NPCSay("The LuckyTime ability helps those who have passed through such hard times by releasing their stress and allowing them to level up quicker than normal.You sure you want it?"));
GC.AddSend(Packets.NPCLink("Yes, Please.", 2));
GC.AddSend(Packets.NPCLink("No, I changed my mind.", 255));
GC.AddSend(Packets.NPCSetFace(15));
GC.AddSend(Packets.NPCFinish());
}
else if (GC.MyChar.Reborns < 2)
{
GC.AddSend(Packets.NPCSay("I'm sorry but you have not yet reached the 2nd reborn state. Please train harder."));
GC.AddSend(Packets.NPCLink("Sure will.", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
if (Control == 2)
{
if (GC.MyChar.CPs >= 1000)
if (GC.MyChar.ClaimRBSkill == 0)
{
GC.MyChar.CPs -= 1000;
GC.MyChar.RWSkill(new Game.Skill() { ID = 9876, Lvl = 0, Exp = 0 });
GC.AddSend(Packets.NPCSay("You have learned the skill LuckyTime! Congratulations!"));
GC.AddSend(Packets.NPCLink("Just what I needed!", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
else
{
GC.AddSend(Packets.NPCSay("You don't have a sufficent amount of CPs OR you have already learned this skill, Sorry!"));
GC.AddSend(Packets.NPCLink("I'll try harder.", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
}
break;
}
#endregion
+thanks if this helped you anyhow and if any ideas were given...
~Enjoy!
|
|
|
02/19/2010, 02:36
|
#2
|
elite*gold: 0
Join Date: Feb 2010
Posts: 480
Received Thanks: 207
|
Good job bro.
+k
|
|
|
02/19/2010, 02:38
|
#3
|
elite*gold: 40
Join Date: Feb 2010
Posts: 78
Received Thanks: 17
|
This is a ok release goodjob
|
|
|
02/19/2010, 02:40
|
#4
|
elite*gold: 0
Join Date: May 2009
Posts: 884
Received Thanks: 211
|
Quote:
Originally Posted by Decker_
Good job bro.
+k
|
thanks! i'm trying XD!
Quote:
Originally Posted by ArtOfWar
This is a ok release goodjob
|
as I said at the top so "NO-1" confuses this thread I said " SIMPLE but useful" so yea thanks for your post XD
|
|
|
02/19/2010, 11:12
|
#5
|
elite*gold: 0
Join Date: Oct 2009
Posts: 8,765
Received Thanks: 5,291
|
Hmm, instead of making an entire new definition, why not just do a check if the character has already learned the skill or not?
|
|
|
02/19/2010, 22:31
|
#6
|
elite*gold: 0
Join Date: May 2009
Posts: 884
Received Thanks: 211
|
Quote:
Originally Posted by .Arco
Hmm, instead of making an entire new definition, why not just do a check if the character has already learned the skill or not?
|
maybe cuz I don't have the brain of a genius and I'm probably known as a "noob" ? If I had known that wouldn't I have posted it along with the code XD, I'm a noob so "SORRY" :/...(don't take it personal just telling the truth XD)
|
|
|
02/20/2010, 04:07
|
#7
|
elite*gold: 20
Join Date: Dec 2006
Posts: 945
Received Thanks: 175
|
Or add it to when u get 2nd reborned
|
|
|
02/20/2010, 04:41
|
#8
|
elite*gold: 0
Join Date: May 2009
Posts: 884
Received Thanks: 211
|
Quote:
Originally Posted by hunterman01
Or add it to when u get 2nd reborned
|
that's the part I need help with since I'm a newb XD...
I know the code to add but I don't know where to add it lolz XD I think it's somewhere in character.cs but dunno exactly where ^^...
|
|
|
02/20/2010, 05:36
|
#9
|
elite*gold: 20
Join Date: Dec 2006
Posts: 945
Received Thanks: 175
|
Quote:
Originally Posted by killersub
that's the part I need help with since I'm a newb XD...
I know the code to add but I don't know where to add it lolz XD I think it's somewhere in character.cs but dunno exactly where ^^...
|
Since i do not feel like downloading the entire source
Paste the code here and ill tell you were to put it at
|
|
|
02/20/2010, 17:05
|
#10
|
elite*gold: 0
Join Date: May 2009
Posts: 884
Received Thanks: 211
|
Quote:
Originally Posted by hunterman01
Since i do not feel like downloading the entire source
Paste the code here and ill tell you were to put it at
|
nvm FIXED lol...I did .Arco's fixed rb script and I found where to put it at! anyways thanx for helping! XD
|
|
|
07/18/2010, 05:59
|
#11
|
elite*gold: 0
Join Date: Jul 2010
Posts: 23
Received Thanks: 3
|
Quote:
Originally Posted by killersub
well I kno it's pretty simple...but like I say In all my posts...I'm a newb ...I don't know if this has been released yet(post if it has) so I'll share it with you guys here...I intended this for the "newbies" to learn how to get a simple NPC to give a skill through the payment of 1k cps once they reach the 2nd rb state(available "ONCE" only)...
HERES THE CODE! ENJOY!
let's define our variables, etc...
in character.cs find
and under it add
now for the NPC...
Code:
#region Bless(Luckytime)
case 6861:
{
if (Control == 0)
{
GC.AddSend(Packets.NPCSay("Welcome stranger! I have been noticing some young adventurers reborning all the time and not getting the LuckyTime they desire,"));
GC.AddSend(Packets.NPCSay(" I am here to help all those troubled conquerors with their LuckyTime problems!What do you say?"));
GC.AddSend(Packets.NPCLink("I want LuckyTime.", 1));
GC.AddSend(Packets.NPCLink("Maybe later.", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
if (Control == 1)
{
GC.AddSend(Packets.NPCSay("The LuckyTime ability helps those who have passed through such hard times by releasing their stress and allowing them to level up quicker than normal.You sure you want it?"));
GC.AddSend(Packets.NPCLink("Yes, Please.", 2));
GC.AddSend(Packets.NPCLink("No, I changed my mind.", 255));
GC.AddSend(Packets.NPCSetFace(15));
GC.AddSend(Packets.NPCFinish());
}
else if (GC.MyChar.Reborns < 2)
{
GC.AddSend(Packets.NPCSay("I'm sorry but you have not yet reached the 2nd reborn state. Please train harder."));
GC.AddSend(Packets.NPCLink("Sure will.", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
if (Control == 2)
{
if (GC.MyChar.CPs >= 1000)
if (GC.MyChar.ClaimRBSkill == 0)
{
GC.MyChar.CPs -= 1000;
GC.MyChar.RWSkill(new Game.Skill() { ID = 9876, Lvl = 0, Exp = 0 });
GC.AddSend(Packets.NPCSay("You have learned the skill LuckyTime! Congratulations!"));
GC.AddSend(Packets.NPCLink("Just what I needed!", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
else
{
GC.AddSend(Packets.NPCSay("You don't have a sufficent amount of CPs OR you have already learned this skill, Sorry!"));
GC.AddSend(Packets.NPCLink("I'll try harder.", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
}
break;
}
#endregion
+thanks if this helped you anyhow and if any ideas were given...
~Enjoy!
|
bro, can i ask? where should i exactly put the code? i hav been in NPC.cs and i dunno where i put the code on it.
|
|
|
|
Similar Threads
|
[Very-Simple-Release]How to create Status in 5165!
06/10/2010 - CO2 PServer Guides & Releases - 11 Replies
Ok so this might be a basic release lol but someday I decided to fiddle around wit da server since ma internet was down and I'm currently getting a new one... ANYWAYS, this might or might not work depending on the results u get...but it worked for me lol...and plz DON'T spam/flame me...as YES I am still a newbie coder and will keep learning!
Alright so here is how we create more status signs...i.e. "GM" "PM" etc...
go to "Main>GameClient.cs" and find there:
public bool GM;
under it...
|
[Release] Simple Fix for Toxic fog 5165
03/05/2010 - CO2 PServer Guides & Releases - 10 Replies
Well as you all know gms/pms cannot use toxic fog here is the normal code
#region ToxicFog
if (!GC.GM)
if (GC.MyChar.Loc.Map != 1039)
{
#region Mobs
try
{
foreach (Game.Mob Mob in...
|
[HELP] 5165 Source simple error please help
03/01/2010 - CO2 Private Server - 1 Replies
Hello i have seen here a lot of guides, i make it step by step, a lot of times, and nothing, i have still this error:
http://img706.imageshack.us/img706/274/bladdn.jpg
My system configuration(and software what i installed):
C# - installed
Windows XP SP2
|
[Release] Simple regpage for the 5165
02/21/2010 - CO2 PServer Guides & Releases - 10 Replies
Well seen people asking for it, so i decided to edit and old regpage i had. This should work fine for the Source 5165 released wich was i belive developed by Tanel..
Thanks will be apreciated -.-
Simply put this in your WWW directory under appserver,
if your OldCODB is in a different place open up the file and edit
("AccountFilesPath", "C:\OldCODB\Users\\");
its not so perfect but it will do,
|
[REQUEST]Free Item Giver NPC for 5165
11/28/2009 - CO2 Private Server - 7 Replies
title.. and please could ya make the items +9 instead of +12. Thanks.
|
All times are GMT +2. The time now is 17:16.
|
|