XenoBot Forums - Powered by vBulletin

User Tag List

Results 1 to 7 of 7

Thread: Foulwerp's Scripts

  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

  2. #2
    Rif's Avatar
    Join Date
    Dec 2014
    Location
    Poland
    Posts
    284
    Mentioned
    37 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Foulwerp View Post
    lua code:
    -- Based off DarkstaR's 'Players Above', but shows all floors above and below. Shows how many floors above or below the player is.

    local TextDisplayList = {HUD.CreateTextDisplay(25, 5, "Players Above & Below:", 255, 120, 120)}

    Module.New("Track Players", function(Module)
    local players = {}

    for index = CREATURES_LOW, CREATURES_HIGH do
    local creature = Creature.GetFromIndex(index)
    if (creature:isValid() and creature:isPlayer()) then
    local locz = Self.Position().z - creature:Position().z
    local locy = math.abs(Self.Position().y - creature:Position().y)
    local locx = math.abs(Self.Position().x - creature:Position().x)
    if (locx <= 7 and locy <= 5 and locz ~= 0) then
    local z = "" .. locz
    if locz > 0 then
    z = "+" .. z
    end
    players[#players+1] = ("[" .. z .. "]" .. creature:Name())
    end
    end
    end

    while (#TextDisplayList <= #players) do
    TextDisplayList[#TextDisplayList+1] = HUD.CreateTextDisplay(25, 5 + (12 * (#TextDisplayList)), "", 255, 120, 120)
    end

    for i = 1, #TextDisplayList-1 do
    if (i <= #players) then
    TextDisplayList[i+1]:SetText(players[i])
    else
    TextDisplayList[i+1]:SetText("")
    end
    end
    Module:Delay(500)
    end)
    This script will works fatally until DarkStar change CREATURES_LOW, CREATURES_HIGH to detecting creature._index below you character while you stay on Tibia 7 floor

  3. #3
    XenoBot Scripts Developer Syntax's Avatar
    Join Date
    Feb 2011
    Posts
    1,658
    Mentioned
    431 Post(s)
    Tagged
    4 Thread(s)
    Thanks for contributing @Foulwerp

  4. #4

    Join Date
    May 2015
    Posts
    92
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Foulwerp View Post
    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)
    slim script doesn't work bro i attacked slime mother under 50% hp and the scribt still attack it

  5. #5

    Join Date
    Apr 2014
    Posts
    21
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hello,

    The slime trainer isnt working.Its keep saying there is something wrong.Unexpected symbol near I that what it say's
    Anyone got a clue how to fix this ?

    Thanks,
    Mendill

  6. #6

    Join Date
    Aug 2016
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This script for train on slime dont working who can fix this ;(
    Last edited by Mizgamus; 05-24-2017 at 11:35 AM.

  7. #7

    Join Date
    Aug 2016
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    refresh

Posting Permissions

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