MMOMinion

Full Version: Player List
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Is it possible to list all users within a certain distance, have the bot target them and spam invite to an FC?
If so, could someone give me a helping hand in starting this... Interested in learning LUA and would like this to be my first script.
maybe something like...

Code:
local el = EntityList("chartype=4")
if ( el ) then
   local i,e = next(el)
   while (i~=nil and e~=nil) do

      // Your stuff

      local i,e = next(el,i)  
   end  
end

i don't test it but i think this will give you near players. The problem here is the invite part, bot doesn't have chat support
I would totally block you if you spam FC invite on me LOL
Random73 Wrote:I would totally block you if you spam FC invite on me LOL
So would I :P

Just so hopefully a few randoms join and I get level 8 quicker, then they all get kicked.
These first people of questions might sound stupid to people but please bare with me here... Can someone please point out why this doesn't work? Obviously I'm doing it wrong but still trying to learn.

Code:
-- Create a new table for our code:
mymodule= { }
-- Some local variables we use in our module:
mymodule.running = false
mymodule.lastticks = 0

-- Initializing function, we create a new Window for our module that has 1 button and 1 field to display data:
function mymodule.ModuleInit()
    GUI_NewWindow("mymodule",350,50,250,250);
    GUI_NewButton("mymodule","Start/Stop Invite","MYMODULE.TOGGLE");
    local el = EntityList("chartype=4", "maxdistance=50", "minlevel=30")
  if ( el ) then
    local i,e = next(el)
    while (i~=nil and e~=nil) do
        //Somehow invite code goes here?
    local i,e = next(el,i)  
    end  
  end
end

-- The function that gets called when the button is pressed:
function mymodule.ToggleRun()
    mymodule.running = not mymodule.running
end

-- The Mainloop function, gets called all the time by FFXIVMinion:
function mymodule.OnUpdateHandler( Event, ticks )
    if ( mymodule.running and ticks - mymodule.lastticks > 500 ) then
        mymodule.lastticks = ticks
-- if the player is alive, set the current HP value into the new field of our created Window:
        if (Player.alive) then
            hpvalue = tostring(Player.health.current)
        end
    end        
end

-- Registering the Events
RegisterEventHandler("Gameloop.Update",mymodule.OnUpdateHandler) -- the normal pulse from the gameloop
RegisterEventHandler("MYMODULE.TOGGLE", mymodule.ToggleRun) -- the function that gets called when our button is pressed
RegisterEventHandler("Module.Initalize",mymodule.ModuleInit) -- the initialization function, gets called only once at startup of the game

Appreciate any help in advance... I'm very keen to learn.
Please be specific when correcting me, I'll learn quicker if I know why things don't work.
It's not possible to invite people to a company with the current API.