PDA

View Full Version : Sio script...



Crown Royal
12-28-2012, 03:30 AM
I have looked for the passed hour or two, trying to find a good sio script, worth a damn. Im not in a PVP world, so I dont need war.allies, or whitelist, etc.. Someone make one please, or direct me to finding one. Thanks

DarkstaR
12-28-2012, 04:06 AM
Here's what I used at hellspawns. When you hit 14% mana, it drinks pots until 80%, and it sio's your teammate.


--EDIT THIS
DRINK_AT = 14
DRINK_TO = 80
FRIEND_NAME = "Huvi"
FRIEND_PERCENT = 35


--LEAVE THIS
RESTORING = false


function HealFriend()
local friend = Creature.GetByName(FRIEND_NAME)
if (friend:HealthPercent() <= FRIEND_PERCENT and friend:isOnScreen()) then
Self.Say("exura sio \"" .. FRIEND_NAME)
end
end


function ManaUp()
local mana = math.floor((Self.Mana() / Self.MaxMana()) * 100)
if (mana < DRINK_AT and not RESTORING) then
RESTORING = true
elseif (mana < DRINK_TO and RESTORING) then
Self.UseItemWithMe(237)
wait(200)
else
RESTORING = false
end
end


while (true) do
ManaUp()
HealFriend()
wait(200, 500)
end

Crown Royal
12-28-2012, 04:10 AM
At first I was like.. YESSS!
..
..
23:09 You are permanently ignoring players.
23:09 Welcome to XenoBot!
23:09 XenoScript Error:
Script: Sio Script.lua
Line #: 21
Chunk: ...\Users\Zack\Documents\XenoBot\Scripts\Sio Script.lua
Error: attempt to compare number with nil
This is an error with user-input and should not be reported as a bug with XenoBot.

...
BUT NOW IM LIKe, FUCKKKK!

.. Im an idiot. I forgot to remove --EDIT THIS, but still.. It runs now, and just doesn't sio. I replaced the name, and even went down to 150hp, to make sure, sio scripts really irritate me :)

DarkstaR
12-28-2012, 04:21 AM
At first I was like.. YESSS!
..
..
23:09 You are permanently ignoring players.
23:09 Welcome to XenoBot!
23:09 XenoScript Error:
Script: Sio Script.lua
Line #: 21
Chunk: ...\Users\Zack\Documents\XenoBot\Scripts\Sio Script.lua
Error: attempt to compare number with nil
This is an error with user-input and should not be reported as a bug with XenoBot.

...
BUT NOW IM LIKe, FUCKKKK!

.. Im an idiot. I forgot to remove --EDIT THIS, but still.. It runs now, and just doesn't sio. I replaced the name, and even went down to 150hp, to make sure, sio scripts really irritate me :)

Update to v3.0.1, v3.0.0 has some creature class issues.

Crown Royal
12-28-2012, 04:29 AM
Let's make love. Thanks for the help ;D

Jfrye
01-03-2013, 05:10 PM
DarkstaR, is it possible to add multiple people to this script for healing?

Abuse
01-03-2013, 06:17 PM
Here's what I used at hellspawns. When you hit 14% mana, it drinks pots until 80%, and it sio's your teammate.


--EDIT THIS
DRINK_AT = 14
DRINK_TO = 80
FRIEND_NAME = "Huvi"
FRIEND_PERCENT = 35


--LEAVE THIS
RESTORING = false


function HealFriend()
local friend = Creature.GetByName(FRIEND_NAME)
if (friend:HealthPercent() <= FRIEND_PERCENT and friend:isOnScreen()) then
Self.Say("exura sio \"" .. FRIEND_NAME)
end
end


function ManaUp()
local mana = math.floor((Self.Mana() / Self.MaxMana()) * 100)
if (mana < DRINK_AT and not RESTORING) then
RESTORING = true
elseif (mana < DRINK_TO and RESTORING) then
Self.UseItemWithMe(237)
wait(200)
else
RESTORING = false
end
end


while (true) do
ManaUp()
HealFriend()
wait(200, 500)
end

DarkstaR

Have you thought of putting that function into Xenobot itself? The "at X mana drink untill X mana" that way when your hunting it wont mana pot every time we strike or whatever

WedNesDay
01-04-2013, 01:25 AM
well, i'm not a good scripter but i guess it works:
--[[ INIT START ]]--
local SIO_FRIENDS = {"Cachero", "Eternal Oblivion"}
local SIO_HPPC = 40 -- or you can random like: math.random(40,50)
--[[ INIT END ]]--

function sioFriend(hppc, ...)
local FRIENDS = {...}
local TO_HEAL = hppc or 30
for x = 1, #FRIENDS do
local GET_FRIEND = Creature.GetByName(FRIENDS[x])
if GET_FRIEND:HealthPercent() < TO_HEAL and GET_FRIEND:isOnScreen() then
if Self.Mana() > 140 then
Self.Say("exura sio \"" .. FRIENDS[x])
wait(400,600)
end
end
end
end


while (true) do
sioFriend(SIO_HPPC, unpack(SIO_FRIENDS))
wait(200,400)
end

Abuse

Abuse
01-04-2013, 05:40 AM
well, i'm not a good scripter but i guess it works:
--[[ INIT START ]]--
local SIO_FRIENDS = {"Cachero", "Eternal Oblivion"}
local SIO_HPPC = 40 -- or you can random like: math.random(40,50)
--[[ INIT END ]]--

function sioFriend(hppc, ...)
local FRIENDS = {...}
local TO_HEAL = hppc or 30
for x = 1, #FRIENDS do
local GET_FRIEND = Creature.GetByName(FRIENDS[x])
if GET_FRIEND:HealthPercent() < TO_HEAL and GET_FRIEND:isOnScreen() then
if Self.Mana() > 140 then
Self.Say("exura sio \"" .. FRIENDS[x])
wait(400,600)
end
end
end
end


while (true) do
sioFriend(SIO_HPPC, unpack(SIO_FRIENDS))
wait(200,400)
end

Abuse

Was wondering why I was tagged here, but must've gotten the names wrong!

Heck, post mentions is always nice. WedNesDay