can some1 please tell me what i need to do to this to make it work in zones outside of ironforge,trigger for this is auras changed it is inside of itemrack
local zone = GetRealZoneText(),0
if
zone != "Ironforge"
then
SendChatMessage("test","SAY")
end
no error popups but it doesnt work,yet if i change != to == and mount in if it works
thnx steve,found another way of doing it tho ,for those that use itemrack this will equip ur riding set when not in the zones listed
local zone = GetRealZoneText(),0
if (not (zone =="Warsong Gulch"))
and (not (zone == "Arathi Basin"))
and (not (zone == "Ahn'Qiraj"))
and (not (zone == "Alterac Valley"))
then
local mount = ItemRack_PlayerMounted()
if not IR_MOUNT and mount
then EquipSet()
elseif IR_MOUNT and not mount
then LoadSet()
end IR_MOUNT=mount
else
end
local zone = GetRealZoneText(),0
if (zone ~="Warsong Gulch")
and (zone ~= "Arathi Basin")
and (zone ~= "Ahn'Qiraj")
and (zone ~= "Alterac Valley")
then
local mount = ItemRack_PlayerMounted()
if not IR_MOUNT and mount
then EquipSet()
elseif IR_MOUNT and not mount
then LoadSet()
end IR_MOUNT=mount
else
end
The benefit to doing it Malreth's way is that if a condition is met, it doesn't have to check against the rest of the conditionals. Not that you'd really notice it in that code.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
local zone = GetRealZoneText(),0
if
zone != "Ironforge"
then
SendChatMessage("test","SAY")
end
no error popups but it doesnt work,yet if i change != to == and mount in if it works
Steve
local zone = GetRealZoneText(),0
if (not (zone =="Warsong Gulch"))
and (not (zone == "Arathi Basin"))
and (not (zone == "Ahn'Qiraj"))
and (not (zone == "Alterac Valley"))
then
local mount = ItemRack_PlayerMounted()
if not IR_MOUNT and mount
then EquipSet()
elseif IR_MOUNT and not mount
then LoadSet()
end IR_MOUNT=mount
else
end
Logically that's the same as:
<has flashbacks to PHL 313K>
if p then q... wait... no... no more... mommy?
local zone = GetRealZoneText(),0
if (zone ~="Warsong Gulch")
and (zone ~= "Arathi Basin")
and (zone ~= "Ahn'Qiraj")
and (zone ~= "Alterac Valley")
then
local mount = ItemRack_PlayerMounted()
if not IR_MOUNT and mount
then EquipSet()
elseif IR_MOUNT and not mount
then LoadSet()
end IR_MOUNT=mount
else
end