View Full Version : equip ring of healing
jollebollen
12-10-2015, 11:40 PM
i searched the forum for this script but didn't find any =)
jollebollen
12-12-2015, 03:12 AM
i had it before but my pc broke so all scripts was removed hehe
Aristeus
12-12-2015, 12:05 PM
i searched the forum for this script but didn't find any =)
There's a fairly basic example script for energy rings in the xenobot install folder, you should be able to change it to a healing ring.
jollebollen
12-13-2015, 09:53 AM
There's a fairly basic example script for energy rings in the xenobot install folder, you should be able to change it to a healing ring.
cant find any in there lol, not a single script actually
Aristeus
12-13-2015, 10:49 AM
cant find any in there lol, not a single script actually
This is the exact content of the file:
--[[
This is a XenoBot example script, intended to
teach new users about the scripting API and
act as script that is usable in actual play.
ringReload.lua - reloading rings
** DO NOT EDIT THIS FILE. INSTEAD, COPY IT TO
"Documents\XenoBot\Scripts" AND EDIT THE COPY. **
]]--
--set the name or ID of the ring here
local ring = "energy ring"
-------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------
--this decides whether we have an id or a name, converting names into ids
local ringID = Item.GetItemIDFromDualInput(ring)
--this continuously loops, executing the code inside over and over again
while (true) do
--this checks to see if we have the wrong ring on
if (Self.Ring().id ~= Item.GetRingActiveID(ringID)) then
--if we do have the wrong ring on, this equips it
Self.Equip(ringID, "ring")
end
--this causes the loop to wait between 1.5 and 2.5 seconds before retrying
wait(1500, 2500)
end
Generally you can figure out a lot of very basic scripting just by reading the Xenobot library, that's also located in the install folder.
jollebollen
12-13-2015, 10:50 AM
This is the exact content of the file:
--[[
This is a XenoBot example script, intended to
teach new users about the scripting API and
act as script that is usable in actual play.
ringReload.lua - reloading rings
** DO NOT EDIT THIS FILE. INSTEAD, COPY IT TO
"Documents\XenoBot\Scripts" AND EDIT THE COPY. **
]]--
--set the name or ID of the ring here
local ring = "energy ring"
-------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------
--this decides whether we have an id or a name, converting names into ids
local ringID = Item.GetItemIDFromDualInput(ring)
--this continuously loops, executing the code inside over and over again
while (true) do
--this checks to see if we have the wrong ring on
if (Self.Ring().id ~= Item.GetRingActiveID(ringID)) then
--if we do have the wrong ring on, this equips it
Self.Equip(ringID, "ring")
end
--this causes the loop to wait between 1.5 and 2.5 seconds before retrying
wait(1500, 2500)
end
Generally you can figure out a lot of very basic scripting just by reading the Xenobot library, that's also located in the install folder.
exactly where in th installation folder? i appreciate you helping me thanks a ton :P
Aristeus
12-13-2015, 10:54 AM
exactly where in th installation folder? i appreciate you helping me thanks a ton :P
No worries man.
Xenobot/Examples. that's the directory for the examples.
The library is in Xenobot/Data, just open the most recently changed of the lua files.
jollebollen
12-13-2015, 10:57 AM
This is the exact content of the file:
--[[
This is a XenoBot example script, intended to
teach new users about the scripting API and
act as script that is usable in actual play.
ringReload.lua - reloading rings
** DO NOT EDIT THIS FILE. INSTEAD, COPY IT TO
"Documents\XenoBot\Scripts" AND EDIT THE COPY. **
]]--
--set the name or ID of the ring here
local ring = "energy ring"
-------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------
--this decides whether we have an id or a name, converting names into ids
local ringID = Item.GetItemIDFromDualInput(ring)
--this continuously loops, executing the code inside over and over again
while (true) do
--this checks to see if we have the wrong ring on
if (Self.Ring().id ~= Item.GetRingActiveID(ringID)) then
--if we do have the wrong ring on, this equips it
Self.Equip(ringID, "ring")
end
--this causes the loop to wait between 1.5 and 2.5 seconds before retrying
wait(1500, 2500)
end
Generally you can figure out a lot of very basic scripting just by reading the Xenobot library, that's also located in the install folder.
exactly where in th installation folder? i appreciate you helping me thanks a ton :P
krille09
12-13-2015, 10:58 AM
local RingID = 3052
Module.New('equip-ring', function(mod)
if Self.Ring().id == 0 then
Self.Equip(RingID, "ring")
end
mod:Delay(1500,2500)
end)
jollebollen
12-13-2015, 11:00 AM
local RingID = 3052
Module.New('equip-ring', function(mod)
if Self.Ring().id == 0 then
Self.Equip(RingID, "ring")
end
mod:Delay(1500,2500)
end)
thank you very much :)
krille09
12-13-2015, 11:01 AM
thank you very much :)
No problem! :)
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.