PDA

View Full Version : Comunity input for a Premium System



slp13at420
04-21-2016, 03:48 AM
I'm looking to the community for your input on `what do you like in a Premium System.`

first I should layout what I have done so far as the Engine goes:

Adjustable Premium type:

This will allow the admin to set it so it can be an Account Premium System or a Character Premium System.
The Premium rank is a Boolean value false/true 0/1.

Adjustable Rank duration type:

The admin can set this to allow the Premium rank to be permanent or temporary.
the temporary rank duration is adjustable and set by days. Default 30 days.

in-game item to upgrade a player to Premium rank.

the item uses `item_template.ScriptName`.

All these can be adjusted in the provided worldserver.conf mod.



So beyond what I have done,. What would you want to see it have or do?
Buffs ? if so what buff's?
maybe a teleport command or (2 || 3)? lol get it ||? || do you?
some custom commands? if so what commands would you want?


loading screen sneak peek with features on/off:
http://i.imgur.com/lu2TNwz.png
http://i.imgur.com/SdyDbXw.png

For those who want to offer help with the code just post your blocks here , I know there are some ideas posted that I don't have the knowledge to achieve yet.



Progress as features are added and worked on:

Account/Character type switch -- tested - working - 4/24 - :proud2:
Temporary Premium rank Timer and functions -- tested - working - 4/25 - :proud2:

Premium Duration time left splash string. Provides break down of time left by months/days/hours/seconds -- tested - working - 4/26 - :proud2:

OnDuelEnd reset hp and mana -- tested - working - 5/01 - :proud2:
Premium rank update item -- tested - working - 4/25 - :proud2:
Premium rank update command -- tested - working - 5/01 - :proud2:
HP premium mod -- tested - 4/24 - works - :proud2:
Experience increase -- added -- untested -- -- Testers needed --
Reputation increase -- added -- untested -- -- Testers needed --
Instant Logout for Premiums -- Via core mod -- tested - working - 5/08 - :proud2:


Commands:

Reset TP with no cost -- Tested - working - 4/23 - :proud2:

Extra TP for Premium rank -- tested - working - 4/24 - :proud2:

set Drink/Drunk/Sobor -- tested - 4/24 - works - :proud2:
Repair all items with no cost -- Tested - working - 4/23 - :proud2:
Character customization:

Race -- tested - working - 5/01 - :proud2:
Faction -- tested - working - 5/01 - :proud2:
customizing -- tested - working - 5/01 - :proud2:

Buff -- tested - working - 4/24 - :proud2:
Premium only chat -- mostly complete function -- color added. incomplete testing -- Testers needed --

Teleports:

can now be done with any scripted C++ teleporters by using the bool function PREM::IsPlayerPremium(Player* player) to check if they are Premium ranked then allow them to see extra locations. -- function tested - working - 4/23 - :proud2:

Player Methods:

IsPlayerPremium(player) -- tested - working - 4/24 - :proud2:
GetPlayerPremiumId(player) -- tested - working - 4/24 - :proud2:
AddPremiumToPlayer(player) -- tested - working - 4/24 - :proud2:
RemovePremiumFromPlayer(player) -- tested - working - 4/25 - :proud2:
UpdatePlayerPremiumValue(player, value, time) -- tested - working - 4/25 - :proud2:

Item metods:

IsItemPremium(item) -- tested - working - 4/24 - :proud2:
UpdateItemPremiumValue(item, value) -- tested - working - 5/01 - :proud2:

Loot:

increase copper loot -- Via core mod -- tested - 5/07 - works - :proud2:

Guild:

Guild loot percentage -- Via core mod -- tested - working - 5/01 - :proud2:

Access to Premium Vendor:

This can be done via a simple check using the bool method PREM::IsPlayerPremium(Player* player) to see if they are premium ranked -- function tested - working - 4/23 - :proud2:




Via core mod all Core mods listed above are provided in rich text files with simple easy-to-see easy-to-read colored edits.
I will try and keep this as self-contained as possible , but some things can only be done by editing the core a bit.

Broke 1k Lines-o-Code ;)

I will try and make as much of this adjustable in the conf so you can pimp-this-out the way you want with just a few changes in the conf :)
turn on some stuff and turn other stuff off .... `Config'z .... Don't you just .. luv em..?`




up coming list -- not added but want to

command based teleports:

