PDA

View Full Version : scripts



Tetra Kanabiinol
05-28-2016, 06:51 PM
Hello , i made full afk script on ots<hexera.net> do draken's farmine and i need 2 scripts to my full afk , the first is more important.

1 . need force refil.
need scripts which will be give targeiting of automaticcaly when if will be have less than 400 manas and 100 ultimate health potions , if < 400 mana/100uhp go set targeting of .
I need this becouse my character will be faster leaving hunt becouse o n this ots monsters very fast resping.

2. Need scripts which give prismatic ring if have < 50 % hp , but if will be have more than 70 give it to reeback to purble backpack

3. The same need with magma amulet if < 50 % hp use , if > 70 %hp , give to purple backpack

have hope that you give me ready lua and no will be must to edit it , The most i want frist script , FORCE REFILL , 2/3 will be nice when give too but if no , no will be panic. have hope that all undesrtand.

Trykon
05-28-2016, 11:41 PM
Ehh... these are easy, but unfortunately next time i have off is on wednesday, so next scripting for me will be then. If nobody will post i might do it then.

gajonxd
05-29-2016, 12:43 PM
First u should buy xenobot.

yompa93
05-29-2016, 02:10 PM
Manas = "ultimate mana potion"

Module.New('StopAttacking', function(mod)
if Self.ItemCount(Item.GetID(Manas)) < 400 then
Targeting.Stop()
Self.StopAttack()
end
mod:Delay(3000, 4000)
end)

yompa93
05-29-2016, 03:36 PM
Made something quick, hope it's good enough for ya.



local amulet = "magma amulet" -- amulet to equip
local ring = "prismatic ring" -- ring to equip
local Backpack = "mushroom backpack" -- backpack to put rings/ammys into when de-equipping.
local RingPercent = 80 -- percent to put ring on
local AmuletPercent = 50 -- percent to put amulet on
----------------------------------------------------------------

function HealthPercent()
return math.ceil((Self.Health()/Self.MaxHealth()*100))
end

local amulet = Item.GetID(amulet)
local ring = Item.GetID(ring)
local cont = Container.New(Backpack)
function AmuletEquip()
if not Self.isInPz() and HealthPercent() <= AmuletPercent and Self.Amulet().id ~= amulet and Self.ItemCount(amulet) >= 1 then
Self.Equip(amulet, "amulet")
elseif Self.isInPz() and Self.Amulet().id == amulet or HealthPercent() > AmuletPercent and Self.Amulet().id == amulet then
if cont:isOpen() then
Self.Dequip('amulet', Backpack)
else
Self.Dequip('amulet')
end
end
end
function RingEquip()
if not Self.isInPz() and HealthPercent() <= RingPercent and Self.Ring().id ~= Item.GetRingActiveID(ring) and Self.ItemCount(ring) >= 1 then
Self.Equip(ring, "ring")
elseif Self.isInPz() and Self.Ring().id == Item.GetRingActiveID(ring) or HealthPercent() > RingPercent and Self.Ring().id == Item.GetRingActiveID(ring) then
if cont:isOpen() then
Self.Dequip('ring', Backpack)
else
Self.Dequip('ring')
end
end
end

Module.New('Equipper', function()
RingEquip()
AmuletEquip()
end)