1. Script to leave Queue after X extentions

    Hello, I tried to write in my own addon a script to auto remove que after X extentions, but it doesn't work.

    local frame = CreateFrame("FRAME", nil, UIParent)
    frame:RegisterEvent("CHAT_MSG_SYSTEM")
    frame:SetScript("OnEvent",
    function(self, event, arg1)
    if arg1 == "Your matchmaking search radius has been extended 3/10 times"
    then
    AcceptBattlefieldPort(1,0) -- Removes Queue
    print("MMR extention reached 3/10, queue removed.")
    end
    end)

    I believe the synthax is correct in fact when I reach 3/10 I get the print message, though the queue doesn't get removed, I believe because it's an hardware function and may require click/button so it may be protected. Can someone confirm this, or have any other suggestion? I like to que for soloq but without having too much mmr extention.

    Thanks, greetings!

  2. Bump. We all need this boys.


  3. We need warmane to actually listen to their players for once and see how their queue system is a total failure.

  4. Originally Posted by lqt8
    I believe because it's an hardware function and may require click/button so it may be protected.
    That's correct. You can't call AcceptBattlefieldPort outside of HE (hardware events) as it is protected and will only cause taint.
    Only HE (user input) will be able to do so.

    What you _could_ do though is creating a popup to inform you when you reach the MMR extention and assign AcceptBattlefieldPort to its OnClick function.
    OnClick events are HE and therefore will be allowed to call AcceptBattlefieldPort.

    quickly put together:
    Code:
    local mmrExtention = 3 -- change this to match your preferred extention level
    StaticPopupDialogs['MMR_EXTENTION'] = {
    	text = mmrExtention..'/10 MMR extention reached.\n Accepting will leave the queue!',
    	button1 = 'Leave Queue',
    	OnAccept = function()
    		AcceptBattlefieldPort(1, 0)
    		RaidNotice_AddMessage(RaidWarningFrame, 
    			'Queue left, please queue again!', 
    			ChatTypeInfo['RAID_WARNING']
    		) 
    		PlaySound('RaidWarning')
    	end,
    	timeout = 0,
    	whileDead = 1,
    	hideOnEscape = 1,
    	preferredIndex = 3,
    }
    
    local frame = CreateFrame('FRAME', nil, UIParent)
    frame:RegisterEvent('CHAT_MSG_SYSTEM')
    frame:SetScript('OnEvent',function(self, event, message)
    	if message:match(mmrExtention..'/10 times') then
    		StaticPopup_Show('MMR_EXTENTION')
    	end
    end)
    Can't really say it's much quicker this way, though you get notified (hence the RaidWarning) if your extention reaches your preferred level.

  5. @aelwi thanks for the help, but my main goal was to have the que removed automatically, because usually I que up then I tab and do something else while waiting, on night the queues are long, and same if I play dps.
    Maybe we should ask admins to implement something like this automatically, idk how. Maybe unlocking the lua command that click the battlefield port? At the end it's not something "abusable" and people still script today (interrupt mainly) but having the AcceptBattlefieldPort unlocked could be a solution, then everyone can write his addon.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •