Adding Who Level Check (Will give 20$/60Day (US) GC for help) menu

Shout-Out

User Tag List

Results 1 to 7 of 7
  1. #1
    Dirtyangel's Avatar Contributor
    Reputation
    97
    Join Date
    Jul 2010
    Posts
    143
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Adding Who Level Check (Will give 20$/60Day (US) GC for help)

    How do you add who level check to filter 1 - 84 and only trigger invites on level 85?

    Code:
    local on = 1
    local whispCommand = "www"
    
    
    
    local aName, aTable = ...
    local pName = aName..": "
    function aTable:OnEvent(event, ...)
    	local msg, name = ...
    	if event == "CHAT_MSG_WHISPER" then
    		aTable.ginv(msg, name)
    	end
    end
    function aTable.ginv(msg, name)
    	if msg == whispCommand then
    			GuildInvite(name)
    	else
    		return
    	end
    end
    local f = CreateFrame("Frame")
    f:RegisterEvent("CHAT_MSG_WHISPER")
    f:SetScript("OnEvent", aTable.OnEvent)
    I would gladly give 60 days (US) game code or paypal 20$ to whoever makes it work, it's a simple modification yet I need it badly, and this is a matter of life and death.

    Adding Who Level Check (Will give 20$/60Day (US) GC for help)
  2. #2
    #ClumsyWizard's Avatar Contributor The Clumsiest of Wizards CoreCoins Purchaser
    Reputation
    227
    Join Date
    Sep 2006
    Posts
    744
    Thanks G/R
    3/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
     
    local
     
    
    
     on = 1
    
    local
     
    
    
     whispCommand = "www"
    
    local
     
    
    
     levelStart = 85
    
    local
     
    
    
     levelEnd = 85
    
    local
     
    
    
     aName, aTable = ...
    
    local
     
    
    
     pName = aName..": "
    
    function
     
    
    
     aTable:OnEvent(event, ...)
    
    local
     
    
    
     msg, name = ...
    
    if
     
    
    
     event == "CHAT_MSG_WHISPER"then
     
    aTable.ginv(msg, name)
    
    end
     
    end
     
    function
     
    
    
     aTable.ginv(msg, name)
    
    if
     
    
    
     msg == whispCommand then
     
    GuildInvite(name)
    
    else
     
    return
     
    end
     
    end
     
    local
     
    
    
     f = CreateFrame("Frame")
     
    f:RegisterEvent(
    "CHAT_MSG_WHISPER")
     
    f:SetScript(
    "OnEvent", aTable.OnEvent
    After looking at the API again, and reading through other addons, breaking them and testing to see how they tick I came up with the code above, though there is no filter other than an altered /who level range.

    And the odd colours are from the program I was using.

  3. #3
    Dirtyangel's Avatar Contributor
    Reputation
    97
    Join Date
    Jul 2010
    Posts
    143
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I love you, didn't get a chance to test it yet, the servers are down.

    Are you US by any chance?

  4. #4
    #ClumsyWizard's Avatar Contributor The Clumsiest of Wizards CoreCoins Purchaser
    Reputation
    227
    Join Date
    Sep 2006
    Posts
    744
    Thanks G/R
    3/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes, I'm US.

    Also if it doesn't quite work for you, tell me what the issue is and I'll fix it.

    I am unable to test it for you due to lack of game time, and I'm unsure if trial accounts can use the /who function

  5. #5
    Dirtyangel's Avatar Contributor
    Reputation
    97
    Join Date
    Jul 2010
    Posts
    143
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    World Server is now online, can't seem to get it working. (Cataclysm Account)

  6. #6
    #ClumsyWizard's Avatar Contributor The Clumsiest of Wizards CoreCoins Purchaser
    Reputation
    227
    Join Date
    Sep 2006
    Posts
    744
    Thanks G/R
    3/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Dirtyangel View Post
    World Server is now online, can't seem to get it working. (Cataclysm Account)
    Thank you, looking into it. I'll post my fix shortly.

    ---------- Post added at 10:42 AM ---------- Previous post was at 10:30 AM ----------

    Code:
    local
    
     on = 1
    
    local
    
     whispCommand = "www"
    
    local
    
     aName, aTable = ...
    
    local
    
     pName = aName..": "
    
    function
    
     aTable:OnEvent(event, ...)
    
    local
    
     msg, name = ...
    
    if
    
     event == "CHAT_MSG_WHISPER"then
    
    aTable.ginv(msg, name)
    
    end
    
    end
    
    function
    
     aTable.ginv(msg, name)
    
    if
    
     msg == whispCommand then
    
    GuildInvite(name)
    
    else
    
    return
    
    end
    
    end
    
    local
    
     f = CreateFrame("Frame")
    
    f:RegisterEvent(
    "CHAT_MSG_WHISPER")
    
    f:SetScript(
    "OnEvent", aTable.OnEvent)
    
    --Local # variables
    
    local
    
     levelStart = 85
    
    local
    
     levelEnd = 85
    
    local
    
     levelProgress = 1
    
    local
    
     levelIncrement = 5
    
    local
    
     lstGathered = 0
    
    local
    
     numWhos = 0
    
    local
    
     declineCount = 0
    
    local
    
     lastClass, lastRace = 1, 1
    
    --Local table variable(s)
    
    local
    
     Inviteable = { ['CHARNAME'] = {} }
    
    local
    
     classes = { "Priest", "Warrior", "Warlock", "Druid", "Rogue", "Mage", "Hunter", "Paladin", "Shaman", "Death Knight" }
    
    local
    
     racesA = { "Gnome", "Human", "Night Elf", "Draenei", "Dwarf", "Worgen" }
    
    local
    
     racesH = { "Undead", "Orc", "Troll", "Blood Elf", "Tauren", "Goblin" }
    
    --Default Settings, if we don't have them saved this is what gets put in.
    
    DefaultSettings = {
    
    	[
    "msg"] = "Hello. Would you like to join my guild? If you decline, you will not get this message again.",
    
    	[
    "msgPlayer"] = false,
    
    	[
    "verbose"] = true,
    
    	[
    "autostart"] = true,
    
    	}
    
    --This is called after a who search is COMPLETED.
    
    function
    
     frame:WHO_LIST_UPDATE()
    
    numWhos = GetNumWhoResults() 
    or 0
    
    for
    
     i=1, numWhos do
    
    	
    
    	name, guild, level, race, class, zone, group = GetWhoInfo(i);
    
    	
    
    	
    if (guild=="") then
    
    		
    local AlreadyInvited = false
    
    		
    local pattern = "[0-9\| :]";
    
    	    
    if( string.find( name, pattern ) ~= nil ) then--this happens sometimes when in BG
    
    			AlreadyInvited = 
    true--so we'll exclude that name
    
    		
    end
    
    		
    for v in pairs(Inviteable.CHARNAME) do
    
    				
    if (name:lower()==Inviteable.CHARNAME[v]:lower()) then
    
    					AlreadyInvited = 
    true
    
    				
    end
    
    		
    end
    
    		
    for v in pairs(Invited.CHARNAME) do
    
    			
    if (name:lower()==Ni_Invited.CHARNAME[v]:lower()) then
    
    				AlreadyInvited = 
    true
    
    			
    end
    
    		
    end
    
    		
    if (level==1) then
    
    			AlreadyInvited = 
    true
    
    		
    end
    
    		
    if (AlreadyInvited==false) then
    
    			table.insert(Inviteable.CHARNAME,name)
    
    			lstGathered = lstGathered 
    or 0
    
    			lstGathered = lstGathered + 1
    
    		
    end
    
    	
    end
    
    	
    
    end
    
    if
    
     (forceShort == false) then
    
    if
    
     (longSearch == true) then
    
    		
    if (uberLongSearch == true) then
    
    			lastRace = lastRace + 1;
    
    			
    if (racesH[lastRace] == nil) then
    
    				uberLongSearch = 
    false;
    
    				lastClass = lastClass + 1;
    
    				
    if (classes[lastClass] == nil) then
    
    					longSearch = 
    false;
    
    					levelStart = levelStart + levelIncrement;
    
    				
    end
    
    			
    end
    
    		
    else
    
    			
    if (numWhos >= 49) then
    
    				lastRace = 1;
    
    				uberLongSearch = 
    true;
    
    				
    return
    
    			
    end
    
    			lastClass = lastClass + 1;
    
    			
    if (classes[lastClass] == nil) then
    
    				longSearch = 
    false;
    
    				levelStart = levelStart + levelIncrement;
    
    			
    end
    
    		
    end
    
    else
    
    	
    if (numWhos >= 49) then
    
    		lastClass = 1;
    
    		longSearch = 
    true;
    
    		
    return
    
    	
    else
    
    		longSearch = 
    false;
    
    		levelStart = levelStart + levelIncrement;
    
    	
    end
    
    end
    
    else
    
    	levelStart = levelStart + levelIncrement;
    
    end
    
    if
    
     (levelStart>=levelEnd) then
    
    	StopSearch()
    
    end
    
    end
    
    --This function stops all searching, resets some variables.
    
    function
    
     StopSearch()
    
    	searching = 
    false
    
    	FriendsFrame:RegisterEvent(
    "WHO_LIST_UPDATE");
    
    	SetWhoToUI(0)
    
    	Message(
    "Stopped")
    
    	print (
    "Gathered " .. table.getn(Inviteable.CHARNAME) .. " characters.")
    
    	frame:UnregisterEvent
    "WHO_LIST_UPDATE"
    
    	levelStart = 85
    
    	lastClass = 1
    
    	lastRace = 1
    
    	longSearch = 
    false
    
    	uberLongSearch = 
    false
    
    	forceShort = 
    false
    
    	
    if (Ni_Settings.autostart == true) then
    
    		SlashCmdList.GINV(
    "startinvite")
    
    	
    end
    
    		
    
    end 


    Does that work?

    I think it will.

  7. #7
    Dirtyangel's Avatar Contributor
    Reputation
    97
    Join Date
    Jul 2010
    Posts
    143
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Still doesn't work, no matter the level is :confused:

Similar Threads

  1. Replies: 12
    Last Post: 09-29-2012, 02:17 PM
  2. giveing away 2k wow gold for help remotly
    By b3tter845 in forum WoW EMU Questions & Requests
    Replies: 0
    Last Post: 11-22-2009, 05:14 PM
  3. i will give rep for nice weapon picthures
    By asolu in forum World of Warcraft General
    Replies: 3
    Last Post: 12-26-2006, 06:46 AM
All times are GMT -5. The time now is 06:20 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search