1 for a neutral Premium Mall yes/no?
1 for each teams main locations.
1 Dynamic player settable location.

Prem title <Prem> ?
reduce spell costs ?
nill fall damage ?
no que's ?
influence mount speed ?
spell cost ?
mail time ?
guild features

no charter cost ?
no charter signatures ?

Loot:

extra item ?
Bonus loot ?

Eluna methods for player
Eluna methods for item



most if not all the rest listed above may require core editing.




For those who want to help with coding.
For those who want to help with testing.

>> Drop Box Link (https://www.dropbox.com/sh/ngzta2hx9utjp91/AAAUcYMrqvMy8PJqXcN1d020a?dl=0) <<

Tommy
04-21-2016, 05:23 AM
Seems like every other premium system honestly. Have any other ideas that aren't generic? (I really don't have any ideas, heh)

Vitrex
04-21-2016, 05:49 AM
this is brainstorm maybe you'll find something.
- Add extra item loot option
- Add option to change experience,drop,reputation rates on premium characters
- Change name colour/add image in game chat near premium char name.
- Option to change faction/race for a premium chars
- Increase mounted speed by X on premiums
- Reduce spells cost on premiums
- decrease mail time on premiums
- add teleports to important locaitons/instances/main cities
- Premium guilds? where you can get additional perks for your guild if you premium like deposit % of all money looted into guild bank.
- No que for premiums
- No Logout for premiums
- No fall damage for premiums
- sounds OP but still can be used on fun servers , damage/healing multiplier for premiums.

Portals
04-21-2016, 06:18 AM
This is will require to be more thought out, if you want to make it for a 255 server or a blizzlike type server. I only know blizzlike/i80 servers and what to offer on those. But this would be my general idea on what to add.

Blizzlike/i80 Server Premium Members:

Instant logouts
Access to certain vendors.
Access to certain items.
<V.I.P> Tag like <GM> or <Dev>.
Bonus loot (increased chances) (extra gold).
Access to Premium NPC, that allows you to customize the race, faction, name, and features of your character only 1 time.
No guild charter costs.
No guild signature requirement.
Lower arena team charter costs by 50%.
Access to certain commands ingame.

As for a 255 server I am not to sure on what to add hence I dont play them.

slp13at420
04-21-2016, 12:18 PM
Seems like every other premium system honestly. Have any other ideas that aren't generic? (I really don't have any ideas, heh)

yea I never really mess with a Premium System before but ppl are trying to convert a VIP System to a Premium System and that frog just won't fly lol and since I was planning to do one in the near future I went ahead and started the project ahead of schedule.

slp13at420
04-21-2016, 12:23 PM
this is brainstorm maybe you'll find something.
- Add extra item loot option
- Add option to change experience,drop,reputation rates on premium characters
- Change name colour/add image in game chat near premium char name.
- Option to change faction/race for a premium chars
- Increase mounted speed by X on premiums
- Reduce spells cost on premiums
- decrease mail time on premiums
- add teleports to important locaitons/instances/main cities
- Premium guilds? where you can get additional perks for your guild if you premium like deposit % of all money looted into guild bank.
- No que for premiums
- No Logout for premiums
- No fall damage for premiums
- sounds OP but still can be used on fun servers , damage/healing multiplier for premiums.




This is will require to be more thought out, if you want to make it for a 255 server or a blizzlike type server. I only know blizzlike/i80 servers and what to offer on those. But this would be my general idea on what to add.

Blizzlike/i80 Server Premium Members:

Instant logouts
Access to certain vendors.
Access to certain items.
<V.I.P> Tag like <GM> or <Dev>.
Bonus loot (increased chances) (extra gold).
Access to Premium NPC, that allows you to customize the race, faction, name, and features of your character only 1 time.
No guild charter costs.
No guild signature requirement.
Lower arena team charter costs by 50%.
Access to certain commands ingame.

As for a 255 server I am not to sure on what to add hence I dont play them.


Instantly full health and mana after a duel

o.0 kewl :)
tnx 4 the info , I will look into trying to incorporate these ideas .


- Premium guilds? where you can get additional perks for your guild if you premium like deposit % of all money looted into guild bank.


:challengeaccepted:
I'm a HUGE Guild fan so yea I will definitely see what I can add for them :)

jonmii
04-21-2016, 03:26 PM
A pet with Teleport gossip to main cities(obviusly with checking if in battle and this stuff ^^)

