VIP System 5065 Soruce

11/21/2015 20:16 mkd1231#1
Hello

Some one if can help me im using 5065 soruce Redux base
i want to add VIP System if someone can help me
i need some codes or somting like that i got problems with monster.cs
im using now new monster.cs but can't make it the VIP auto pick items and etc.
11/21/2015 20:33 Spirited#2
We're not here to program for you. Asking for help is one thing. Asking for us to do everything for you is another, and against the rules.

[Only registered and activated users can see links. Click Here To Register...]
"In this section it is NOT okay to post about the following:
Requests for completed code (demands for code)"
11/23/2015 10:44 Soulfly25#3
if U are using a Redux 5065 well all I can advice you is to make a permission . example is Permission No. 5 <-- which is PM/GM? . U can make it Permission no. 1 as VIP.

and you can code like this

Code:
if(Permission.No == 1)
{
// code here for auto inventory item.
}
else
{
// Do nothing :)
}
11/23/2015 17:13 turk55#4
Quote:
Originally Posted by Soulfly25 View Post
if U are using a Redux 5065 well all I can advice you is to make a permission . example is Permission No. 5 <-- which is PM/GM? . U can make it Permission no. 1 as VIP.

and you can code like this

Code:
if(Permission.No == 1)
{
// code here for auto inventory item.
}
else
{
// Do nothing :)
}
If the else statement is empty you might as well remove the whole else statement
11/23/2015 20:30 pro4never#5
Also a few other criticisms

#1: If you just want a "is vip" type value it shouldn't be a numeric value. Numerical value would only be relevant if you want to add various levels of VIP.

#2: If you just want a simple "is vip" type check then the source already contains an Account.Permission value... you could define a specific permission as being VIP (2 for example instead of 1 for normal player)

#3: If you were going to add a new permission value... why on earth do a permission class with a value of 'No'. I know you meant it as a shortform for number but if you just wanted a numeric value there's no need for it to be its own struct/class and the naming is rather poor (I've already mentioned it being better as a bool check but that's beside the point)


Personally I hate the concept of "VIP Levels" but you could add them easily enough. My own preference is storing a datetime value with the character to determine how much VIP time they have remaining.

Character.VIPExpiresAt

You can then easily extend/expire VIP permission through any quest, events, items or other system you plan to put in place.

Note: For consistency and performance use DateTime.UtcNow when initializing/updating it. No worrying about timezones and it actually performs faster than DateTime.Now if that's the route you decide to go.
11/24/2015 03:14 Soulfly25#6
Quote:
Originally Posted by turk55 View Post
If the else statement is empty you might as well remove the whole else statement
Yeah Yeah I know but of course he needs to use else statement for the non-VIP :) .
11/24/2015 13:15 mkd1231#7
Im using 5375 base im making classic version so im almost done
if someone can show me i got problems in drop rate i make it drop +1 items
but there was just for vip i want make it to be drop on the ground for no vip chars

THIS ITS THE CODE IF YOU ARE VIP THERE WILL BE AUTO PICK IDK HOW TO MAKE DROP FOR NO VIP CHARS IN GROUND TO BE DROPING +1 ITEMS
#region AutoInventory
if (killer.VIPLevel > 0)

if (Kernel.Rate(0.0030))//3% chance 0.0030
{

if (killer.MapID != 1002)
{


if (killer.Owner.Inventory.Count <= 39)//Check if invetory is not full
{
killer.Owner.Inventory.Add((uint)id, 1, 1);//id, plus, times
killer.Owner.Send(new Message("You have got a +1 " + Database.ConquerItemInformation.BaseInformations[id].Name + " Item.", System.Drawing.Color.Red, Message.Whisper));
11/24/2015 18:40 Best Coder 2014#8
Quote:
Originally Posted by mkd1231 View Post
Im using 5375 base im making classic version so im almost done
if someone can show me i got problems in drop rate i make it drop +1 items
but there was just for vip i want make it to be drop on the ground for no vip chars

THIS ITS THE CODE IF YOU ARE VIP THERE WILL BE AUTO PICK IDK HOW TO MAKE DROP FOR NO VIP CHARS IN GROUND TO BE DROPING +1 ITEMS
#region AutoInventory
if (killer.VIPLevel > 0)

if (Kernel.Rate(0.0030))//3% chance 0.0030
{

if (killer.MapID != 1002)
{


if (killer.Owner.Inventory.Count <= 39)//Check if invetory is not full
{
killer.Owner.Inventory.Add((uint)id, 1, 1);//id, plus, times
killer.Owner.Send(new Message("You have got a +1 " + Database.ConquerItemInformation.BaseInformations[id].Name + " Item.", System.Drawing.Color.Red, Message.Whisper));
[Only registered and activated users can see links. Click Here To Register...]