Results 1 to 2 of 2

Thread: sequencial relogin

  1. #1
    Normal User
    Join Date
    Dec 2014
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    1 Post(s)
    Reputation
    10
    Rep Power
    3

    Post sequencial relogin

    Hello, I would like to know if is possible to connect a character using his number in the list and not his name. Using the function "connect" i need to give the name of the character, but i would like to choose his number in the character list. I intend to do a sequencial relogin, to relog all characters in the list. Anyone could help me?

  2. #2
    Normal User RafiXWPT's Avatar
    Join Date
    Jun 2012
    Location
    (Poland) http://rafixwptscripts.com
    Posts
    1,602
    Mentioned
    31 Post(s)
    Tagged
    1 Thread(s)
    Quoted
    128 Post(s)
    Reputation
    128
    Rep Power
    9
    Quote Originally Posted by Juninhu View Post
    Hello, I would like to know if is possible to connect a character using his number in the list and not his name. Using the function "connect" i need to give the name of the character, but i would like to choose his number in the character list. I intend to do a sequencial relogin, to relog all characters in the list. Anyone could help me?
    you can just create array with all names on your list and connect for each one there, it is a very simple solution.
    example:
    Lua Code:
    local charnames = {"char1", "char2", "char3"}
    local index_tmp
     
    for index, currentname in ipairs(charnames) do
    	if (name == currentname) then
    		index_tmp = index
    	end
    end
    if (index_tmp == #charnames) then
    	-- Do something when end of list
    else
    	-- Do something
     
    	connect(ACC, PASS, charnames[index_tmp + 1]) wait(2000)
    	setcavebot("yes")
    	gotolabel("start")
    	wait(2000)
    end

Posting Permissions

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