Skocz do zawartości
  • 👋 Witaj na MPCForum!

    Przeglądasz forum jako gość, co oznacza, że wiele świetnych funkcji jest jeszcze przed Tobą! 😎

    • Pełny dostęp do działów i ukrytych treści
    • Możliwość pisania i odpowiadania w tematach
    • System prywatnych wiadomości
    • Zbieranie reputacji i rozwijanie swojego profilu
    • Członkostwo w jednej z największych społeczności graczy

    👉 Dołączenie zajmie Ci mniej niż minutę – a zyskasz znacznie więcej!

    Zarejestruj się teraz

Trening helper


lol123343

Rekomendowane odpowiedzi

Opublikowano

Siema wszystkim, jest jakiś bot do pomocy w treningu? np do zaznaczania slimów? I drugie pytanie jak to wygląda z botami, czy tylko aktualnie używany jest BBot? dzieki :)

Opublikowano

Dlaczego niby ma być używany tylko BBot? Dopóki można grać na 10.98 boty działają, potem parę odpadnie (np. XenoBot). Jutro wyślę Ci skrypt do niego na skilowanie ze Slimami.

 

Opublikowano

oooo Super by było :) Czekam z niecierpliwością :)

No więc tak:

--Slime Trainer Settings--
local CreatureName = 'Slime' -- Name of creature you want to train on.

--Weapon Switcher Settings--
local TrainingWeaponID = 3291 -- ID of weapon you are training with. (Default: Knife)
local LowHealthWeaponID = 7774 -- ID of weapon you want to switch to when low on health. (Default: Bright Sword)

local SwitchOnLowHealth = true -- Set to false if you don't want to switch to alternate weapon on low health.
local SwitchLowHealth = math.floor(Self.MaxHealth() * 0.5) -- Your health at which you want to switch to alternate weapon. 

(Default: 50%)
local SwitchHighHealth = math.floor(Self.MaxHealth() * .75) -- Your health at which you want to switch back to training 

weapon. (Default: 75%)

--Slime Mother Killer Settings--
local KillOnLowHealth = true -- Set to false if you don't want to kill slime mother when low on health.
local KillLowHealth = math.floor(Self.MaxHealth() * .30) -- Your health at which you want to kill slime mother.

--Alerts--
local AlertOnWeaponSwitch = false -- Set to true if you want to be alerted when weapon is switched.
local AlertOnLowHealth = false -- Set to true if you want to be alerted when low on health.
local AlertOnKill = true -- Set to false if you don't want to be alerted when slime mother is killed.

--Only edit below if you want to.--
local KillingSlimeMother = false -- Do not change!

local SlimeTrainer = Module.New('Slime Trainer', function()
if (Self.TargetID() == 0) then
local creatures = Self.GetTargets(1)
for i = 1, #creatures do
if (creatures[i]:Name() == 'Slime' and creatures[i]:HealthPercent() >= 50) then
if (creatures[i]:Attack()) then break end
end
end
end
end)

local WeaponSwitcher = Module.New('Weapon Switcher', function()
if (SwitchOnLowHealth) then
if (Self.Health() <= SwitchLowHealth and Self.Weapon().id ~= LowHealthWeaponID) then
if (AlertOnLowHealth) then alert() end
if (MoveWeapon(LowHealthWeaponID) and AlertOnWeaponSwitch) then alert() end
elseif (Self.Health() >= SwitchHighHealth and Self.Weapon().id ~= TrainingWeaponID) then
if (MoveWeapon(TrainingWeaponID) and AlertOnWeaponSwitch) then alert() end
end
end
wait(1000, 2000)
end, false)

local SlimeMotherKiller = Module.New('Slime Mother Killer', function()
if (KillOnLowHealth) then
if (Self.Health() <= KillLowHealth) then KillSlimeMother() end
end
wait(1000, 2000)
end, false)

