Rexia.PL > Poradniki
[OtClient v8] Całe Info z całego forum w jednym miejscu.
GxC:
OtClient v8
Obsługa samego klienta (nie bota): https://mrozuots.pl/index.php?topic=2373.0
Obsługa Bota
AvBot v4.2 Link
Vbot_1.3: Link
Cavebot_1.3 Link
Vithrax_1.3 Praktycznie to samo co vbot, reszta intuicyjna.
Mapka do OTclient
*Wyłączyć wszystkie klienty/wylogować chary
*Mapkę wurzcamy do appdata>Roaming>OTClientV8>Rexia1406
*Ew, logować chara (każdego i patrzeć czy jest mapka, jak nie ma, wylogować wrzucić i zalogować)
Linki:
minimap860.otmm https://www93.zippyshare.com/v/XOl3I5et/file.html
Skrypt Na Kasyno
Jak uruchomić skrypt? LINK: https://mrozuots.pl/index.php?topic=2510.0Serdecznie pozdrawiam, i życzę powodzenia, w czekaniu na wolne kasyna !
Skrypt na kasyno z wymiana dc na vc.
https://www11.zippyshare.com/v/napEjzog/file.html
Rozpakowujemy i wrzucamy do folderu appdata, gdzie mamy wszystkie boty. Instrukcja jak znaleźć folder do którego wrzucić: https://mrozuots.pl/index.php?topic=2510.0
Skrypt na kasyno Dream:
https://www11.zippyshare.com/v/Q19r9Zwi/file.html
Rozpakowujemy i wrzucamy do folderu appdata, gdzie mamy wszystkie boty. Instrukcja jak znaleźć folder do którego wrzucić: https://mrozuots.pl/index.php?topic=2510.0
Poradnik dotyczący OTC, od strony plików.
Do zabawy polecam użyć programu notepad ++, dzięki któremu lepiej zobaczymy z czego składa się skrypt, oraz zaznaczone linijki kodów, więc gdy w grze wyskoczy jakiś problem odsyłający do danego pliku i numerku linijki, nie musicie liczyć jak w notatniku.
Z jakich plików głównych składa się bot, Otc jest pisany w języku lua, więc jego pliki to .lua oraz .json (służące głównie do zapisu/robienia tabelek,okienek)
Oprócz samych skryptów, w bocie bardzo ważny jest Loader, oraz storage.
Loader.lua
Plik, którego zadaniem jest wczytanie wszystkich innych plików/skryptów lua do naszego bota, więc jeżeli chcemy dodać do bota kolejny plik z skryptami, musimy go dopisać do loader'a.
PRZYKŁAD
tworzymy plik skrypty.lua
otwieramy plik Loader.lua
szukamy kodu (w notepad będziecie mieli po lewej stronie cyferki i kolorami odznaczone dane linijki kodu)
local luaFiles = {
"l_menu",
"libary",
"pvp" ,
i musimy dopisać napisz plik w taki sposób
local luaFiles = {
"l_menu" ,
"libary" ,
"pvp" ,
"skrypty" ,
Więc jak widzicie bardzo ważny jest przecinek po spacji, bez niego nie wczyta nam reszty plików, ostatnia linijka nie posiada już przecinka, a po niej następuje }, zamykający kod.
Plik storage.json
Ten plik to serce naszego wczytywania bota, w nim zapisane są konfiguracje, które odpalane są z pierwszym użyciem bota, o ile bot nie posiada zapisu dla danej postaci.
Po otwarciu notepad'em plik bardzo intuicyjny, polecam do zabawy skrypt kasyno, gdzie możemy sobie zaznaczyć, że gdy odpalimy bota, odrazu wszystkie opcje będą na zielono.
Teraz zaczynają się schody, pojawiają się nam foldery, więc po koleji
cavebot oraz cavebot_configs
Folder cavebot, zawiera wszystkie skrypty, potrzebne do odpalania naszego cavebota czyli części bota odpowiedzialnej za robienie waypointow, moim zdaniem nie ma tam już nic do poprawy.
Folder cavebot_configs, w nim znajdziemy wszystkie nasze zrobione waypointy.
targeting oraz targeting_configs
Folder targeting, tutaj zależnie od bota polecał bym ten targeting który ma posiada opcje dynamic lure, ponieważ to znacząco przyśpiesza zdobywanie doświadczenia na spotach. Opcję taką posiada np Avbot 4_2, i wystarczy tylko przekopiować folder targeting do naszego bota.
Folder targeting_configs, analogicznie jak z cavebot, tutaj zapisane są nasze profile targetingu.
I zostaje nam folder z sercem naszego bota, posiada on różne nazwy, jak vbot/gxc/, lub wgl nie ma osobnego folderu jak w przypadku vithrax'a.
(czasem jest jeszcze jeden folder z nazwą jak wyżej, z dopiskiem config, to tam zapisane są profile bota przypisane do danej nazwy postaci)
Tutaj znajdują się wszystkie skrypty wchodzące w skład botów, nie będę opisywał działania każdego z nich, lecz dam wam parę kodów, które pomogą wam w budowaniu swoich skryptów.
setDefaultTab("nazwa") - kod tworzący nam zakładkę w bocie, jak np Tools
UI.Label("nazwa") - kod tworzący nam napis, np do oznaczania danego skryptu
UI.Separator() - kod tworzący nam kreskę, którą możemy oddzielić skrypty.
addIcon("Nazwa", {item=id przedmiotu jaki będziemy widzieć, switchable=true, text="Opis"}, - skrypt do tworzenia ikonek w bocie, po przecinku dodajemy skrypt przykład poniżej.
addTextEdit("Nazwa", storage.doczego się odnosi or "Gotowy napis bez edycji", function(widget, text)
storage.do czego się odnosi. = text
end) -Dodajemy do skryptu, opcje z wpisywaniem tekstu
Więc teraz, jeżeli nie chcecie by dany skrypt był w zakładce TOOls, (a tam będzie jeżeli dodacie go poprzez opcje ingame macro editor która znajduje się w zakładce tools), musicie zrobić nowy plik lua, wpisać go w daną zakładkę, dodać skrypty, i wpisać go do loader'a.
GxC:
SKRYPTY OTC
Więc najpierw jak dodajemy skrypty?
Odpalamy klienta, logujemy się na postać wybieramy wersję którą lubimy/przyzwyczailiśmy się użytkować (Cavebot_1.3/vBot_3.01/Vithrax_1.3)
w każdej wersji przechodzimy do zakładki Tools, następnie wybieramy:
Cavebot_1.3 - Ingame macro editor
vBot_3.01 - Ingame script editor
Vithrax_1.3 - Ingame hotkey editor
W to okienko wrzucamy skrypty. Jeżeli macie tam już jakiś swój skrypt, proponuje by nowe wrzucać przed niego ponieważ często gęsto zdarza się że skrypty z nieznanych źródeł nie są dobrze napisane bądź tylko brakuje im zakończenia w postaci end end). Co spowoduje wyskakiwanie okienka error, bądź nowy skrypt się nie pokaże.
Hold Target:
--- Kod: ---local oldTarget
macro(200, "hold target", function()
if g_game.isAttacking() then
oldTarget = g_game.getAttackingCreature()
end
if (oldTarget and not g_game.isAttacking() and getDistanceBetween(pos(), oldTarget:getPosition()) <= 8) then
g_game.attack(oldTarget)
end
end)
--- Koniec kodu ---
Dużo lepsze i szybsze leczenie:
--- Kod: ---local hpPercent = 99
macro(50, "faster healing", function()
if (hppercent() <= hpPercent) then
say(storage.HealText)
end
end)
addTextEdit("HealText", storage.HealText or "NAZWASPELLA", function(widget, text)
storage.HealText = text
end)
--- Koniec kodu ---
Manasowanie:
--- Kod: ---local manaId = 3184
local manaPercent = 80
macro(200, "faster mana potting", function()
if (manapercent() <= manaPercent) then
usewith(manaId, player)
end
end)
--- Koniec kodu ---
Odnowa FWB (UWAGA KOSZTUJE 5DC)
--- Kod: ---macro(10000, "FWB", function() say("!fwb") end)
--- Koniec kodu ---
Autofollow (dziury/tpki/drzwi/itd)
--- Kod: -----Description: A macro to follow players through stairs, doors, ladders, sewer gates and some other things.
--A message error appears on the log, but other than that everything seems to run well... save for the eventual hiccups.
--ATTENTION: It might not work if multiple "use objects" that lead to different paths are near eachother.
Follow = macro(1000,"Follow",function()
nome = storage.followLeader
end)
UI.Label("Follow Player:")
addTextEdit("playerToFollow", storage.followLeader or "Heeey", function(widget, text)
storage.followLeader = text
target = tostring(text)
end)
nome = storage.followLeader
pos_p = player:getPosition()
p = getCreatureByName(nome)
onCreaturePositionChange(function(creature, newPos, oldPos)
if Follow.isOn() then
if creature:getName()==player:getName() and getCreatureByName(nome) == nil and newPos.z>oldPos.z then
say('exani tera')
for i = -1,1 do
for j = -1,1 do
local useTile = g_map.getTile({x=posx()+i,y=posy()+j,z=posz()})
g_game.use(useTile:getTopUseThing())
end
end
end
if creature:getName()==nome then
if newPos==nil then
lastPos = oldPos
schedule(200,function()
autoWalk(oldPos)
end)
schedule(1000,function()
for i = -1,1 do
for j = -1,1 do
local useTile = g_map.getTile({x=posx()+i,y=posy()+j,z=posz()})
g_game.use(useTile:getTopUseThing())
end
end
end)
end
if oldPos.z == newPos.z then
schedule(300,function()
local useTile = g_map.getTile({x=oldPos.x,y=oldPos.y,z=oldPos.z})
topThing = useTile:getTopThing()
if not useTile:isWalkable() then
use(topThing)
end
end)
autoWalk({x=oldPos.x,y=oldPos.y,z=oldPos.z})
else
lastPos = oldPos
autoWalk(oldPos)
for i = 1,6 do
schedule(i*200,function()
autoWalk(oldPos)
if getDistanceBetween(pos(), oldPos) == 0 and (posz()>newPos.z and getCreatureByName(nome) == nil) then
say('exani tera')
end
end)
end
local useTile = g_map.getTile({x=newPos.x,y=newPos.y-1,z=oldPos.z})
g_game.use(useTile:getTopUseThing())
end
end
end
end)
--- Koniec kodu ---
Skrypt na wędki (można również zrobić samemu poprzez autorecording w cavebocie)
https://mrozuots.pl/index.php?topic=2509.0[/center]
Zamiana cc na gn/ gn na dc:Wchodzimy jak przy kasynie w edit/click here to open directory. Teraz w zależności z czego korzystamy
Cavebot: Wchodzimy w folder cavebot_1.3 i otwieramy plik tools.lua
Vithrax: Wchodzimy w folder vithrax_1.3 i otwieramy plik tools.lua
Vbot: Wchodzimy w folder vBot_3.01 , wchodzimy jeszcze raz w folder Vbot, i otwieramy plik tools.lua
W pliku szukamy linijki z local moneyIds = {3031, 3035} i dopisujemy tutaj 3043 i 3040 ma to wyglądać tak local moneyIds = {3031, 3035, 3043, 3040}
Cavebot: linijka 38
Vitrax: linijka 27
Vbot: linijka 4
Skrypt na Hold Mwall
--- Kod: ---local holdMwallHotkey = 'PageUp'
local holdMwallText = 'Hold MWall'
local holdMwallTextCol = 'yellow'
local holdMwallTiles = {}
local holdMwallIsOn = false
onKeyPress(function(keys)
if keys == holdMwallHotkey and holdMwallIsOn then
local tile = getTileUnderCursor()
local currTile = table.find(holdMwallTiles, tile)
if currTile then
holdMwallTiles[currTile]:setText('')
table.remove(holdMwallTiles, currTile)
else
table.insert(holdMwallTiles, tile)
holdMwallTiles[#holdMwallTiles]:setText(holdMwallText, holdMwallTextCol)
end
end
end)
addSwitch('holdMwall', 'Better Hold MWall', function(widget)
widget:setOn(not widget:isOn())
if not widget:isOn() then
for i = 1, #holdMwallTiles do
holdMwallTiles[1]:setText('')
table.remove(holdMwallTiles, 1)
end
end
holdMwallIsOn = widget:isOn()
end)
macro(1, function()
if holdMwallIsOn then
for _, holdMwallTile in pairs(holdMwallTiles) do
if holdMwallTile:getTopThing():getId() ~= 2129 then
useWith(3180, holdMwallTile:getTopUseThing())
return
end
end
end
end)
--- Koniec kodu ---
Mwall infron of player SHIFT+F10
--- Cytuj ---local key = "shift+f10" -- Hotkey to shoot mwall
local mwallId = 3180 -- Mwall ID
local squaresThreshold = 2 -- Amount of tiles to shoot infront of player
singlehotkey(key, "Mwall target", function()
local target = g_game.getAttackingCreature()
if target then
local targetPos = target:getPosition()
local targetDir = target:getDirection()
local mwallTile
if targetDir == 0 then -- north
targetPos.y = targetPos.y - squaresThreshold
mwallTile = g_map.getTile(targetPos)
useWith(mwallId, mwallTile:getTopUseThing())
elseif targetDir == 1 then -- east
targetPos.x = targetPos.x + squaresThreshold
mwallTile = g_map.getTile(targetPos)
useWith(mwallId, mwallTile:getTopUseThing())
elseif targetDir == 2 then -- south
targetPos.y = targetPos.y + squaresThreshold
mwallTile = g_map.getTile(targetPos)
useWith(mwallId, mwallTile:getTopUseThing())
elseif targetDir == 3 then -- west
targetPos.x = targetPos.x - squaresThreshold
mwallTile = g_map.getTile(targetPos)
useWith(mwallId, mwallTile:getTopUseThing())
end
end
end)
--- Koniec cytatu ---
Wygodne i łatwe do ogarnięcia Sio friend
--- Kod: ---macro(100, "Sio Friend", function()
local friend = getPlayerByName(storage.healFriend)
if friend and friend:getHealthPercent() < tonumber(storage.healFriendPercent) then
say("Exura heal \"" .. storage.healFriend)
delay(1000)
end
end)
addLabel("sioname", "Player name:")
addTextEdit("healfriend", storage.healFriend or "", function(widget, text)
storage.healFriend = text
end)
addLabel("siopercent", "Heal Below %:")
addTextEdit("healfriendpercent", storage.healFriendPercent or "", function(widget, text)
storage.healFriendPercent = text
end)
--- Koniec kodu ---
Skrypt na mining:
https://mrozuots.pl/index.php?topic=4033.0
Skrypt na uhanie (Do wbijania achi polecam ustawić 101% wtedy cały czas używa)
--- Kod: ---macro(100, "Enable UH friend", nil, function()
local healFriend = getCreatureByName(storage.uhFriend)
if healFriend then
local heal_player = healFriend:getName();
if (heal_player == storage.uhFriend) then
if (healFriend:getHealthPercent() < tonumber(storage.uhFriendPercent)) then
useWith(3181, healFriend);
end
end
end
end)
addLabel("uhname", "Player name:", warTab)
addTextEdit("uhfriend", storage.uhFriend or "", function(widget, text)
storage.uhFriend = text
end)
addLabel("uhpercent", "Heal Below %:", warTab)
addTextEdit("uhfriendpercent", storage.uhFriendPercent or "", function(widget, text)
storage.uhFriendPercent = text
end)
--- Koniec kodu ---
Skrypt na zbieranie z ziemi wykopanych scarab coinów by Mikelondiony
--- Kod: ---macro(100, "Search for Item", function()
local z = posz()
for _, tile in ipairs(g_map.getTiles(z)) do
if z ~= posz() then return end
if getDistanceBetween(pos(), tile:getPosition()) <= 7 then
if tile:getTopLookThing():getId() == 3042 then
g_game.move(tile:getTopLookThing(), {x = 65535, y=SlotBack, z=0}, tile:getTopLookThing():getCount())
end
end
end
end)
--- Koniec kodu ---
Skrypt Alarm gdy pojawi się gracz na ekranie
--- Kod: ---macro(1000, "PlayeronScreen", function()
for _, creature in ipairs(getSpectators()) do
if creature:isPlayer() and not creature:isLocalPlayer() then
isSafe = false;
end
if creature:isPlayer() and creature:isLocalPlayer() then
isSafe = true;
end
if isSafe==false then
playAlarm()
delay(10000)
end
end
end)
--- Koniec kodu ---
Skrypt na wyswietlanie prywatnych wiadomosci
--- Kod: ---[code]local height = 50
local widget = setupUI([[
Panel
id: msgPanel
height: 400
width: 200
]], g_ui.getRootWidget())
onTalk(function(name, level, mode, text, channelId, pos)
if (mode ~= 4) then return end
local msgLabel = g_ui.loadUIFromString([[
Label
color: #5ff7f7
background-color: black
opacity: 0.87
]], widget)
msgLabel:setText(name .." ["..level.. "]: " .. text)
msgLabel:setPosition({y = height, x = 10})
if height > 210 then
for msgIndex, message in ipairs(widget:getChildren()) do
message:setPosition({y = message:getPosition().y - 13, x = 10})
if (msgIndex == 1) then message:destroy() end
end
else
height = height + 13
end
end)
--- Koniec kodu ---
Skrypt na rzucanie runy w dany sqm przyciskiem PageUp.
--- Kod: ---local holdMwallHotkey = 'PageUp'
local holdMwallText = 'Rzuc tu Ava'
local holdMwallTextCol = 'yellow'
local holdMwallTiles = {}
local holdMwallIsOn = false
onKeyPress(function(keys)
if keys == holdMwallHotkey and holdMwallIsOn then
local tile = getTileUnderCursor()
local currTile = table.find(holdMwallTiles, tile)
if currTile then
holdMwallTiles[currTile]:setText('')
table.remove(holdMwallTiles, currTile)
else
table.insert(holdMwallTiles, tile)
holdMwallTiles[#holdMwallTiles]:setText(holdMwallText, holdMwallTextCol)
end
end
end)
addSwitch('holdMwall', 'Rzucanie Ava Pageup', function(widget)
widget:setOn(not widget:isOn())
if not widget:isOn() then
for i = 1, #holdMwallTiles do
holdMwallTiles[1]:setText('')
table.remove(holdMwallTiles, 1)
end
end
holdMwallIsOn = widget:isOn()
end)
macro(1, function()
if holdMwallIsOn then
for _, holdMwallTile in pairs(holdMwallTiles) do
if holdMwallTile:getTopThing() then
useWith(tonumber (storage.avaId), holdMwallTile:getTopUseThing())
return
end
end
end
end)
addTextEdit("IdRunki", storage.avaId or "3161", function(widget, text)
storage.avaId = text
end)
--- Koniec kodu ---
Skrypt na zamiane elite amulet + lost amulet od danego %hp
--- Kod: ---local eq_manager = {
{
hppcToEquip = 100, -- HP <= 100% (Default)
eqToEquip = {
{itemID = 9803, slot = SlotNeck}
}
},
{
hppcToEquip = tonumber (storage.hppercent), -- HP <= 75%
eqToEquip = {
{itemID = 10198, slot = SlotNeck}
}
}
}
UI.Label("HP procenty")
addTextEdit("HP%", storage.hppercent or "75", function(widget, text)
storage.hppercent = text
end )
table.sort(eq_manager, function(a,b) return b.hppcToEquip > a.hppcToEquip end)
macro(500, "Zmiana amuletu", function()
for k,v in pairs(eq_manager) do
if hppercent() <= v.hppcToEquip then
for i = 1, #v.eqToEquip do
moveToSlot(v.eqToEquip[i].itemID, v.eqToEquip[i].slot)
end
break
end
end
end)
--- Koniec kodu ---
Skrypt na zamiane SHS/SMS od danego % many
--- Kod: ---local eq_manager = {
{
mppcToEquip = 100, -- MP <= 100% (Default)
eqToEquip = {
{itemID = 3427, slot = SlotRight}
}
},
{
mppcToEquip = tonumber (storage.mppercent), -- MP <= 75%
eqToEquip = {
{itemID = 3435, slot = SlotRight}
}
}
}
UI.Label("MP procenty")
addTextEdit("Mp%", storage.mppercent or "75", function(widget, text)
storage.mppercent = text
end )
table.sort(eq_manager, function(a,b) return b.mppcToEquip > a.mppcToEquip end)
macro(500, "Zmiana tarczy", function()
for k,v in pairs(eq_manager) do
if manapercent() <= v.mppcToEquip then
for i = 1, #v.eqToEquip do
moveToSlot(v.eqToEquip[i].itemID, v.eqToEquip[i].slot)
end
break
end
end
end)
--- Koniec kodu ---
Skrypt na wyłączenie target i cavebota, gdy mana spadnie poniżej x.
--- Kod: ---macro(100, "Toggle Cave when xmana", function()
if (manapercent() <= tonumber(storage.manaPercent)) then
CaveBot.setOff()
TargetBot.setOff()
else
if (manapercent() >= tonumber(storage.manaPercent)) then
CaveBot.setOn()
TargetBot.setOn()
end
end
end)
UI.Label("Mana percent")
addTextEdit("manapercent", storage.manaPercent or "50", function (widget, text)
storage.manaPercent = text
end)
--- Koniec kodu ---
Skrypt na pokazywanie %HP mobków/innych graczy
--- Kod: ---local showhp = macro(20000, "Monster HP %", function() end)
onCreatureHealthPercentChange(function(creature, healthPercent)
if showhp:isOff() then return end
if creature:isMonster() or creature:isPlayer() and creature:getPosition() and pos() then
if getDistanceBetween(pos(), creature:getPosition()) <= 5 then
creature:setText(healthPercent .. "%")
else
creature:clearText()
end
end
end)
--- Koniec kodu ---
Skrypt na otwieranie wszystkich bp
--- Kod: ---openBackpacks = function()
for _, container in pairs(g_game.getContainers()) do
g_game.close(container)
end
schedule(1000, function()
bpItem = getBack()
if bpItem ~= nil then g_game.open(bpItem) end
end)
schedule(2000, function()
local nextContainers = {}
containers = getContainers()
for i, container in pairs(g_game.getContainers()) do
for i, item in ipairs(container:getItems()) do
if item:isContainer() then
table.insert(nextContainers, item)
end
end
if #nextContainers == 0 then return end
local delay = 1
for i = 1, #nextContainers do
schedule(delay, function()
g_game.open(nextContainers[i], nil)
end)
delay = delay + 250
end
end
end)
end
-- this loads the function straighta way when reloading config
openBackpacks()
-- this adds a button to your bot, so you can press it
UI.Button("Backpack Open", function()
openBackpacks()
end)
--- Koniec kodu ---
Skrypt na używanie staminera/mediumki gdy stamina bedzie wynosic 14:01
--- Kod: ---macro(500, function()
if stamina() < 842 then
use(tonumber (storage.idstam))
end
end))
UI.Label("Id staminera/mediumki")
addTextEdit("id staminera", storage.idstam or "id", function(widget, text)
storage.idstam = text
end)
--- Koniec kodu ---
Skrypt na spam UE/SPELLA, lub wiadomości na default (zmieniając liczbę, zwikszamy odstęp czasu od kolejnej wiadomości
--- Kod: ---macro(1000, "Spam UE", function() say(storage.spamue) end) addTextEdit("Spam Ue", storage.spamue or "Nazwa spella", function (widget, text) storage.spamue = text end)
--- Koniec kodu ---
Skrypt na sprawdzenie ilu jest graczy na ekranie (Łapie kratke wyżej
--- Kod: ---function countPlayers()
local playerCount = 0
for _, creature in ipairs(getSpectators(pos(), false)) do
if creature:isPlayer() and not creature:isLocalPlayer() then
playerCount = playerCount +1
end
end
return playerCount
end
macro(2000, "Graczy na ekranie", function()
say("graczy na ekranie:"..countPlayers())
end)
--- Koniec kodu ---
Skrypt na Sd target
--- Kod: ---macro(200, "SD Target", function()
if g_game.isAttacking() then
usewith(3155, g_game.getAttackingCreature())
delay(500)
end
end)
--- Koniec kodu ---
tam gdzie 3155 wpisujemy ID target runki.
Skrypt na Hold Krzaka
--- Kod: ---local holdMwallHotkey = 'PageUp'
local holdMwallText = 'TUTAJ'
local holdMwallTextCol = 'yellow'
local holdMwallTiles = {}
local holdMwallIsOn = false
onKeyPress(function(keys)
if keys == holdMwallHotkey and holdMwallIsOn then
local tile = getTileUnderCursor()
local currTile = table.find(holdMwallTiles, tile)
if currTile then
holdMwallTiles[currTile]:setText('')
table.remove(holdMwallTiles, currTile)
else
table.insert(holdMwallTiles, tile)
holdMwallTiles[#holdMwallTiles]:setText(holdMwallText, holdMwallTextCol)
end
end
end)
addSwitch('holdMwall', 'Shoot Rune [PageUp]', function(widget)
widget:setOn(not widget:isOn())
if not widget:isOn() then
for i = 1, #holdMwallTiles do
holdMwallTiles[1]:setText('')
table.remove(holdMwallTiles, 1)
end
end
holdMwallIsOn = widget:isOn()
end)
macro(1, function()
if holdMwallIsOn then
for _, holdMwallTile in pairs(holdMwallTiles) do
if holdMwallTile:getTopThing():getId() ~= 2130 then
useWith(tonumber (storage.avaId), holdMwallTile:getTopUseThing())
return
end
end
end
end)
addLabel("idava", "Id runki", warTab)
addTextEdit("IdRunki", storage.avaId or "3156", function(widget, text)
storage.avaId = text
end)
--- Koniec kodu ---
Skrypt na HoldMwall
--- Kod: ---local holdMwallHotkey = 'PageUp'
local holdMwallText = 'TUTAJ'
local holdMwallTextCol = 'yellow'
local holdMwallTiles = {}
local holdMwallIsOn = false
onKeyPress(function(keys)
if keys == holdMwallHotkey and holdMwallIsOn then
local tile = getTileUnderCursor()
local currTile = table.find(holdMwallTiles, tile)
if currTile then
holdMwallTiles[currTile]:setText('')
table.remove(holdMwallTiles, currTile)
else
table.insert(holdMwallTiles, tile)
holdMwallTiles[#holdMwallTiles]:setText(holdMwallText, holdMwallTextCol)
end
end
end)
addSwitch('holdMwall', 'Shoot Rune [PageUp]', function(widget)
widget:setOn(not widget:isOn())
if not widget:isOn() then
for i = 1, #holdMwallTiles do
holdMwallTiles[1]:setText('')
table.remove(holdMwallTiles, 1)
end
end
holdMwallIsOn = widget:isOn()
end)
macro(1, function()
if holdMwallIsOn then
for _, holdMwallTile in pairs(holdMwallTiles) do
if holdMwallTile:getTopThing():getId() ~= 2129 then
useWith(tonumber (storage.avaId), holdMwallTile:getTopUseThing())
return
end
end
end
end)
addLabel("idava", "Id runki", warTab)
addTextEdit("IdRunki", storage.avaId or "3180", function(widget, text)
storage.avaId = text
end)
--- Koniec kodu ---
domkot997:
Wklejam link z paczką na kasyno na OTClient dla graczy poza granicami Polski, z racji tego że zippyshare blokuje dostęp z zagranicy
https://mega.nz/file/OjwVTRQI#6sWmaa4lzAwlJZ-ZgNoInwEXngGAbVQluMTpYAQGb-g
pipauj:
witam potrzebuje skrypt na ubieranie e ringa gdy x hp i sciaganie gdy x hp
kosiara:
Dorzucam dobrze działający skrypt na follow!
LINK żeby było szybciej, ale pewnie wygaśnie za jakiś czas: https://www.ideone.com/Moem4l
local Objects = {435, 1948, 7771}
local Doors = {7727, 8265, 1629, 1632, 8266, 7728, 1211, 1220, 1224, 1228, 1233, 1238, 1242, 1246, 1251, 1256, 1260, 1540, 3546, 3548, 3550, 3552, 4915, 5083, 5109, 5111, 5113, 5115, 5127, 5129, 5131,
5133, 5142, 5145, 5283, 5285, 5289, 5293, 5516, 5737, 5749, 6194, 6199, 6203, 6207, 6251, 6256, 6260, 6264, 6798, 6802, 6902, 6904, 6906, 6908, 7044,
7046, 7048, 7050, 7055, 8543, 8548, 8552, 8556, 9167, 9172, 9269, 9274, 9274, 9269, 9278, 9282, 10270, 10275, 10279, 10283, 10479, 10481, 10485, 10483,
10786, 12101, 12199, 19851, 19853, 19991, 19993, 20284, 20286, 17238, 13021, 10790, 12103, 12205, 19855, 19995, 20288, 10792, 12105, 12203, 19857, 19997,
20290, 22825, 22827, 22829, 22831, 1214, 1222, 1226, 1230, 1236, 1240, 1244, 1248, 1254, 1258, 1262, 1542, 3537, 3539, 3541, 3543, 4918, 5085, 5100, 5102, 5104, 5106, 5118,
5120, 5122, 5124, 5136, 5139, 5280, 5287, 5291, 5295, 5518, 5734, 5746, 6197, 6201, 6205, 6209, 6254, 6258, 6262, 6266, 6796, 6800, 6893,
6895, 6897, 6899, 7035, 7037, 7039, 7041, 7057, 8546, 8550, 8554, 8558, 9170, 9174, 9272, 9276, 9280, 9284, 10273, 10277, 10281, 10285,
10470, 10472, 10476, 10474, 10777, 12094, 12190, 19842, 19844, 19982, 19984, 20275, 20277, 17236, 18209, 13023, 10781, 12096, 12196,
19846, 19986, 20279, 10783, 12098, 12194, 19848, 19988, 20281, 22816, 22818, 22820, 22822, 1224, 1226, 1228, 1230, 1242, 1244, 1246, 1248, 1256, 1258, 1260, 1262, 3541, 3543, 3550, 3552, 5104, 5106, 5113, 5115, 5122, 5124, 5131, 5133,
5289, 5291, 5293, 5295, 6203, 6205, 6207, 6209, 6260, 6262, 6264, 6266, 6897, 6899, 6906, 6908, 7039, 7041, 7048, 7050, 8552, 8554, 8556, 8558,
9176, 9178, 9180, 9182, 9278, 9280, 9282, 9284, 10279, 10281, 10283, 10285, 10474, 10476, 10483, 10485, 10781, 12096, 12196, 19846, 19986, 20279,
10783, 12098, 12194, 19848, 19988, 20281, 10790, 12103, 12205, 19855, 19995, 20288, 10792, 12105, 12203, 19857, 19997, 20290, 1223, 1225, 1241, 1243, 1255, 1257, 3542, 3551, 5105, 5114, 5123, 5132, 5288, 5290, 5745, 5748, 6202, 6204, 6259, 6261, 6898, 6907, 7040, 7049,
8551, 8553, 9175,9177, 9277, 9279, 10278, 10280, 10475, 10484, 10782, 12097, 19847, 19987, 20280, 10791, 12104, 12204, 12195, 19856, 19996, 20289,
22821, 22830, 1227, 1229, 1245, 1247, 1259, 1261, 3540, 3549, 5103, 5112, 5121, 5130, 5292, 5294, 6206, 6208, 6263, 6265, 6896, 6905, 7038, 7047, 8555, 8557,9179, 9181,
9281, 9283, 10282, 10284, 10473, 10482, 10780, 10789, 10780, 12095, 12195, 19845, 19985, 20278, 10789, 12102, 12193, 12202, 19854, 19994, 20287}
followName = "Name"
if not storage[followName] then storage[followName] = { player = 'name'} end
local toFollowPos = {}
UI.Separator()
UI.Label("Auto Follow")
followTE = UI.TextEdit(storage[followName].player or "name", function(widget, newText)
storage[followName].player = newText
end)
local followChange = macro(200, "Follow Change", function() end)
local followMacro = macro(20, "Follow", function()
local position = pos()
local target = getCreatureByName(storage[followName].player)
if target then
local tpos = target:getPosition()
toFollowPos[tpos.z] = tpos
end
if not player:isWalking() and target and (getDistanceBetween(pos(), target:getPosition()) >2) then
for i,interact in ipairs(Doors) do
if (player:getDirection() == 1 or player:getDirection() == 3) then
for x=-1,2,2 do
position["x"] = posx() + x
position["y"] = posy()
for y=-1,3,2 do
if g_map.getTile(position) then
for u,item in ipairs(g_map.getTile(position):getItems()) do
if item:getId() == interact then
g_game.use(item)
return
end
end
position["y"] = posy()+y
end
end
end
end
position = pos()
if (player:getDirection() == 0 or player:getDirection() == 2) then
for y=-1,2,2 do
position["x"] = posx()
position["y"] = posy()+y
for x=-1,3,2 do
for u,item in ipairs(g_map.getTile(position):getItems()) do
if item:getId() == interact then
g_game.use(item)
return
end
end
position["x"] = posx()+x
end
end
end
position = pos()
end
elseif not player:isWalking() and not target and toFollowPos[posz()] then
for i,interact in ipairs(Objects) do
for x=-1,2,1 do
for y=-1,2,1 do
position["x"] = toFollowPos[posz()].x + x
position["y"] = toFollowPos[posz()].y + y
if getDistanceBetween(pos(), position) <= 8 and g_map.getTile(position) then
for u,item in ipairs(g_map.getTile(position):getItems()) do
if item:getId() == interact then
g_game.use(item)
delay(500)
end
end
end
end
end
end
end
local p = toFollowPos[posz()]
if not p then return end
if autoWalk(p, 20, { ignoreNonPathable = true, precision = 1}) then delay(100) end
end)
UI.Separator()
onPlayerPositionChange(function(newPos, oldPos)
if followChange:isOff() then return end
if (g_game.isFollowing()) then
tfollow = g_game.getFollowingCreature()
if tfollow then
if tfollow:getName() ~= storage[followName].player then
followTE:setText(tfollow:getName())
storage[followName].player = tfollow:getName()
end
end
end
end)
onCreaturePositionChange(function(creature, newPos, oldPos)
if creature:getName() == storage[followName].player and newPos then
toFollowPos[newPos.z] = newPos
end
end)
Nawigacja
[#] Następna strona
Idź do wersji pełnej