Tommy
04-22-2016, 12:15 AM
A pet with Teleport gossip to main cities(obviusly with checking if in battle and this stuff ^^)

What type of pet? Pet that follows everyone? e.g. Like hunter pets. - If so and you're using TrinityCore pet gossip by default won't work. In the HandleGossipSelectOptionOpcode they only check if it is a creature or vehicle, not pet specifically. You can view the edit I made for Mercenary system here (https://github.com/EmuDevs/Mercenary/blob/master/diffs/trinitycore_diff.diff#L380).

Otherwise, this seems as if it could be put into item or player gossip (teleportation could already be a thing on most servers) instead of pet gossip since it doesn't make much since.

slp13at420
04-22-2016, 12:25 AM
What type of pet? Pet that follows everyone? e.g. Like hunter pets. - If so and you're using TrinityCore pet gossip by default won't work. In the HandleGossipSelectOptionOpcode they only check if it is a creature or vehicle, not pet specifically. You can view the edit I made for Mercenary system here (https://github.com/EmuDevs/Mercenary/blob/master/diffs/trinitycore_diff.diff#L380).

Otherwise, this seems as if it could be put into item or player gossip (teleportation could already be a thing on most servers) instead of pet gossip since it doesn't make much since.

I could do a command like `.premium vendor` that would open a player gossip menu or summon a premium item vendor that de-spawns after a duration expires..
but to be honest I was going to just make a bundle of `.premium` commands for buff, premium_mall/home teleports , talent resets, character mod commands , ...

I will also add methods for Eluna \o/ only be a couple `player:SetPremium(value, time) and player:IsPlayerPremium()
and some Global Getters.

slp13at420
04-22-2016, 12:47 AM
ok also , I will have an in-game item to update a players Premium rank from 0 to 1. But say an Admin is using the timed duration Premium rank, and a player is currently has Premium rank 1 but it hasn't expired yet,. should I go ahead and allow it to update there rank and time_of_update or should I deny it until there Premium rank is reset to 0?

if I can figure out how to add commands for only the Admin or higher rank gm's then I could just add a `.premium set x` (where x = 0 or 1) command.


This wont be a quick release. I will take my time and make it right and Full-o-Features as I allways do ;)
With the work season back I will still be working on it but not like I do during my winter vacation :)


also I have idea . maybe items can require the player to have Premium rank 1 to use or equip..?

loading screen sneak peek with features on/off:
http://i.imgur.com/e84M32k.png
http://i.imgur.com/RntFW2B.png

See the first post for updates and any new details.

Portals
04-23-2016, 12:13 AM
also I have idea . maybe items can require the player to have Premium rank 1 to use or equip..?

This is a good idea.

Kaev
04-23-2016, 08:21 AM
Instantly full health and mana after a duel

slp13at420
04-25-2016, 07:39 PM
This is a good idea.
tnx :D


Instantly full health and mana after a duel
added but untested.


I will post our progress in the first post to let ppl know what has been added, tested, and completed.

Grandelf
04-30-2016, 12:29 PM
First of all, I must say I really like the idea of making a script with the community.
Makes me wonder if going to Lua would increase the user input..

I checked your script and noticed that it could use some clean up.
I see a lot of methods which look like this:


bool PREM::IsPremiumTimed()
{
bool return_type;

if (PREMIUM_TIMER_ENABLE == 0)
{
return_type = false;
}
else
{
return_type = true;
}

return return_type;
}

This could easily be rewritten to:


bool PREM::IsPremiumTimed()
{
return PREMIUM_TIMER_ENABLE != 0;
}

I also noticed that this script has a lot of commands of which every single command has
to check whether the player is premium or not.
I am not sure if there's a way to deal with this, using the existing
command system (you'd think there has to be..).
However, as an alternative solution I wrote some code which will reduce
the need to check if a player is a premium player.

Basically what does code does is creating individual handlers for every command.
Before any of the command handlers is executed, it will go through a main
command handler, which will check for things that are common for each
individual command handler.

Script: http://paste2.org/nGaxhNDO

Of course you can do it your way and use the original command system.
It's just that I don't like to repeat code, in this case the check
if a player is premium =P.

Hope this was helpful,

Grandelf.

slp13at420
05-01-2016, 04:29 AM
First of all, I must say I really like the idea of making a script with the community.
Makes me wonder if going to Lua would increase the user input..

I checked your script and noticed that it could use some clean up.
I see a lot of methods which look like this:


bool PREM::IsPremiumTimed()
{
bool return_type;

if (PREMIUM_TIMER_ENABLE == 0)
{
return_type = false;
}
else
{
return_type = true;
}

return return_type;
}

This could easily be rewritten to:


bool PREM::IsPremiumTimed()
{
return PREMIUM_TIMER_ENABLE != 0;
}


I honestly never knew how this works above but threw the edits in and it seems everything that calls the bool return gets a true return when player is premium or item is premium or false when 0.

:top: tnx :D



I also noticed that this script has a lot of commands of which every single command has
to check whether the player is premium or not.
I am not sure if there's a way to deal with this, using the existing
command system (you'd think there has to be..).
However, as an alternative solution I wrote some code which will reduce
the need to check if a player is a premium player.

Basically what does code does is creating individual handlers for every command.
Before any of the command handlers is executed, it will go through a main
command handler, which will check for things that are common for each
individual command handler.

Script: http://paste2.org/nGaxhNDO

Of course you can do it your way and use the original command system.
It's just that I don't like to repeat code, in this case the check
if a player is premium =P.

Hope this was helpful,

Grandelf.

0.o i'm such a noob lol don't delete that , I may even copy it over to my gihub for referencing. yea i'm still playing around with how to add custom commands and limit them to selected players or staff members.

I did convert all the bool functions over to the more simple returns as you posted :D
I've seen stuff kinda like that before but didn't know how it returns or what it would return so I never tried it.



First of all, I must say I really like the idea of making a script with the community.
Makes me wonder if going to Lua would increase the user input...

I did try to do that will my Eluna VIP Engine to allow others to post there custom scripts that would use it but no real work but some input.
this is actualy the most input I have gotten on an open forum project, but I could use some examples for some of the ideas like nil fall damage ...
or anything I listed with a `hmmm` lol

Grandelf
05-01-2016, 10:00 AM
I can explain this a bit more, it's not that hard once you get the hang of it.


bool PREM::IsPremiumTimed()
{
return PREMIUM_TIMER_ENABLE != 0;
}

This code does exactly the same thing as your code, it's just shorter.
PREMIUM_TIMER_ENABLE equals to a number value, most likely this will
only be 0 or 1.

So let's say that PREMIUM_TIMER_ENABLE = 0.
According to your original code, 0 means false.


if (PREMIUM_TIMER_ENABLE == 0)
{
return_type = false;
}

This is also exactly what 'PREMIUM_TIMER_ENABLE != 0' does.

The expression, in this case is: 0 isn't equal to 0 (0 != 0),
which obviously is false because 0 is equal to 0, so it will return false.

Now, if PREMIUM_TIMER_ENABLE = 1, the expression is 1 isn't equal to 0 (1 != 0).
This expression is true because 1 isn't equal to 0, and so it returns true.

So basically, whenever PREMIUM_TIMER_ENABLE is 0, it will return false.
Because 0 is equal to 0. With any other value, it will return true,
because 1, 2, 3, 4, 5, 6 etc. isn't equal to 0, which is what we asked for.

slp13at420
05-02-2016, 02:21 AM
ok I gotcha tnx :D gonna be pretty slick for future use.
lol my work still does have a noobish look to it ;P

Grandelf
05-02-2016, 12:29 PM
The look of a script doesn't matter =P, as long as it works correctly
and is written properly.

I will give you a hint though, all the code in this class basically does the exact same thing:


class Unit_Premium_Engine : public UnitScript

As a general rule you shouldn't repeat code.
I'm sure you can make it look better, by taking out all the repetive
code and put it inside a method. Then you can call that method from
the OnHeal, OnDamage etc..

slp13at420
05-03-2016, 12:43 AM
The look of a script doesn't matter =P, as long as it works correctly
and is written properly.

I will give you a hint though, all the code in this class basically does the exact same thing:


class Unit_Premium_Engine : public UnitScript

As a general rule you shouldn't repeat code.
I'm sure you can make it look better, by taking out all the repetive
code and put it inside a method. Then you can call that method from
the OnHeal, OnDamage etc..

are you talking that the melee damage, spell damage will also go thru the OnDamage event and I should just use it? was woundering bout htat but never did follow thru on testing the idea..

Grandelf
05-03-2016, 05:17 PM
No, what I meant was that you could make a 5th method called something like 'HandlePremiumModifier',
and call that method from the other methods. You can do this because those methods do the exact same
thing. So basically one generic method, which is called from the OnDamage, ModifyMeleeDamage and
ModifySpellDamageTaken methods.

By doing this, you will get rid of code that does the exact same thing.

slp13at420
05-04-2016, 12:45 AM
No, what I meant was that you could make a 5th method called something like 'HandlePremiumModifier',
and call that method from the other methods. You can do this because those methods do the exact same
thing. So basically one generic method, which is called from the OnDamage, ModifyMeleeDamage and
ModifySpellDamageTaken methods.

By doing this, you will get rid of code that does the exact same thing.

oooohhh ok lol duh k gotcha

x = PREM::IncreaseValueWithOffset(Player* player, uint32 val)

n just use that rather than same code each event. lol
n updated a couple to use them too in player events
and a couple misc that can use it too.
added 1 method for increase and 1 for decrease.

tnx
:top:

slp13at420
05-05-2016, 01:34 AM
also prompted me to skim thru and try and condense some lines down .




I also noticed that this script has a lot of commands of which every single command has
to check whether the player is premium or not.
I am not sure if there's a way to deal with this, using the existing
command system (you'd think there has to be..).
However, as an alternative solution I wrote some code which will reduce
the need to check if a player is a premium player.

Basically what does code does is creating individual handlers for every command.
Before any of the command handlers is executed, it will go through a main
command handler, which will check for things that are common for each
individual command handler.

Script: http://paste2.org/nGaxhNDO

Of course you can do it your way and use the original command system.
It's just that I don't like to repeat code, in this case the check
if a player is premium =P.

Hope this was helpful,

Grandelf.

yea I agree, but atm this is the only way I knew to handle the check . now will that support multiple types of checks since there are a few admin commands too(premium not required for admin)
I need to sit down this weekend and just read thru the script :)

slp13at420
07-21-2016, 01:13 AM
Minodevs released this tutorial today --> http://emudevs.com/showthread.php/5806-Tutorials-Ghosts-Starting-Near-Cropse?p=38728#post38728

I thought this would be a nice addition to Premium perks "allow ghost near corpse" (outside bg's ofc).

I dunno if this can be added or not , maybe some mods will be needed.

But I will ask the community what you think .

best 2 out of 3 thumbs up/down. "Should I attempt to add this?".

:RpS_thumbup: - 0.
:RpS_thumbdn: - 1.

Syphex
07-21-2016, 02:53 AM
Minodevs released this tutorial today --> http://emudevs.com/showthread.php/5806-Tutorials-Ghosts-Starting-Near-Cropse?p=38728#post38728

I thought this would be a nice addition to Premium perks "allow ghost near corpse" (outside bg's ofc).

I dunno if this can be added or not , maybe some mods will be needed.

But I will ask the community what you think .

best 2 out of 3 thumbs up/down. "Should I attempt to add this?".

I would say no, as it could be abused for world pvp, pvp farming etc.
I'd say that if they arent in pvp or in an instanced area this may be okay.

People will exploit everything now days as good as they can.

Wolord
07-21-2016, 03:55 AM
- Add Premiums ability to summon & appear to a location (not BGs & Arenas)
- Add all Players [.toggle summon on/off] & [.toggle appear on/off] to allow Premiums to summon/appear them or not.
- Add Premiums respawn command with a timer.
- Add Premiums [.learn all my spells/talents] command.
- Add Premium online command to show Premiums who are online in the game.

slp13at420
07-21-2016, 04:12 AM
- Add Premiums ability to summon & appear to a location (not BGs & Arenas)
- Add all Players [.toggle summon on/off] & [.toggle appear on/off] to allow Premiums to summon/appear them or not.
- Add Premiums respawn command with a timer.
- Add Premiums [.learn all my spells/talents] command.

ooh right on didn't even think bout spells/talents and summon/appear
Tnx

8-14-2016 added .prem learn all my spells
8-14-2016 added .prem unlearn all my spells
these will learn/unlearn the player there class spells.


8-14-2016 added .prem appear [player name]
allows premium players to teleport to other players.

8-14-2016 added .prem dnd appear on/off
allows a Premium player to block/unblock other Premium players from teleporting to them.

tnx Wolord