Update 'GenieHunt_Script.xml'

main
icecool 3 years ago
parent bacedfe5c2
commit 6e2622b123

@ -18,85 +18,25 @@
</plugin>
<aliases>
<alias
script="aliasHuntFirstSand"
match="sandhunt"
name="aliasSandHunt"
keep_evaluating="y"
enabled="y"
regexp="n"
send_to="12"
sequence="100">
</alias>
<alias
match="^(llook|sandhunt)$"
script="aliasLoopLook" name="aliasLoopLook" keep_evaluating="y" enabled="y" regexp="y" send_to="12" sequence="100">
</alias>
</aliases>
<triggers>
<trigger
name="triggerHunt1Sand"
enabled="n"
group="triggerGenieHunt"
script="triggerProcessHunt"
match="^You are certain that blizzard of sand is (?<dir>\w+) from here.$"
omit_from_output="y"
regexp="y"
sequence="100"
>
</trigger>
<trigger
name="triggerHunt3Sand"
enabled="n"
group="triggerGenieHunt"
script="triggerProcessHunt"
match="^You are certain that blizzard of sand is (?<dir>\w+) from here.$"
omit_from_output="y"
regexp="y"
sequence="100"
>
</trigger>
<trigger
name="triggerHunt5Sand"
enabled="n"
group="triggerGenieHunt"
script="triggerProcessHunt"
match="^You are certain that blizzard of sand is (?<dir>\w+) from here.$"
omit_from_output="y"
regexp="y"
sequence="100"
>
</trigger>
<trigger
name="triggerHunt7Sand"
enabled="n"
group="triggerGenieHunt"
script="triggerProcessHunt"
match="^You are certain that blizzard of sand is (?<dir>\w+) from here.$"
omit_from_output="y"
regexp="y"
sequence="100"
>
</trigger>
<trigger
name="triggerHunt9Sand"
enabled="n"
group="triggerGenieHunt"
script="triggerProcessHunt"
match="^You are certain that blizzard of sand is (?<dir>\w+) from here.$"
omit_from_output="y"
regexp="y"
sequence="100"
>
</trigger>
<trigger
name="triggerHunt11Sand"
enabled="n"
group="triggerGenieHunt"
script="triggerProcessHunt"
match="^You are certain that blizzard of sand is (?<dir>\w+) from here.$"
omit_from_output="y"
regexp="y"
sequence="100"
>
</trigger>
<trigger
match="^(\s+)?\-\s+\w+\,\s+Sat\sApr\s+\d+\s+\d+:\d+:(?<seconds>\d+)\s+\d+\.$"
name="findGenieLoop" enabled="n" group="GenieLoops" script="findGenieLoop" omit_from_output="y" regexp="y" sequence="100"
> </trigger>
<trigger
match="NOGRAF HERE!"
name="GenieGrafGagNoGraf" enabled="n" group="GenieLoops" omit_from_output="y" regexp="n" sequence="100"
> </trigger>
<trigger
match="test"
name="GenieGrafGagTest" enabled="n" group="GenieLoops" omit_from_output="y" regexp="n" sequence="100"
> </trigger>
</triggers>
<!-- Get our standard constants -->
@ -106,95 +46,37 @@
<!-- Script -->
<script>
<![CDATA[
-- Initialize the GenieHunt table
function initializeGenieHunt()
GenieHunt = { }
GenieHunt.OneSand = ""
GenieHunt.ThreeSand = ""
GenieHunt.FiveSand = ""
GenieHunt.SevenSand = ""
GenieHunt.NineSand = ""
GenieHunt.ElevenSand = ""
dofile(GetInfo(60) .. "aardwolf_colors.lua") -- Used to support Aard Colors for the cnote() function
-- Basic print function that supports aard, xterm, and ANSI color codes [idea from Durel's Inventory script]
function cnote(string)
AnsiNote(stylesToANSI(ColoursToStyles(string)))
end
-- Begin the hunting of the first sand which includes initializing the table/etc
function aliasHuntFirstSand()
initializeGenieHunt()
functionHuntSand(1)
function aliasLoopLook( name, lines, args )
cnote( "@D[@MGenie@D] @C>> @WProcessing Loop Data @C<<@w" )
Note()
EnableTriggerGroup( "GenieLoops", true )
SendNoEcho( "look graffiti" )
end
-- Process the Hunt Triggers
function triggerProcessHunt(name, line, arg)
if name == "triggerHunt1Sand" then
EnableTrigger("triggerHunt1Sand", false )
GenieHunt.OneSand = arg.dir:upper()
ColourNote( "gray", "black", "[", "white", "black", "GenieHunt", "gray", "black", "]:", "lightskyblue", "black", "GenieHunt.OneSand is set to ", "red", "black", GenieHunt.OneSand )
functionHuntSand(3)
elseif name == "triggerHunt3Sand" then
EnableTrigger("triggerHunt3Sand", false )
GenieHunt.ThreeSand = arg.dir:upper()
ColourNote( "gray", "black", "[", "white", "black", "GenieHunt", "gray", "black", "]:", "lightskyblue", "black", "GenieHunt.ThreeSand is set to ", "red", "black", GenieHunt.ThreeSand )
functionHuntSand(5)
elseif name == "triggerHunt5Sand" then
EnableTrigger("triggerHunt5Sand", false )
GenieHunt.FiveSand = arg.dir:upper()
ColourNote( "gray", "black", "[", "white", "black", "GenieHunt", "gray", "black", "]:", "lightskyblue", "black", "GenieHunt.FiveSand is set to ", "red", "black", GenieHunt.FiveSand )
functionHuntSand(7)
elseif name == "triggerHunt7Sand" then
EnableTrigger("triggerHunt7Sand", false )
GenieHunt.SevenSand = arg.dir:upper()
ColourNote( "gray", "black", "[", "white", "black", "GenieHunt", "gray", "black", "]:", "lightskyblue", "black", "GenieHunt.SevenSand is set to ", "red", "black", GenieHunt.SevenSand )
functionHuntSand(9)
elseif name == "triggerHunt9Sand" then
EnableTrigger("triggerHunt9Sand", false )
GenieHunt.NineSand = arg.dir:upper()
ColourNote( "gray", "black", "[", "white", "black", "GenieHunt", "gray", "black", "]:", "lightskyblue", "black", "GenieHunt.NineSand is set to ", "red", "black", GenieHunt.NineSand )
functionHuntSand(11)
elseif name == "triggerHunt11Sand" then
EnableTrigger("triggerHunt11Sand", false )
GenieHunt.ElevenSand = arg.dir:upper()
ColourNote( "gray", "black", "[", "white", "black", "GenieHunt", "gray", "black", "]:", "lightskyblue", "black", "GenieHunt.ElevenSand is set to ", "red", "black", GenieHunt.ElevenSand )
functionPrintLoop()
end
end
-- Handle activating and hunting the correct Sand
function functionHuntSand(hnumber)
if hnumber == 1 then
SendNoEcho( "hunt 1.sand noportal")
EnableTrigger("triggerHunt1Sand", true )
elseif hnumber == 3 then
SendNoEcho( "hunt 3.sand noportal")
EnableTrigger("triggerHunt3Sand", true )
elseif hnumber == 5 then
SendNoEcho( "hunt 5.sand noportal")
EnableTrigger("triggerHunt5Sand", true )
elseif hnumber == 7 then
SendNoEcho( "hunt 7.sand noportal")
EnableTrigger("triggerHunt7Sand", true )
elseif hnumber == 9 then
SendNoEcho( "hunt 9.sand noportal")
EnableTrigger("triggerHunt9Sand", true )
elseif hnumber == 11 then
SendNoEcho( "hunt 11.sand noportal")
EnableTrigger("triggerHunt11Sand", true )
end
end
function functionPrintLoop()
if GenieHunt.OneSand == "EAST" and GenieHunt.ThreeSand == "EAST" and GenieHunt.FiveSand == "EAST" then
SendNoEcho( "gt @D[@MGenie@D] @C>> @GLoop 1 is here. @C<<@w" )
elseif GenieHunt.ThreeSand == "EAST" and GenieHunt.FiveSand == "EAST" and GenieHunt.SevenSand == "EAST" then
SendNoEcho( "gt @D[@MGenie@D] @C>> @GLoop 2 is here. @C<<@w" )
elseif GenieHunt.FiveSand == "EAST" and GenieHunt.SevenSand == "EAST" and GenieHunt.NineSand == "EAST" then
SendNoEcho( "gt @D[@MGenie@D] @C>> @GLoop 3 is here. @C<<@w" )
elseif GenieHunt.SevenSand == "EAST" and GenieHunt.NineSand == "EAST" and GenieHunt.ElevenSand == "EAST" then
SendNoEcho( "gt @D[@MGenie@D] @C>> @GLoop 4 is here. @C<<@w" )
elseif GenieHunt.OneSand == "EAST" and GenieHunt.NineSand == "EAST" and GenieHunt.ElevenSand == "EAST" then
SendNoEcho( "gt @D[@MGenie@D] @C>> @GLoop 5 is here. @C<<@w" )
elseif GenieHunt.OneSand == "EAST" and GenieHunt.ThreeSand == "EAST" and GenieHunt.ElevenSand == "EAST" then
SendNoEcho( "gt @D[@MGenie@D] @C>> @GTrap Loop is here. @C<<@w" )
end
function findGenieLoop( name, lines, args )
local sec = tonumber(args.seconds)
if sec == 22 then
SendNoEcho( "gt @D[@MGenie@D] @C>> @GLoop 1 is here. @C<<@w" )
elseif sec == 30 then
SendNoEcho( "gt @D[@MGenie@D] @C>> @GLoop 2 is here. @C<<@w" )
elseif sec == 32 then
SendNoEcho( "gt @D[@MGenie@D] @C>> @GLoop 3 is here. @C<<@w" )
elseif sec == 35 then
SendNoEcho( "gt @D[@MGenie@D] @C>> @GLoop 4 is here. @C<<@w" )
elseif sec == 37 then
SendNoEcho( "gt @D[@MGenie@D] @C>> @GLoop 5 is here. @C<<@w" )
elseif sec == 39 then
SendNoEcho( "gt @D[@MGenie@D] @C>> @GLoop @RTRAP@G is here. @C<<@w" )
else
SendNoEcho( "gt @D[@MGenie@D] @C>> @RERROR!! This is not a loop. @C<<@w" )
end
EnableTrigger( "findGenieLoop", false )
end
]]>

Loading…
Cancel
Save