The following warnings occurred:
Warning [2] Use of undefined constant SAPI_NAME - assumed 'SAPI_NAME' (this will throw an Error in a future version of PHP) - Line: 3388 - File: inc/functions.php PHP 7.4.33-nmm6 (Linux)
File Line Function
/inc/functions.php 3388 errorHandler->error
/showthread.php 116 build_archive_link
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm6 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/inc/functions.php 3324 build_forum_breadcrumb
/showthread.php 195 build_forum_breadcrumb
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm6 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/showthread.php 195 build_forum_breadcrumb






Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Online Reward
Author Message
Trofan
Apprentice
*

Posts: 5
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Jan 2013
Reputation: 0



Post: #1
Online Reward
Hi all.I have a problem. Any player enter the britain, every 5 min win 10k gold. how do I make ? Thanks


Sorry for my bad english Sad
01-07-2013 01:54 PM
Find all posts by this user Like Post Quote this message in a reply
Onirim
Journeyman
*

Posts: 64
Likes Given: 0
Likes Received: 1 in 1 posts
Joined: Jul 2012
Reputation: 0

UO: Rebellion

Post: #2
RE: Online Reward
You can make it with a timer in an event.
This link can help: http://wiki.sphere.torfo.org/index.php/C...imer_Event
01-07-2013 05:35 PM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Trofan
Apprentice
*

Posts: 5
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Jan 2013
Reputation: 0



Post: #3
RE: Online Reward
i make it but player can logout timer not remove
01-07-2013 07:59 PM
Find all posts by this user Like Post Quote this message in a reply
Sharlenwar
Journeyman
*

Posts: 55
Likes Given: 0
Likes Received: 3 in 3 posts
Joined: May 2012
Reputation: 0



Post: #4
RE: Online Reward
With that timer idea, you can add in something using the @Logout trigger on players. Just do a check for the timer item, and if it is present, then just remove it if the player logs out.

http://wiki.sphere.torfo.org/index.php/C...s#Triggers

-= Meh =-
01-07-2013 08:40 PM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Trofan
Apprentice
*

Posts: 5
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Jan 2013
Reputation: 0



Post: #5
RE: Online Reward
yes i'm fix it
look the script its true ?

Code:
[itemdef i_safepoint]
name point timer
id i_memory
type t_eq_script
weight 0

on=@create
attr attr_invis | attr_decay

on=@equip
timer 300

on=@unequip
if !(strmatch('<region.name>', 'Safe Region'))
else
newitem i_gold,1000
new.bounce

on=@timer
attr attr_decay
remove


[itemdef i_pvppoint]
name point timer
id i_memory
type t_eq_script
weight 0

on=@create
attr attr_invis | attr_decay

on=@equip
timer 300

on=@unequip
if !(strmatch('<region.group>', 'Serpent's Hold')) && !(strmatch('<region.group>', 'Cove'))
else
newitem i_gold,5000
new.bounce

on=@timer
attr attr_decay
remove
(This post was last modified: 01-07-2013 09:07 PM by Trofan.)
01-07-2013 09:05 PM
Find all posts by this user Like Post Quote this message in a reply
Mordaunt
Super Moderator
****

Posts: 1,237
Likes Given: 26
Likes Received: 55 in 43 posts
Joined: Mar 2012
Reputation: 35



Post: #6
RE: Online Reward
Personally I'd put it under an f_onserver_timer function for ease of adding new regions or expanding it server wide should you so wish

Code:
[Defname lotto_settings]
winchance 500  // 1 in <def.winchance> of winning

[Function Lottery]
if (<isplayer>)
    if (<isonline>)
        if !(strmatch ("<region.name>","Serpent's Hold")) || !(strmatch ("<region.name>","Cove"))
                if !(RAND(<eval <def.winchance>>))
                          serv.newitem i_gold,5000
                         new.bounce
            endif
        elif !(strmatch ("<region.name>","Britain"))
                if !(RAND(<eval <def.winchance>>))
                          serv.newitem i_gold,1000
                         new.bounce
            endif
        endif
    endif
endif

If you're wanting to keep it on the timers you are going to need to add region events to the areas in which you want the lottery to run so that the timers are added when the player enters and removed when they leave.

[Image: 2nis46r.jpg]
01-08-2013 02:39 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Trofan
Apprentice
*

Posts: 5
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Jan 2013
Reputation: 0



Post: #7
RE: Online Reward
thanks dude Smile
01-08-2013 12:31 PM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 3 Guest(s)