Posted by
| Thebloodsiren
(13 posts) bio
|
Message
| Yes that would work. I store the exits in a variable because i dont wont to 'scan' the exits everytime i move - just at special times. The way i have it currently is that i update the exits into a variable through the use of a trigger, and have an alias that lets me "scan" through all the exits when i want to.
My full scripts are like this (in case anyone is interested)
'*****Scan Exits Script*****
sub ToggleExitTrigger(name,output,wildcards)
if world.GetTriggerInfo ("UpdateExits", 8)=0 then
world.AddTrigger "UpdateExits", "*Obvious exits: *", "", 17417, -1, 0, "", "UpdateExits"
world.AddAlias "ScanExits", "scan","", 17409, "ScanExits"
world.note "Enabling Exit Updates
else
world.enabletrigger "UpdateExits", false
world.DeleteVariable "EXITS"
world.note "Disabling Exit Updates"
end if
end sub
sub UpdateExits(name, output, wildcards)
world.SetVariable "EXITS", wildcards (2)
end sub
sub ScanExits(name,output,wildcards)
for each x in split ("" & world.getvariable("EXITS")) world.send "look " & x
next
end sub
'*****
Basically the ToggleExitTrigger is assingned to a Macro or an Alias and lets me toggle on/off the whole system. (the script creates the trigger that updates the variable storing the exits, and also the alias that i use to "scan")
UpdateExits is linked to my trigger so it updates the exits each time i move around the mud world.
ScanExits is linked to an alias or macro so you can look in the directions currently stored in the Exits variable.
For now it seems to work, if you had any improvements on code efficiency etc it would be handy. I dont want to slow the mushclient down too much. |
-----------------------------------
Calm down, its only ones and zeros. | top |
|