mirror of
https://github.com/OTCv8/otclientv8.git
synced 2025-10-21 15:13:26 +02:00
Version 2.6.1
This commit is contained in:
27
modules/game_bot/default_configs/vithrax_1.3/z_mwalls.lua
Normal file
27
modules/game_bot/default_configs/vithrax_1.3/z_mwalls.lua
Normal file
@@ -0,0 +1,27 @@
|
||||
setDefaultTab("Tools")
|
||||
local toggle = macro(1000, "mwall step", "F12",function() end)
|
||||
|
||||
onPlayerPositionChange(function(newPos, oldPos)
|
||||
if oldPos.z ~= posz() then return end
|
||||
if oldPos then
|
||||
local tile = g_map.getTile(oldPos)
|
||||
if toggle.isOn() and tile:isWalkable() then
|
||||
useWith(3180, tile:getTopUseThing())
|
||||
toggle.setOff()
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
local toggle2 = macro(1000, "mwall on target", "F11",function() end)
|
||||
|
||||
onCreaturePositionChange(function(creature, newPos, oldPos)
|
||||
if creature == target() or creature == g_game.getFollowingCreature() then
|
||||
if oldPos and oldPos.z == posz() then
|
||||
local tile2 = g_map.getTile(oldPos)
|
||||
if toggle2.isOn() and tile2:isWalkable() then
|
||||
useWith(3180, tile2:getTopUseThing())
|
||||
toggle2.setOff()
|
||||
end
|
||||
end
|
||||
end
|
||||
end)
|
Reference in New Issue
Block a user