RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

[SA] Beta Key/Referral System

Pure Insanity

Sorceror
First of all, the reason why this is [SA] is because I created it using the latest SA svn. And it's made to work with the TerMur map. If you don't have the TerMur map enabled, then you will need to make some minor edits to remove it as an option.

This system is something I actually thought up and threw together really fast for this shard I've been working on. What it does, is allow you to restrict all players to a specific area if their account isn't linked to a valid beta key.

The beta keys by default are 15 characters long, and consist of lower case letters and numbers 0-9. The system is capable of holding multiple groups of keys. And you can always add new keys to each group.

The view the control center I made for it. Use the [betakeys command. The system is completely drag and drop, no distro edits needed.

I'm releasing the system earlier than I had planned. In hope that some people would help me stress test it, and perhaps come up with some more ideas for it. I do have a list of planned future features that I will be adding to the system, but first. Here is a list of current features.

  • Can enable/disable the restricted area.
  • If enabled, players will get a registration gump upon login if their account doesn't have a key linked to it.
  • Can edit the restricted/success locations via the control center.
  • Can generate entire groups of keys from the control center.
  • Can edit group names, link them to players (for the referral system that still needs some work.)
  • Can edit individual keys, assign them to new players via the gump, change the key, ect.
  • Can disable rewards via the gump (part of the referral system and another future feature.)
  • Can manage the referral rewards amount (amount is doubled for each player the referrer brings in.)
  • Control center gump is completely dynamic, and will update and display separate pages for the groups and keys if there are too many to list on one page.
Future features I plan on adding still are things to tie up the referral part of the system. Currently rewards would be handed out properly if a group of keys is linked to a specific player. Although there is no way for that player to view their keys, or generate new ones.

I plan on making an item (probably just a book.) That will allow players to generate a key and give it out to people how ever they choose. Both the new player and the one that hands out the key will get a reward. I will also be adding an IP check for referral rewards, to attempt to prevent exploiting it.

I also have plans on linking special individual rewards to specific groups of keys, but this feature will be later on.

I'd imagine that you don't want to force a restricted area if you have a pretty active shard, so I suggest you disable that and save the settings. All settings are saved in the saves folder, so they will be backed up with everything else. I also plan on releasing a simple control stone to display the gump and allow you to simply props the stone and change core settings.

If anyone has any other ideas for this system, please post any feedback here. Also if you have any issues or quests, ask away and I'll do my best to help out.



I must say that this system has been a nice learning tool for me when building gumps. As I've figured out ways of displaying a dynamic amount of "pages" based on dynamic info such as the nested lists that I had to use for this system. I suggest other people take a look at the control center gump if you're going to build a new gump for something in the future, as I believe there is some useful stuff in it. Perhaps others might get some use out of this system other than a Beta/Referral system. =D
 

Attachments

  • 4-5-2011 7-39-41 PM.png
    4-5-2011 7-39-41 PM.png
    158.5 KB · Views: 353
  • 4-5-2011 7-48-37 PM.png
    4-5-2011 7-48-37 PM.png
    61.7 KB · Views: 48
  • 4-5-2011 7-50-34 PM.png
    4-5-2011 7-50-34 PM.png
    44.8 KB · Views: 36
  • 4-5-2011 7-51-40 PM.png
    4-5-2011 7-51-40 PM.png
    53.7 KB · Views: 38
  • 4-5-2011 7-52-12 PM.png
    4-5-2011 7-52-12 PM.png
    102.9 KB · Views: 36
  • 4-5-2011 7-52-52 PM.png
    4-5-2011 7-52-52 PM.png
    52.2 KB · Views: 42
  • 4-5-2011 7-53-17 PM.png
    4-5-2011 7-53-17 PM.png
    51.7 KB · Views: 38
  • 4-5-2011 9-27-13 PM.png
    4-5-2011 9-27-13 PM.png
    181.7 KB · Views: 45
  • Beta System.rar
    18.4 KB · Views: 18
  • Beta System (RunUO 2.0).rar
    18.4 KB · Views: 40

nikkor1132

Sorceror
Works grate! i also edited it if you didnt mined James to work with RunUO 2.0 Final and if you dont mined i will upload it
 

Pure Insanity

Sorceror
Did you edit both location gumps to just remove TerMur as an option? Did you do any other edits to get it working for 2.0? Go ahead and upload it and I will attach it to the first post later when I go home.
 

Higlander

Sorceror
Sounds a great system but i need also for runuo2.0 without termur options


Also works with dungeons ? single regions , or only with facets ?

Sorry for my Bad English i´m not good in it ^^
 

Pure Insanity

Sorceror
I will try and get a 2.0 version up later today. And no, currently this system won't work to restrict areas such as dungeons. Because the system is drag and drop. Not sure if I can hook into player movement without a distro mod. This doesn't mean I won't be adding support for this. I already planned on re-working the system to allow me to store regions with groups of keys. I also plan on changing it so that used keys are linked to the actual player mobile and not saved as account tags. This would allow users to use more than one valid key at a time. I just wanted to release the system as is atm, without any mods needed. I'm open to any other ideas also.
 

kmekc

Wanderer
Just try it with a region. For example a region named BetaRegion. So if you want to disable a region just set it up. And there you will have the possibility to check if one has access or not.

The magic region function is called OnMoveInto ;)
 

Pure Insanity

Sorceror
Doesn't that require you to add the new region to your regions.xml file? I have no problem hooking into the player mobile, wwhich is probably just all I will do. So it will only be one file edited, instead of multiple ones.
 

