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!

Resource icon

[2.x] GameTime Gold Reward 1.1

No permission to download

Felladrin

Sorceror
Felladrin submitted a new resource:

GameTime Gold Reward (version 1.1) - Reward your players being online.

Introduction

This script, intended for family shards, gives a reward in gold for players being online.

Features

# Drag & Drop.
# Easy configuration.
# Automatically makes bankchecks after certain quantity of gold rewarded.


Configuration

Code:
private static AccessLevel RewardAccessLevel = AccessLevel.Player; // Any character with this access and below receives the reward....

Read more about this resource...
 

Erevan

Sorceror
Love the concept. You should consider expanding this to include items as well. If one thing has remained true over the years, gold is generally worthless to most veteran players that would log the required hours. :)
 

Felladrin

Sorceror
Good point, Erevan. I'd make this implementation, but for now I'm just republishing some old scripts that I see still running on new RunUO releases. If you have time, feel free to mod this one and publish. That would be much appreciated. Thanks for the input.
 

Talow

Sorceror
I'd also like to recommend the ability for XMLattachments (xml spawner system) or at least the code you would recommend for doing so.
 

MrNice

Squire
Already did it :) It works when I tested on my server for 10 minutes. newest SVN.
Just replace where it says YOURITEMHERE


*all credit goes to orig owner*
 

Attachments

  • GameTimeItemReward.cs
    1.8 KB · Views: 52

Erevan

Sorceror
Might want to add a check for whether or not the player is online. I'm assuming the purpose of the system is to reward players for actually being logged in. Otherwise, the system rewards gold to players who are offline as well (provided they logged in at least once after the system was implemented).
 

Felladrin

Sorceror
Might want to add a check for whether or not the player is online. I'm assuming the purpose of the system is to reward players for actually being logged in. Otherwise, the system rewards gold to players who are offline as well (provided they logged in at least once after the system was implemented).

Thanks for the comment, Erevan. But I've double checked it, and I'm sure that the system only rewards those players who have a character online at the moment of the system's tick. Here:

Code:
foreach ( NetState state in NetState.Instances )
{
    Mobile m = state.Mobile;
 
    if ( m != null && m is PlayerMobile && m.AccessLevel <= RewardAccessLevel )
    {
    (...)
    }
}

Only affects PlayerMobiles in NetState.Instances (Online) that have AccessLevel below that set on the settings.
 

MrNice

Squire
It could but would require more work. As of right now if a player logs off to change characters / losses connection it resets the timer.
 

Corrado

Sorceror
This appears to reward all online players at a set time interval, it has nothing to do with the amount of time the player themselves has been logged in. If you set the timer to something like 120 minutes then players simply need to log in once every two hours right as the timer is going to expire and they get rewarded.

Is there a way to actually reward them for time logged in, not just for being online at a specific time?
 
you could design a system to check for that when they log in

would work similar to the vet reward system, but instead of checking for days since created, it would check for game time played (which is stored with each separate character)
so you could customize it based on class (if you use them), skills they have, etc for each different character and time in game
could do it by point system or 1 item per interval, etc, many ways of doing it
would just have to add a variable or 2 to have it know if it has issued them or not
 
Top