function MoveWeapon(ItemID)
local container = Container.GetFirst()
while (container:isOpen()) do
for spot = 0, container:ItemCapacity() do
if (container:GetItemData(spot).id == ItemID) then
return (container:MoveItemToEquipment(spot, 'weapon'))
end
end
container = container:GetNext()
end
return false
end

function KillSlimeMother()
if not (KillingSlimeMother) then
SlimeTrainer:Stop()
Self.StopAttack()
if (AlertOnLowHealth) then alert() end
local creatures = Self.GetTargets(1)
for i = 1, #creatures do
if (creatures[i]:Name() == 'Slime' and creatures[i]:HealthPercent() <= 50) then
if (creatures[i]:Attack()) then break end
end
end
elseif (KillingSlimeMother and Self.TargetID == 0) then
local creatures = Self.GetTargets(1)
for i = 1, #creatures do
if (creatures[i]:Name() == 'Slime' and creatures[i]:HealthPercent() <= 50) then
if (creatures[i]:Attack()) then break end
end
end
if (AlertOnKill) then alert() end
KillingSlimeMother = false
end
end

if (SwitchOnLowHealth) then WeaponSwitcher:Start() end
if (KillOnLowHealth) then SlimeMotherKiller:Start() end

local info = [['Knight Slime Trainer' loaded successfully.]]
print(info)
wait(500)

Wklejasz w notatnik, edytujesz pod siebie (local LowHealthWeaponID i local TrainingWeaponID) , zapisujesz z rozszerzeniem LUA w dokumenty>xenobot>scripts.

Nic nie musisz dodawać do targetingu, ważne żebyś miał otwarty bp i dobre ID podał.

20a9wdh.png

 

Opublikowano

 (local LowHealthWeaponID i local TrainingWeaponID). .Tutaj muszę podać id głównej broni i broni do treningu?

Najlepiej zostaw tak jak jest, czyli w TrainingWeaponID ustaw id najsłabszej broni (knife=sword, crowbar=club, sickle=axe) a w LowHealthWeaponID broń, która ma dużo defa.

 

Opublikowano

     Error: ambiguous syntax (function call x new statement) near '('

 

taki błąd mi wyskakuje gdy chce załadować go

A coś więcej? Zazwyczaj w błędzie pokazuję która linijka np.

 

18:31 XenoScript Error:

           Script: slimie.lua

           Line #: 35

           Chunk: ...:?Users?Kacper?DOCUME?1?XenoBot?Scripts??slimie.lua

 

Opublikowano
09:51 XenoScript Error:

           Script: treningslimy.lua

           Line #: 11

           Chunk: C:?Users?Bartek?DOCUME?1?XenoBot?Scripts??TRENIN?1.LUA

           Error: ambiguous syntax (function call x new statement) near '('

This is an error with user-input and should not be reported as a bug with XenoBot.

 

wybacz, ze tak długo nie odpisywałem :)

Opublikowano

 

09:51 XenoScript Error:
           Script: treningslimy.lua
           Line #: 11
           Chunk: C:?Users?Bartek?DOCUME?1?XenoBot?Scripts??TRENIN?1.LUA
           Error: ambiguous syntax (function call x new statement) near '('
This is an error with user-input and should not be reported as a bug with XenoBot.
 
wybacz, ze tak długo nie odpisywałem :)

Nie ma sprawy, zapewne po tym masz jakiś nawias w następnej linijce - sprawdź i usuń.

local SwitchHighHealth = math.floor(Self.MaxHealth() * .75)

Aż dopisałem go u siebie, dla pewności i ten sam błąd ;)

307xj0h.png

 

Opublikowano

No nie wiem, powiem Tobie, ze ja nie mam takiego nawiasu, a błąd ciągle jest :/

Musisz coś źle kopiować, bo mi odpala się bez problemu ten skrypt, zresztą widać na ss :D

 

Zarchiwizowany

Ten temat przebywa obecnie w archiwum. Dodawanie nowych odpowiedzi zostało zablokowane.

×
×
  • Dodaj nową pozycję...