nikkor1132

Sorceror
Did you edit both location gumps to just remove TerMur as an option? Did you do any other edits to get it working for 2.0? Go ahead and upload it and I will attach it to the first post later when I go home.

yes it is all working 100% all i did was // the tur maps on both gumps and so far on the 2.0 it has no errors no crash's nuthen!
I would have had uploaded earlyer but i had work sorry.
 

Pure Insanity

Sorceror
Thanks, that's fine. I just recently got home my self, I'll throw it on the first post. But keep in mind that I won't be updating this copy myself when I update the original package, so you may have to do the same fix again when I release a new version.
 

nikkor1132

Sorceror
Thanks, that's fine. I just recently got home my self, I'll throw it on the first post. But keep in mind that I won't be updating this copy myself when I update the original package, so you may have to do the same fix again when I release a new version.

Ok i can update it again just let me know i dont mind at all gives me something to do on my free time!
 

kmekc

Wanderer
Doesn't that require you to add the new region to your regions.xml file? I have no problem hooking into the player mobile, wwhich is probably just all I will do. So it will only be one file edited, instead of multiple ones.

No it doesn't require to edit the regions.xml file. It could be done with a custom region. We have scripted a region called "SavingRegion". It has all the stuff inside to save customregions to Saves/Regions/Regions.tdb. Then you can inherit custom regions from this class. We use a CustomRegion with all the infos of a region variable like RecallIn/RecallOut etcpp. And now the magic is a gump named regioncontrol. With this gump you can see the regions at your point and add new ones. As like as we only have CustomRegions as SavingRegions we only can add them. With a region gump it is now possible to pick the boundaries. After you added the region you can change the properties. The region will be saved and loaded without any change of regions.xml. Sadly i can't post the source as it is not mine. But maybe you have now an idea of how to implement it with regions without any change of distribution files.
 

Attachments

  • regioncontrol.jpg
    regioncontrol.jpg
    81.7 KB · Views: 38

nikkor1132

Sorceror
No it doesn't require to edit the regions.xml file. It could be done with a custom region. We have scripted a region called "SavingRegion". It has all the stuff inside to save customregions to Saves/Regions/Regions.tdb. Then you can inherit custom regions from this class. We use a CustomRegion with all the infos of a region variable like RecallIn/RecallOut etcpp. And now the magic is a gump named regioncontrol. With this gump you can see the regions at your point and add new ones. As like as we only have CustomRegions as SavingRegions we only can add them. With a region gump it is now possible to pick the boundaries. After you added the region you can change the properties. The region will be saved and loaded without any change of regions.xml. Sadly i can't post the source as it is not mine. But maybe you have now an idea of how to implement it with regions without any change of distribution files.

Grate idea it dont seem to hard to do let lone take alot of time +Karma
 

Pure Insanity

Sorceror
No it doesn't require to edit the regions.xml file. It could be done with a custom region. We have scripted a region called "SavingRegion". It has all the stuff inside to save customregions to Saves/Regions/Regions.tdb. Then you can inherit custom regions from this class. We use a CustomRegion with all the infos of a region variable like RecallIn/RecallOut etcpp. And now the magic is a gump named regioncontrol. With this gump you can see the regions at your point and add new ones. As like as we only have CustomRegions as SavingRegions we only can add them. With a region gump it is now possible to pick the boundaries. After you added the region you can change the properties. The region will be saved and loaded without any change of regions.xml. Sadly i can't post the source as it is not mine. But maybe you have now an idea of how to implement it with regions without any change of distribution files.

This is actually what I started working on yesterday. I'm using the guarded region as a baseclass to do it. Really, all I need the regions for is the OnEnter/OnExit methods. I won't be using anything else. I didn't go with this method to avoid distro edits either, as I still plan on requiring you to do a change to PlayerMobile. Since I have decided to store used betakeys with the actual players. I know there are still other ways around this, such as storing everything in my own list and referencing it based on the player online. But I still think it is better to just go ahead and serialize the keys to the playermobiles.

If anyone has any other ideas for this system, or if you think that I just need to change an existing feature. Than please speak up, I'm open to any feedback. I'm currently finishing the referral part of this system, and adding the ability to require a betakey to be able to visit speciific areas. Although since I'm also busy with work, I can't really give a date range on when I will release the next version with the new features, so be sure to keep checking back. =D
 

nikkor1132

Sorceror
This is actually what I started working on yesterday. I'm using the guarded region as a baseclass to do it. Really, all I need the regions for is the OnEnter/OnExit methods. I won't be using anything else. I didn't go with this method to avoid distro edits either, as I still plan on requiring you to do a change to PlayerMobile. Since I have decided to store used betakeys with the actual players. I know there are still other ways around this, such as storing everything in my own list and referencing it based on the player online. But I still think it is better to just go ahead and serialize the keys to the playermobiles.

If anyone has any other ideas for this system, or if you think that I just need to change an existing feature. Than please speak up, I'm open to any feedback. I'm currently finishing the referral part of this system, and adding the ability to require a betakey to be able to visit speciific areas. Although since I'm also busy with work, I can't really give a date range on when I will release the next version with the new features, so be sure to keep checking back. =D


thought i would add in a few things b4 i headed to work so far i think all your ideas are just awsome it looks grate the way it is now i cant wait to see the update to it
if i think of some things to add wile im at work ill get on here and post them!
 
Top