XenoBot Forums - Powered by vBulletin

User Tag List

Results 1 to 7 of 7

Thread: Foulwerp's Scripts

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Join Date
    Sep 2015
    Posts
    38
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Post Foulwerp's Scripts

    lua code:
    -- ╔═╗┬ ┬┌┬┐┌─┐  ╔═╗┬┌─┐┬ ┬┌─┐┬─┐
    -- ╠═╣│ │ │ │ │ ╠╣ │└─┐├─┤├┤ ├┬┘
    -- ╩ ╩└─┘ ┴ └─┘ ╚ ┴└─┘┴ ┴└─┘┴└─
    -- ╔╗ ┬ ┬ ╔═╗┌─┐┬ ┬┬ ┬ ┬┌─┐┬─┐┌─┐
    -- ╠╩╗└┬┘ ╠╣ │ ││ ││ │││├┤ ├┬┘├─┘
    -- ╚═╝ ┴ ╚ └─┘└─┘┴─┘└┴┘└─┘┴└─┴

    -- If Randomize is true will select random tiles to fish.
    -- If Randomize is false will procedurally select tiles to fish.

    Randomize = false

    Module.New("Auto Fisher", function(Module)
    if Self.ItemCount(3492) > 0 and Self.ItemCount(3483) > 0 and Self.Cap() > 5 then
    p = Self.Position()
    if Randomize then
    x = math.random(p.x -7, p.x + 7)
    y = math.random(p.y -5, p.y + 5)
    while table.isStrIn({4597,4598,4599,4600,4601,4602}, Map.GetTopUseItem(x, y, p.z).id) and Map.IsTileOnScreen(x, y, p.z) do
    Self.UseItemWithGround(3483, x, y, p.z)
    wait(Self.Ping() + 1000)
    end
    else
    for i = -7, 7 do
    for j = -5, 5 do
    x = p.x + i
    y = p.y + j
    while table.isStrIn({4597,4598,4599,4600,4601,4602}, Map.GetTopUseItem(x, y, p.z).id) and Map.IsTileOnScreen(x, y, p.z) do
    Self.UseItemWithGround(3483, x, y, p.z)
    wait(Self.Ping() + 1000)
    end
    end
    end
    end
    end
    Module:Delay(1000)
    end)

    lua code:
    -- ╔═╗┬  ┬┌┬┐┌─┐  ╔╦╗┬─┐┌─┐┬┌┐┌┌─┐┬─┐
    -- ╚═╗│ ││││├┤ ║ ├┬┘├─┤││││├┤ ├┬┘
    -- ╚═╝┴─┘┴┴ ┴└─┘ ╩ ┴└─┴ ┴┴┘└┘└─┘┴└─
    -- ╔╗ ┬ ┬ ╔═╗┌─┐┬ ┬┬ ┬ ┬┌─┐┬─┐┌─┐
    -- ╠╩╗└┬┘ ╠╣ │ ││ ││ │││├┤ ├┬┘├─┘
    -- ╚═╝ ┴ ╚ └─┘└─┘┴─┘└┴┘└─┘┴└─┴

    -- Attacks Mother Slime till under a certain HP, then continues to attack summoned ones
    -- Set MotherHP to the health percent you want to stop attacking the Mother Slime

    MotherHP = 50

    Module.New("Slime Trainer", function(Module)
    if Self.TargetID() == 0 then
    local Slimes = Self.GetTargets(1)
    for i = 1, #Slimes do
    if Slimes[i]:Name() == 'Slime' then
    if (Slimes[i]:isMother() and Slimes[i]:HealthPercent() > MotherHP) or not Slimes[i]:isMother() then
    Slimes[i]:Attack()
    break
    end
    end
    end
    end
    local Slime = Creature.New(Self.TargetID())
    if Slime:isMother() and Slime:HealthPercent() <= MotherHP then
    Self.StopAttack()
    end
    Module:Delay(2000)
    end)

    lua code:
    -- ╦ ╦┌─┐┌┬┐┌─┐┬─┐  ╔═╗┬  ┌─┐┌┬┐┌─┐┌┐┌┌┬┐┌─┐┬    ╔═╗┬┌─┐┬ ┬┌─┐┬─┐
    -- ║║║├─┤ │ ├┤ ├┬┘ ║╣ │ ├┤ │││├┤ │││ │ ├─┤│ ╠╣ │└─┐├─┤├┤ ├┬┘
    -- ╚╩╝┴ ┴ ┴ └─┘┴└─ ╚═╝┴─┘└─┘┴ ┴└─┘┘└┘ ┴ ┴ ┴┴─┘ ╚ ┴└─┘┴ ┴└─┘┴└─
    -- ╔╗ ┬ ┬ ╔═╗┌─┐┬ ┬┬ ┬ ┬┌─┐┬─┐┌─┐
    -- ╠╩╗└┬┘ ╠╣ │ ││ ││ │││├┤ ├┬┘├─┘
    -- ╚═╝ ┴ ╚ └─┘└─┘┴─┘└┴┘└─┘┴└─┴

    -- If Wait is true script will wait on unfishable corpses.
    -- If Wait is false script will ignore any unfishable corpses,
    -- but will fish them if they become fishable.

    Wait = true

    Module.New("Water Elemental Fisher", function()
    Count = 0
    for i = -7, 7 do
    for j = -5, 5 do
    p = Self.Position()
    x = p.x + i
    y = p.y + j
    z = p.z
    if Map.IsTileWalkable(x, y, z) then
    if Wait and Map.GetTopUseItem(x, y, z).id == 4037 then
    if Walker.IsEnabled() then
    Walker.Stop()
    end
    Count = Count + 1
    elseif Map.GetTopUseItem(x, y, z).id == 9582 then
    Self.UseItemWithGround(3483, x, y, z)
    wait(500 + Self.Ping())
    end
    end
    end
    end
    if not Walker.IsEnabled() and Count == 0 then
    Walker.Start()
    end
    end)
    Last edited by Foulwerp; 12-05-2015 at 07:57 PM. Reason: Consolidated code and removed the Player Tracker

Posting Permissions

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