Reminder, This is PAGE 2 on the forums, Check page 1, I have a new post there too.
Quote:
And also, would I be able to also like type "exitall" to exit that particular question and stop any other triggers which may bring up questions like those until activated by myself?
Hmm. Ok, first of all, I assume you made a trigger to call the "Ask_Encounter_Question". Let's say it's something like this:
<triggers>
<trigger
enabled="y"
match="Llama checks you out."
name="Mob_Llama_Enters"
script="Ask_Encounter_Question"
sequence="100"
>
</trigger>
</triggers>
The sample label above for the trigger is "Mob_Llama_Enters". We could build a subroutine to turn the trigger on and off:
Sub Toggle_AutoQuestion (Aliasname, AliasLine, arrWildcards)
Dim TriggerState
Dim TriggerName
TriggerName = "Mob_Llama_Enters"
If World.IsTrigger(TriggerName) Then
TriggerState = World.GetTriggerInfo(TriggerName, 8)
If TriggerState Then
World.EnableTrigger TriggerName, vbFalse
World.Note "Trigger Disabled: " & TriggerName
Else
World.EnableTrigger TriggerName, vbTrue
World.Note "Trigger Enabled: " & TriggerName
End if
Else
World.Note "Error: Couldn't find the trigger: " & TriggerName
End If
End Sub
That subroutine checks to see if the trigger exists. If so, if it was enabled, then it becomes disabled. If it was disabled, then it becomes enabled. You would use an alias to call that subroutine:
<aliases>
<alias
name="Toggle_AutoQuestion"
script="Toggle_AutoQuestion"
match="autoq"
enabled="y"
ignore_case="y"
>
</alias>
</aliases>
Use the copy and paste mentioned in the previous message to add that as an alias.
All of this code I have provided you works with just one trigger, hardcoded to a single mob. If you are interested in learning Visual Basic, you may want to take this on as a project, and see if you can modify the code so that it would work on multiple mobs (without duplicating the script a bunch of times for each mob) It might not be too hard.
Nick, I would like to point him to the Visual Basic Manual help file, but I don't want to navigate MS's site to find the link. Any chance you could host it yourself here as well, since so many people here are likely to need it?