XenoBot Forums - Powered by vBulletin

User Tag List

Page 2 of 2 FirstFirst 12
Results 11 to 12 of 12

Thread: Lure monsters, kill then continue luring

  1. #11

    Join Date
    Jun 2017
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Oscagi View Post
    why dont make a fuction??

    Code:
    local Spawn = false
    -- This is for just lure when you are on the spawn.
    function onWalkerSelectLabel(labelName)
    	if (labelName == "Enter_Huntzone") then
    		Spawn = true
    	elseif (labelName == "Exit_Huntzone") then
    		Spawn = false
    	end
    end
    
    
    local MaxMonsters = 10 
    local function LureMonsters( ... )
    	local MonsterAmount = 0
    	for name, _ in Creature.iMonsters() do
    		MonsterAmount = MonsterAmount +1
    	end
    	if MonsterAmount => MaxMonsters and Spawn then
    		Walker.Stop()
    		Targeting.Start() -- Only if u disable before.
    	else
    		if MonsterAmount == 0 and Spawn then
    			Walker.Start()
    			Targeting.Stop() -- If you want lure without kill
    		end
    	end
    end
    --  I forget something bcs I take a long time without scripting.
    -- Make a module and execute the function.
    --PD: add a delay somewhere for wait monsters.
    You're awesome @Oscagi!

    People come to the forum so they can be helped.

    Talking what can be done does not help at all. Speaking what is already self-explanatory also does not help at all.

    What's more, people do not know how to do scripts by themselves, if you want to help, talk about functions, teach them.. or just look and do not respond ..

    I asked a question so that someone could help me somehow by teaching something about script or giving me a light at the end of the tunnel.

    Since no one can help, I did a quick-fix with the knowledge that I had.

    Soon people like @Oscagi and @DarkstaR showed up to help.

    Thanks for the explanations, this, in fact, helped in something.

    Ps: my english is as good as my scripts, sorry

  2. #12
    Senior Member Trykon's Avatar
    Join Date
    Nov 2014
    Location
    UK
    Posts
    952
    Mentioned
    11 Post(s)
    Tagged
    0 Thread(s)
    If you want to learn there is tons of tutorials on forum and outside, just Google lua tutorial, there is also xenobot.wikia with almost all commands needed so you should have no problem with thinking if there is command like this or not.
    I gave general info so with minimum knowledge and with a bit of search done on forum you could easily write it by yourself. If there is scripter that wanted to help in this particular scenario, great.
    This is not a nursery and even there you get help and guidance instead an answer.
    All my full afk scripts are accessible at:
    My thread
    My store
    My project
    Looking for RL Tibia testers - RP and EK scripts for FREE. Link to info.

Tags for this Thread

Posting Permissions

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