Skip to content
Outlands Hub

Razor script

Chivalry-Gate Escape

by nev0r · 97 lines
Download

Compatibility unverified

This community Razor script has not been tested in game by the Hub. Read its setup and client requirements before use.

Opens and/or uses a chivalry gate to your custom destination - 'READ BEFORE USE:' server system messages are needed to determine necessary actions, make sure they are not filtered for scripts: Razor -> Filters ->…

Chivalry
Chivalry-Gate Escape.razor
1# This is an automated backup - check out https://outlands.uorazorscripts.com/script/ea2dee73-4296-44fe-95b3-df7515b5c632 for latest2# Automation by Jaseowns3## Script: Chivalry-Gate Escape4## Created by: nev0r#05#############################################6 7//////////////////////////////////////////8//9// Chivalry-Gate Escape 10//11// - Opens and/or uses a chivalry gate to your custom destination12// - 'READ BEFORE USE:' server system messages are needed to determine necessary actions, make sure they are not filtered for scripts: 13//      Razor -> Filters -> Text&Messages ->14//      - 'Uncheck Filter repeating system messages'15//      - 'Enable text filter' and 'Filter system messages' (list entry sub-menu) can be checked, however 'Ignore filtered messages in overhead and scripts' (list entry sub-menu) has to be unchecked16//17//////////////////////////////////////////18 19//Set variables20setvar! chivDestinationGump  148265381421setvar! gateConfirmGump      389901987122 23setvar!  chivOverheadCD 100024settimer chivOverheadTimer chivOverheadCD25 26setvar! globalWait 50027 28setvar! cError    3729setvar! cWarning  5330setvar! cInfo    10031 32//Prerequisite validation33if skill "Chivalry" < 95 or skill "Tactics" < 9034   setvar! chivCantGate 135elseif not findtype "paladin spellbook" backpack36   @clearignore 37   if not findtype "paladin spellbook" backpack38      setvar! chivCantGate 239   endif40else41   setvar! chivCantGate 042endif43 44if mounted45    setvar! chivGateSearchRange 1246else47    setvar! chivGateSearchRange 648endif49 50//Clear relevant system messages from our log51if insysmsg "before you may use that ability again" or insysmsg "You do not have enough holy symbols for that ability." or insysmsg "You receive a Sacred Journey damage bonus of" or insysmsg "You have been in combat too recently to use that ability." or insysmsg "A mysterious force prevents your spell from working here."52endif53gumpclose gateConfirmGump54 55//Go for it56while not dead57   if insysmsg "You receive a Sacred Journey damage bonus of"58      break59   elseif findtype "moongate" ground 2091 -1 1 as myChivGate and gumpexists gateConfirmGump60      gumpresponse 2 gateConfirmGump61   elseif findtype "moongate" ground 2091 -1 1 as myChivGate62      dclick myChivGate63   elseif chivCantGate > 0 and findtype "moongate" ground 2091 -1 18 as myChivGate or findtype "moongate" ground 2091 -1 chivGateSearchRange as myChivGate64      if timer chivOverheadTimer > chivOverheadCD 65        overhead "Go to gate" cInfo66        overhead " Gate"      cInfo myChivGate67        overhead "  �  "      cInfo myChivGate68        settimer chivOverheadTimer 069      endif70   elseif chivCantGate = 171      overhead "Skill too low to use Sacred Journey" cError72      break73   elseif chivCantGate = 274      overhead "We need a chiv book!" cError75      break76   elseif gumpexists chivDestinationGump77      gumpresponse 4 chivDestinationGump78   elseif insysmsg "You must wait another 30 seconds before you may use that ability again"79      //Prevent wrong overhead info80   elseif insysmsg "before you may use that ability again" or insysmsg "You do not have enough holy symbols for that ability."81      overhead "Sacred Journey not ready" cWarning82      wait globalWait83   elseif insysmsg "You have been in combat too recently to use that ability."84      overhead "You have been in combat too recently to use Sacred Journey. Wait..." cWarning85      wait globalWait86   elseif insysmsg "A mysterious force prevents your spell from working here."87      overhead "A mysterious force prevents your spell from working here. Move..." cWarning88      wait globalWait89   else90      hotkey "Sacred Journey"91      getlabel backpack waitForPing92   endif93endwhile94 95//Clean up96waitforgump gateConfirmGump globalWait97gumpclose gateConfirmGump