[Request] Kill Counter in C# LOTF

10/30/2010 19:59 Alex0605#1
Can sum1 please tell me how to make a KILL COUNTER.... not COUNTERKILL....
I need it for like PKin ect kinda like in GuildWarScores please and thanks

for PowerSourceCo "Version 5017"
10/31/2010 03:40 pro4never#2
Umm why wouldn't you just code it yourself?

You want to record how many kills a player gets inside an event? in total? in one login?... Regardless it's fairly simple to do..

Setup a value (either server wide or just for the client)

eg: public int/uint/byte/ushort VariableName = 0;(depends on max value you want... uint is prob best as it is positive numbers with a LARGE range)

Then go to wherever your kill code is and run your conditions (eg: If(GC.MyChar.Map == XXX)

then just do

GC.MyChar.VariableName++;

or
Program.VariableName++;

depends on where you setup your value.


It's all very simple stuff to do really... if you want it for only inside an event then clear it (set back to 0) once finished... if you want it to be for character lifetime then simply save/load it from the database the same as any other variable the character has.


Honestly this is VERY simple stuff on a level of coding knowledge that EVERYONE looking to make a server should possess. If you do not then I suggest learning some programming before going any further.

Take a week or two to focus on learning proper programming in C# and then go back and look at where you are making your mistakes.