• This is a read only backup of the old Emudevs forum. If you want to have anything removed, please message me on Discord: KittyKaev

Comunity input for a Premium System

slp13at420

Mad Scientist
Community input for a Premium System

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)? [SUP]lol get it ||? || do you?[/SUP]
some custom commands? if so what commands would you want?


loading screen sneak peek with features on/off:
lu2TNwz.png

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 <<
 
Last edited:

Tommy

Founder
Seems like every other premium system honestly. Have any other ideas that aren't generic? (I really don't have any ideas, heh)
 

Vitrex

Moderator
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

Banned
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

Mad Scientist
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.
 
Last edited:

slp13at420

Mad Scientist
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 :)
 
Last edited:

Tommy

Founder
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.

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

Mad Scientist
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.

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.
 
Last edited:

slp13at420

Mad Scientist
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:
e84M32k.png

RntFW2B.png


See the first post for updates and any new details.
 
Last edited:

Grandelf

Esteemed Member
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:
Code:
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:
Code:
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

Mad Scientist
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:
Code:
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:
Code:
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
 
Last edited:

Grandelf

Esteemed Member
I can explain this a bit more, it's not that hard once you get the hang of it.
Code:
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.
Code:
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

Mad Scientist
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

Esteemed Member
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:
Code:
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

Mad Scientist
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:
Code:
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..
 
Last edited:

Grandelf

Esteemed Member
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.
 
Top