|
You last visited: Today at 04:01
Advertisement
Auto CP in Albetros Source 5517
Discussion on Auto CP in Albetros Source 5517 within the CO2 Private Server forum part of the Conquer Online 2 category.
03/08/2012, 13:07
|
#1
|
elite*gold: 0
Join Date: Dec 2011
Posts: 72
Received Thanks: 3
|
Auto CP in Albetros Source 5517
Okay so im alittle confused...I tryed changing so many settings and yet have to find the right one i cant seem to get the monsters to give cps. I went into monster.cs and i thought i found it but what i did there didnt work ether if anyone can help me id appreciate it. Im not asking to give me the answer im asking to help me point me in the right direction.
|
|
|
03/08/2012, 14:00
|
#2
|
elite*gold: 0
Join Date: Apr 2011
Posts: 105
Received Thanks: 9
|
find monster.cs
find DropItems(Entity killer) Method
and write (killer as Player).CP += CPVALUE;
|
|
|
03/08/2012, 14:40
|
#3
|
elite*gold: 0
Join Date: Dec 2011
Posts: 72
Received Thanks: 3
|
Okay i made it look like this still isnt working...
Code:
void DropItems(Entity killer)
{
if (killer is Player)
{
var role = (killer as Player).CP += CPVALUE;
#region CP Award
if (BaseMonster.Level / 3 > 0)
if (Level + 1 >= killer.Level && Calculations.Damage.PercentSuccess(100.0))
{
var cp = Kernel.RandomNext(1, 16);
if (cp > 15)
return;
role.SendMessage("SYSTEM", role.Name, "You received " + cp + " cps for killing a(n) " + BaseMonster.Name, uint.MaxValue, ChatType.System);
role.CP += (uint)(cp);
}
#endregion
|
|
|
03/08/2012, 15:27
|
#4
|
elite*gold: 0
Join Date: Apr 2011
Posts: 105
Received Thanks: 9
|
PHP Code:
void DropItems(Entity killer) { if (killer is Player) { var role = (killer as Player) #region CP Award if (BaseMonster.Level / 3 > 0) // and this can remove... or BaseMonster.Level > 3 if (Level + 1 >= killer.Level) //if you must be give...didn't add percentsuccess method { var cp = Kernel.RandomNext(1, 16); if (cp > 15) return; role.SendMessage("SYSTEM", role.Name, "You received " + cp + " cps for killing a(n) " + BaseMonster.Name, uint.MaxValue, ChatType.System); role.CP += (uint)(cp); } #endregion
if still not work .... please debug your project
|
|
|
03/08/2012, 15:58
|
#5
|
elite*gold: 0
Join Date: Dec 2011
Posts: 72
Received Thanks: 3
|
Okay it ******* me of iv tryed to debug and it just hates me lol you have team viewer mabe you can try and see what im missing
|
|
|
03/08/2012, 22:32
|
#6
|
elite*gold: 130
Join Date: Oct 2007
Posts: 1,655
Received Thanks: 705
|
you didnt add a part where there is a actual code of cps, so you basically link it to the randomnext.
try this
Quote:
void DropItems(Entity killer)
{
if (killer is Player)
{
var role = (killer as Player);
#region CP Award
if (BaseMonster.Level / 3 > 0)
if (Level + 1 >= killer.Level && Calculations.Damage.PercentSuccess(100.0))
{
pluscps = 20; // the amount of cps you want
var cp = Kernel.RandomNext(1, 16);
if (cp > 15)
return;
role.SendMessage("SYSTEM", role.Name, "You received " + pluscps + " cps for killing a(n) " + BaseMonster.Name, uint.MaxValue, ChatType.System);
role.CP += pluscps;
}
#endregion
|
|
|
|
03/08/2012, 22:56
|
#7
|
elite*gold: 0
Join Date: Dec 2011
Posts: 72
Received Thanks: 3
|
still isnt giving the cps ):
|
|
|
03/08/2012, 23:36
|
#8
|
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,379
|
You said you can't debug..
If you don't debug none of the changes you make will take effect. What is it saying when you try? What is giving an error?
Try breakpointing it to see if the code is ever run, etc.
Basic debugging/programming knowledge is REQUIRED to run a server. If you do not have those skills I suggest taking some time and learning them.
|
|
|
03/09/2012, 00:08
|
#9
|
elite*gold: 0
Join Date: Dec 2011
Posts: 72
Received Thanks: 3
|
Well im still learning on the debug part its the fact of just having to do it on my own i have yet to find a guide for the basic's on co.
All i need is for someone to show me the right way to debug it and im good to go iv got the basics down.
|
|
|
03/09/2012, 01:03
|
#10
|
elite*gold: 20
Join Date: Sep 2007
Posts: 1,767
Received Thanks: 1,746
|
Try this, it's using a lot of assumptions based on your own code you placed in. But the way you declared your "var" seems incorrect, again I can't be sure because I've not seen your code.
But either to prevent such things occurring you should stick with just casting rather than vars in my opinion they don't belong in C# being such a class/object driven class.
Code:
void DropItems(Entity killer)
{
if(killer is Player)
{
Player role;
uint cp;
role = (Player)killer;
if(Level > 3)
{
if(Level + 1 >= role.Level)
{
cp = Kernel.RandomNext(1,16);
role.SendMessage("SYSTEM", role.Name, "You received " + cp.ToString() + " cps for killing a(n) " + Name, uint.MaxValue, ChatType.System);
role.CP += cp;
}
}
}
}
|
|
|
03/09/2012, 01:23
|
#11
|
elite*gold: 0
Join Date: Dec 2011
Posts: 72
Received Thanks: 3
|
funhacker would you mind getting on team viewer? see where im messing up at?
msn:
|
|
|
03/09/2012, 02:17
|
#12
|
elite*gold: 0
Join Date: Oct 2008
Posts: 270
Received Thanks: 10
|
you need to remove the checks for the players level and the one about the base level.
|
|
|
03/09/2012, 02:21
|
#13
|
elite*gold: 0
Join Date: Dec 2011
Posts: 72
Received Thanks: 3
|
You mind getting on team viewer and giving a hand see whats going on?
|
|
|
03/10/2012, 05:39
|
#14
|
elite*gold: 0
Join Date: Oct 2008
Posts: 270
Received Thanks: 10
|
sorry but no. it's not hard look at the code. i got it working in like 3 seconds. remove the checks and it will work
|
|
|
03/10/2012, 06:51
|
#15
|
elite*gold: 0
Join Date: Dec 2011
Posts: 72
Received Thanks: 3
|
Thanks i got it working (:
#close
|
|
|
 |
|
Similar Threads
|
Albetros Source Register successful but not in db
03/08/2012 - CO2 Private Server - 6 Replies
When i register it says register seccessful but dont show in db? i trying App Server 2.6.0 Xampp 7.7.1 and Xampp 7.1.1 Any ideas
|
[Question]5518 Albetros Source
03/03/2012 - CO2 Private Server - 3 Replies
Hi guys!
As some of you guys know, I started on creating a Conquer P-server recently.. using Albetros Source (Thanks to Pro4never):handsdown:
But still I got lots to learn about creating a p-server :o
I got lots of Question and I hope lots of good guys help me out with it :)
I somehow manage to make it inside the game, but I encountered lots of things that arent working.:(
Question:
*How do I add Tower and Fan on Albetros Source and In-game?
*How do I remove the the Quest In-game?
|
[Question]How do i add a shop npc on albetros source?
03/01/2012 - CO2 Private Server - 1 Replies
how do i add a shop npc on albetros source and add items in it and manage the cps to buy with
and please i dont need the FAQ thread of it so no one should post it here.
waiting for the Answers.
#EDIT
ALSO HOW DO I make monsters drop cps this is kinda wierd cus this is a custom coded source but its super stable.
|
Need albetros source help ... Pro4ever[pls come here,thx]
02/17/2012 - CO2 Private Server - 1 Replies
iwant make 100+ static AIPlayer in market map or another map from database characters table when the user no in the game...
it mean the AIPlayer didn't do anything -_-~
how can i do ...
i read your code ... like duelist ....
can you teach me how to code -_-!
|
albetros source question!!!
01/30/2012 - CO2 Private Server - 3 Replies
ok ...
i only have one question ...
what is the IrcBot?
how can i use it fully ??
|
All times are GMT +1. The time now is 04:07.
|
|