Since, I don't wanna spam question to the forum so i decided to put my questions here, and I hope someone will try to answer.
#1 StackItem - how stack item is coded? As I know, only pots like (vanilla, etc) are getting stacked together. How can I make the other stack-able item getting stacked together too? Like for examples: Meteors, EXP Pots, and etc.
#2 Weapon Accessory Time Limit - How do I add limit on a accessory for 7 days? Shall I create a column onto Item table? and name it as AccessorryLimit? How will the server know that the accessory is activated? and how it will know that it will expire?
[Please don't make any foolishness on my thread, Thank you]
#1 When you send an item packet there`s a value which contains the stack number.
#2 You should save the date, hour, everything when the accessory was activated, then compare that to the current server date.
Also, a heads up. People tend to use Environment.TickCount to measure the distance between two points in time in their servers. This is not good practice! Though it is okay in certain circumstances where the difference in time is less than, say, 3-4 weeks, any more than that and it will wrap around to a negative number and screw up your system. I recommend that it is avoided completely, short of checking the time between things inside the server itself, such as your last jump, attack, etc. Other than that, I recommend you use something like a unix epoch timestamp. As I've posted before, use these functions I've made, or something similar:
Code:
public static readonly DateTime Epoch = new DateTime(1970, 1, 1);
public static long Microtime()
{
return Convert.ToInt64((DateTime.UtcNow - Epoch).TotalMilliseconds);
}
public static long MilliSecondsSince(long UTS)
{
return (Microtime() - UTS);
}
public static long SecondsSince(long UTS)
{
return (Microtime() - UTS) / 1000;
}
public uint AccessoryTime
{
get { return BitConverter.ToUInt32(Buffer, 60); }
set { WriteUInt32(value, 60, Buffer); }
}
Try this ... about the stackitem .
the Class ConquerItemInformation is reading all items and its values which are placed in the file Database/items.txt in ur debg folder
Example for one item :
count started by Zero ... so zero is id = 1002020 one is name = Vanilla and so on ... the Stack size is 47 which is colord red ... i think u can change it either in the items.txt file .... or while reading in code ... example for the Dragonball :
StackSize = Convert.ToUInt16(data[47]);
if (ID == 1088000) StackSize = 10;
attention :do not take anything from me as a correct answer if you did not try it your self
I have already added the StackSize thingy, and it works like a charm
I'm currently doing some research about the AccessoryTime limit and the Refinery issue. Although, thanks for your concern.
I have already added the StackSize thingy, and it works like a charm
I'm currently doing some research about the AccessoryTime limit and the Refinery issue. Although, thanks for your concern.
Well once Sm1 Wear the Accessory Save this Time In ConquerItem Database and then if 7 days passed Item DisAppear
Well once Sm1 Wear the Accessory Save this Time In ConquerItem Database and then if 7 days passed Item DisAppear
If you want the thing to work properly, you should be able to see the amount of time left instead of making it just disappear after 7 days.
For the timer you could add 2 more rows to the table, 1 for when it starts and 1 for when it ends.
so you basically insert in the first when it got activated and at the second one 7 days later.
The time within could be used to show the amount of time left.
If you want the thing to work properly, you should be able to see the amount of time left instead of making it just disappear after 7 days.
For the timer you could add 2 more rows to the table, 1 for when it starts and 1 for when it ends.
so you basically insert in the first when it got activated and at the second one 7 days later.
The time within could be used to show the amount of time left.
well in impulse Source it Send the Remaining Time Through Difference bet Start time Stored in database and DateTime.Now.Sec or smthing like that
FLASH MINE |Oder| M14 LAND MINE 10/22/2010 - WarRock - 19 Replies Was ist besser Flash mine oder Land mine?
Was macht mehr punkte?!
Was machen die punkte?
Sind die für exp und Dinar???