Your browser does not support JavaScript or its disabled!
Please turn it on, or be aware that some features on this website will not work correctly.

Status: ONLINE

        
You are not logged in. Log in to post on the forum.

Boards >> Support >> OTClient V8 Scripts



Page: 1
OTClient V8 Scripts
by Anduin
Author  
Anduin
Position: player
Profession: Gladiator
Level: 1343


Posts: 8
OTClient V8 Scripts
Lista de Scripts para el cliente OTClient V8
- *Target Inteligente*
- Es un Script que automáticamente atacará a cualquier
criatura que esté cerca y siempre selecciona el de
menor vida.
Code:

macro(100, "Target Inteligente", function()
local battlelist = getSpectators();
local closest = 10
local lowesthpc = 101
for key, val in pairs(battlelist) do
if val:isMonster() then
if getDistanceBetween(player:getPosition(), val:getPosition()) <= closest then
closest = getDistanceBetween(player:getPosition(), val:getPosition())
if val:getHealthPercent() < lowesthpc then
lowesthpc = val:getHealthPercent()
end
end
end
end
for key, val in pairs(battlelist) do
if val:isMonster() then
if getDistanceBetween(player:getPosition(), val:getPosition()) <= closest then
if g_game.getAttackingCreature() ~= val and val:getHealthPercent() <= lowesthpc then
g_game.attack(val)
break
end
end
end
end
end)
06.05.21 22:26:33
Anduin
Position: player
Profession: Gladiator
Level: 1343


Posts: 8
Seguir Objetivo
- Una vez activada la función el personaje comenzará a seguir al objetivo ya sea subiendo y bajando escaleras o entrando a portales, siempre y cuando se active y se cambie el nombre del "Player" por el del objetivo al cual desea seguir.
Code:

local toFollow = "Player"
local toFollowPos = {}

local followMacro = macro(20, "Seguir Objetivo", function()
local target = getCreatureByName(toFollow)
if target then
local tpos = target:getPosition()
toFollowPos[tpos.z] = tpos
end
if player:isWalking() then return end
local p = toFollowPos[posz()]
if not p then return end
if autoWalk(p, 20, {ignoreNonPathable=true, precision=1}) then
delay(100)
end
end)

onCreaturePositionChange(function(creature, oldPos, newPos)
if creature:getName() == toFollow then
toFollowPos[newPos.z] = newPos
end
end)
06.05.21 22:28:53
Anduin
Position: player
Profession: Gladiator
Level: 1343


Posts: 8
Auto Cast
- Crea una ventana pequeña con un cuadro de texto donde podrás escribir el nombre de la Spell que quieres que se use.
El número 500 equivale a 0.5 sec
Para crear uno adicional solo deben cambiar la variable storage.ExetaText por otra, en todas sus ocurrencias.
Code:
macro(500, "Auto Cast", function()
say(storage.ExetaText)
end)
addTextEdit("ExetaText", storage.ExetaText or "Exeta mas res", function(widget, text)
storage.ExetaText = text
end)
06.05.21 22:32:37
Anduin
Position: player
Profession: Gladiator
Level: 1343


Posts: 8
Curar Amigo con UH
Con este Script aparecerá un recuadro de texto donde debes escribir el nombre del jugador y luego en el otro recuadro, el porcentaje en que se activará la runa. Si solo escribes el Nombre y dejas en blanco el porcentaje, el Script se estropea, causando error de LUA

[coded]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(3160, 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)[/code]
06.05.21 22:37:12


Loney Online © 2022. All rights reserved.
Powered by MyAAC.