Thread Rating:
- 0 Votes - 0 Average
- 1
- 2
- 3
- 4
- 5
Smart Gates
|
Author |
Message |
Ultima One
Journeyman
Posts: 238
Likes Given: 7
Likes Received: 10 in 6 posts
Joined: Jan 2013
Reputation: 6
Ultima One
|
Smart Gates
Time to share some scripts we use frequently on TUP. Some may be in need of updating.
This script I am not 100% sure of how to set up, but looks pretty simple. You basically have an Entry gate which goes to X location, then once a player uses an Exit gate, they return to the last Entry gate they used.
Could be used in a Maze style event, we use it by placing an Entry in Buccs (pk town) and Britain, to enter our 'house show room', this means both reds and blues can enter the area, and use the same 1 exit gate to go back to where they entered from - stops red players accidently entering Britain etc..
Code:
////////////////////////////////////THE ORIGINAL SMART GATES/////////////////////////////////////////// //
//Variables: //
//MORE1-Max Skill Total that people can have and use this gate //
//TAG.ExitPoint (On the player) - Tells the exit gate where the player used the entrance gate //
//LINK - Entrance gates should be linked to the exit gate. No link on Exit Gate. //
// //
//General Info: //
//Can have multiple entries with a single exit. Players will always be sent back to the entrance //
//that they used. They cannot use the entrance gate unless they are full health and are not criminal.//
//Only Players with a skill total under MORE1 can enter. This should be entered without a //
//decimal. i.e. 1000 = 100.0 //
///////////////////////////////////////////////////////////////////////////////////////////////////////
[ITEMDEF i_Smart_entrance]
ID=i_moongate_blue
NAME=Smart Entrance Gate
ON=@CREATE
COLOR=07a0
MORE1=100000
ON=@STEP
IF <SRC.NPC>
RETURN 1
ENDIF
IF !(<SRC.FINDID(M_Gate_Timer)>)
IF !(<SRC.FLAGS> & statf_criminal)
IF !(<SRC.MEMORYFINDTYPE.memory_fight>)
IF (<SRC.HITS> >= <SRC.STR>)
IF !(<LINK>=04fffffff)
IF <SRC.SKILLTOTAL> <= <MORE1>
SRC.TAG.ExitPoint = <SRC.P>
SRC.GO <LINK.P>
SRC.NEWITEM M_Gate_Timer
SRC.EQUIP <SRC.ACT>
ELSE
SRC.SYSMESSAGE You are too skilled to use this gate.
ENDIF
ELSE
SRC.SYSMESSAGE This gate has not been linked yet or is broken please notify staff.
ENDIF
ELSE
SRC.SYSMESSAGE You must have full health before you can use this gate.
ENDIF
ELSE
SRC.SYSMESSAGE You must make peace before entering this gate.
ENDIF
ELSE
SRC.SYSMESSAGE You must wait until you are no longer criminal to use this gate.
ENDIF
ENDIF
CATEGORY=Miscellaneous
SUBSECTION=Gates
DESCRIPTION=Smart Entrance Gate
[ITEMDEF i_Smart_exit]
ID=i_moongate_blue
NAME=Smart Exit Gate
ON=@CREATE
COLOR=07a1
ON=@STEP
IF !(<SRC.FINDID(M_Gate_Timer)>)
IF <SRC.TAG.ExitPoint>
SRC.GO <SRC.TAG.ExitPoint>
SRC.TAG.ExitPoint =
SRC.NEWITEM M_Gate_Timer
SRC.EQUIP <SRC.ACT>
ELSE
SRC.SYSMESSAGE You cannot use this gate.
ENDIF
ENDIF
CATEGORY=Miscellaneous
SUBSECTION=Gates
DESCRIPTION=Smart Exit Gate
[ITEMDEF m_Gate_Timer]
id=i_memory
Name=Gate Timer
type=t_eq_script
ON=@Create
TIMER=3
ON=@Timer
Remove
RETURN 1
ULTIMA ONE
The modern, sphere powered Ultima Online server
|
|
05-16-2013 01:18 AM |
|
|
User(s) browsing this thread: 1 Guest(s)