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
Home Home Home
Author Message
Ultima One
Journeyman
*

Posts: 238
Likes Given: 7
Likes Received: 10 in 6 posts
Joined: Jan 2013
Reputation: 6

Ultima One

Post: #1
Home Home Home
Time to share some scripts we use frequently on TUP. Some may be in need of updating.

This script allows a player to set their 'Home' town, and provide each town with a population value.

Use: Place a stone in each town you want people to be able to go back to if they are dead. Update the default location at the bottom. Add the 'home home home' speech event to all players.

Use: say 'home home home' to go back to your home town.

Code:
[itemdef i_home_stone]
Name= Home Stone
ID=i_guildstone
Type=T_Normal

On=@Create
   color=007a3

// Remove if
On=@Click
    SAY Population:  <TAG.POPULATION>
    RETURN 1
  
on=@Dclick
    IF (<SRC.ISGM>)
        RETURN 1
    ENDIF
    IF (STRMATCH(<SRC.TAG.HOMETOWN>,<REGION.NAME>))
        SRC.SYSMESSAGE You are already a citizen of this town.
    ELSE
        TAG.POPULATION = <<TAG.POPULATION> + 1>
       SRC.SYSMESSAGE You have changed your home town to <REGION.NAME>
       SRC.TAG.HOME = <EVAL (<P.X>+2)>,<P.Y>,<P.Z>,<P.M>
       SRC.TAG.HOMETOWN =  <REGION.NAME>
     ENDIF
   return 1
  
  
// Add to player speech event
ON=home home home
IF ( <FLAGS> & statf_freeze )
    SYSMESSAGE You can't do that in your current state.
    RETURN 1
ELSEIF ( <FLAGS> & statf_war )
    SYSMESSAGE You can't do that when in warmode.      
    RETURN 1
ELSEIF ( <FLAGS> & statf_stone )
    SYSMESSAGE You can't do that in your current state.
    RETURN 1
ELSEIF ( <REGION.FLAGS> & region_antimagic_all )
    SYSMESSAGE You can't do that from here.
    RETURN 1
ELSEIF (<REGION.FLAGS> & region_antimagic_recall_out)
    SYSMESSAGE You can't do that from here.
    RETURN 1
ENDIF
IF ( <FLAGS> & statf_dead )
    IF (<tag.home>)
    go <tag.home>
    ELSE
    go 1946,2702,20,0 //default location
    ENDIF
endif

ULTIMA ONE
The modern, sphere powered Ultima Online server
05-16-2013 12:56 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


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