Need help creating a loop menu

User Tag List

Results 1 to 3 of 3
  1. #1
    Luciferozzy's Avatar Member
    Reputation
    2
    Join Date
    Apr 2011
    Posts
    81
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Need help creating a loop

    Hi i need help creating a loop function and i was hopeing some nice ppl in here could help me.

    What i need is a loop that looks thru the raid to see how many got a certain buff
    but i only want it to return if the person also got hp below lets say 90
    and then I want to use the return to cast a spell.
    lets say 5 ppl got the buff and are below 90 hp i want to cast a spell.

    Is this possible?

    Need help creating a loop
  2. #2
    MrTheSoulz's Avatar Contributor
    Reputation
    143
    Join Date
    Nov 2013
    Posts
    192
    Thanks G/R
    19/32
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Luciferozzy View Post
    Hi i need help creating a loop function and i was hopeing some nice ppl in here could help me.

    What i need is a loop that looks thru the raid to see how many got a certain buff
    but i only want it to return if the person also got hp below lets say 90
    and then I want to use the return to cast a spell.
    lets say 5 ppl got the buff and are below 90 hp i want to cast a spell.

    Is this possible?
    Something like this?
    Havent tested it, just created it now
    Code:
    function SomeFunction(buff, amount, health)
    	local units = 0
    	if IsInGroup() or IsInRaid() then
    		local prefix = (IsInRaid() and 'raid') or 'party'
    		for i = 1, GetNumGroupMembers() do
    			local Obj = prefix..i
    			if math.floor((UnitHealth(Obj) / UnitHealthMax(Obj)) * 100) <= health then
    				local Name, _,_, Count, _,_,_,_,_,_, Id = UnitBuff(Obj, buff) 
    				if Count then
    					units = units + 1
    				end
    			end
    		end
    		
    	end
    	return units >= amount
    end
    Those who would give up essential Liberty, to purchase a little temporary Safety, deserve neither Liberty nor Safety.

  3. #3
    Luciferozzy's Avatar Member
    Reputation
    2
    Join Date
    Apr 2011
    Posts
    81
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Something exactly like that

    What i was thinking about, was to make it detect how many got renewing mist
    and if the amount is right i want it to cast uplift.
    Iam just not that good with codeing :P

Similar Threads

  1. I need help creating a guild!!
    By x9-DesolatioN in forum World of Warcraft General
    Replies: 6
    Last Post: 12-27-2009, 06:55 PM
  2. Need help create item :/
    By robinelitenn in forum WoW EMU Questions & Requests
    Replies: 5
    Last Post: 07-09-2009, 08:02 AM
  3. Need Help Creating a Good Proxy Seteup for Paypal
    By dk1st in forum WoW Scam Prevention
    Replies: 2
    Last Post: 07-06-2008, 12:10 AM
  4. [Help] I need help creating a script.
    By jokerjokes in forum World of Warcraft Emulator Servers
    Replies: 23
    Last Post: 01-10-2008, 10:06 PM
  5. Need help creating accounts (3dgreengiant + chrispee repack)
    By ADAMZY in forum World of Warcraft Emulator Servers
    Replies: 19
    Last Post: 11-23-2007, 10:24 AM
All times are GMT -5. The time now is 07:44 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search