Skip to content

Instantly share code, notes, and snippets.

@crackcomm
crackcomm / example-config-reset-bp.lua
Last active December 25, 2015 11:39
Create a config (example is example-config-reset-bp.lua) and just include config.
-- Bp in Backpack slot is bp #1
SecondBp = "Backpack" -- bp #2 (optional)
ThirdBp = "Camouflage Backpack" -- bp #3 (optional)
LabelName = "ResetBp"
HideEquipment = true -- hides equipment
dofile("reset-bp.lua")
local Dialog = {
-- "hi",
"Gamel is a rebel",
"yes",
"He wants to obtain a magic crystal so lugri can cast a deathcurse",
"yes",
-- "bye"
}
local DialogDelay = 200
<panel name="Self Healer">
<control name="SpellList">
<item spell="exura ico" mana="40" vcomp="0" vsign="1" vrandom="0" vvalue="85" enabled="1"/>
<item spell="exura ico" mana="40" vcomp="1" vsign="3" vrandom="0" vvalue="99" enabled="1"/>
</control>
<control name="ItemList">
<item id="266" vcomp="0" vsign="1" vrandom="0" vvalue="50" enabled="1"/>
<item id="268" vcomp="0" vsign="3" vrandom="0" vvalue="25" enabled="1"/>
</control>
</panel>
@crackcomm
crackcomm / gist:7114166
Last active December 26, 2015 07:19
gistfile1: crashes gistfile2: loaded after disabling BP Info
<panel name="Self Healer">
<control name="SpellList">
<item spell="exura ico" mana="40" vcomp="0" vsign="1" vrandom="0" vvalue="70" enabled="1"/>
<item spell="exura ico" mana="40" vcomp="1" vsign="3" vrandom="0" vvalue="99" enabled="1"/>
</control>
<control name="ItemList">
<item id="266" vcomp="0" vsign="1" vrandom="0" vvalue="50" enabled="1"/>
<item id="7876" vcomp="0" vsign="1" vrandom="0" vvalue="60" enabled="1"/>
</control>
</panel>
--------------------------------------------------------------------------------------------------------------------------
--- BP Settings ---
local GoldBP = "brocade backpack" --- Your gold backpack. (use same colors inside)
--- BP Info ---
--- Your #1 BP inside depot will recieve loot.
--------------------------------------------------------------------------------------------------------------------------
--- Hunt Settings ---
local ManaBuy = 50 --- Amount of mana pots to buy before hunt.
<panel name="Self Healer">
<control name="SpellList">
<item spell="exura ico" mana="40" vcomp="0" vsign="1" vrandom="0" vvalue="80" enabled="1"/>
<item spell="exura ico" mana="40" vcomp="1" vsign="3" vrandom="0" vvalue="99" enabled="0"/>
</control>
<control name="ItemList">
<item id="266" vcomp="0" vsign="1" vrandom="0" vvalue="60" enabled="1"/>
<item id="268" vcomp="0" vsign="2" vrandom="0" vvalue="50" enabled="1"/>
</control>
</panel>
local DropCap = 20 -- Capacity to drop spear
local MinSpears = 4 -- Down to this amount we will drop spears
local CareSpearId = Item.GetID("Royal Spear") -- what spear we care about
function spearModule(module)
if (Self.Cap() < DropCap) and (hasSpears() > MinSpears) then
print("Dropping spear, needs "..tostring(DropCap).." cap")
dropSpear()
elseif (hasSpears() == 0) then
local MinCap = 120 + 20 -- (Drop cap + Spear cap) It won't pickup if capacity <= this
local CareSpearId = Item.GetID("Royal Spear") -- what spear do we care about
local checkRange = 2
function pickupModule(module)
if (Self.Cap() <= MinCap) then
return
end
-- -- -- -- -- -- -- -- -- -- -- -- --
-- Y88b d88P 888888b. 8888888888 .d8888b. --
-- Y88b d88P 888 "88b 888 d88P Y88b --
-- Y88o88P 888 .88P 888 Y88b. -- -- Created: 2013-11-19 --
-- Y888P 8888888K. 8888888 "Y888b. -- -- Updated: 2013-11-21 --
-- d888b 888 "Y88b 888 "Y88b. --
-- d88888b 888 888 888 "888 --
-- d88P Y88b 888 d88P 888 Y88b d88P --
-- d88P Y88b 8888888P" 888 "Y8888P" --
-- -- -- -- -- -- -- -- -- -- -- -- --
{
"name": "tibia.com/online_characters",
"steps": {
"start": {
"name": "html.table",
"payload": {
"url": "http://www.tibia.com/community/?subtopic=worlds",
"table": "table.TableContent",
"columns": {
"url": {"extract": "href", "path": "td:nth-child(1) > a"}