Log in

View Full Version : Selling items



sparkz023
11-11-2014, 12:40 PM
I'm trying to get my script to sell the loot it's picked up on the way back to city. I've looked around the forums and pinched some code out of a few but can't get them to work. I have most libraries so not sure why.

Does anyone know of a fairly easy lua script I could add that will basically sell the ID's I've got to the NPC when it comes up to it?

Thanks in advance.

sparkz023
11-11-2014, 02:43 PM
Self.SayToNpc({"hi", "trade"}, 65)
wait(1500, 2000)
for _, v in ipairs({"plate armor", "plate shield", "steel helmet"}) do
Self.ShopSellAllItems(v)
wait(800, 1200)
end

Thanks. Testing it now.

The one I had was similar to that but used ID's, and I just couldn't get it to work for the life of me.


Edit: Couldn't get it to work still. It's not even trying to speak with the NPC. It just ignores the label virtually.

sparkz023
11-12-2014, 11:16 AM
----------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------
----------------------------------------------------MADE BY SPARKZ023 VERSION 1.0---------------------------------

MPotID = 268 --- mana potion ID
MinMPots = 5 ---- if less then script will exit spawn /// Set to 0 if you do not use Mana pots
MPots = 25 ----- amount to refill /// Set to 0 if you do not use Mana pots
MPotprice = 50 ---- price of 1 single mana pot

HPotID = 266 --- health potion ID
MinHPots = 3 --- if less then script will exit spawn /// Set to 0 if you do not use Health pots
HPots = 10 --- amount to refill /// Set to 0 if you do not use Health pots
HPotprice = 45 --- price of 1 single health potion

MinCap = 50 ---- if less then script will exit spawn

HuntHard = false ---- Do you want to hunt -2? You will encounter several guards and archers at the same time. Recommended level 40+ (Greater exp, bigger waste also)
SellLoot = true --- This script is ideally designed for making money. If you're not too phased, I'd suggest setting this to false, and manually going through the looter, and removing the items you don't want to loot.

--------------------------------------------------------------------

registerEventListener(WALKER_SELECTLABEL, "onWalkerSelectLabel")

dofile("Forgee.lua")
function onWalkerSelectLabel(labelName)
if (labelName == "Checker1") then
delayWalker(1000)
setWalkerEnabled(false)
if (Self.ItemCount(MPotID) <= MinMPots) or (Self.Cap() < MinCap) or (Self.ItemCount(HPotID) <= MinHPots) then
setWalkerEnabled(true)
gotoLabel("Start")
else
setWalkerEnabled(true)
gotoLabel("Go Hunt")
end

elseif (labelName == "Checker2") then
delayWalker(1000)
setWalkerEnabled(false)
if (Self.ItemCount(MPotID) <= MinMPots) or (Self.Cap() < MinCap) or (Self.ItemCount(HPotID) <= MinHPots) then
setWalkerEnabled(true)
gotoLabel("Finish Hunting")
else
setWalkerEnabled(true)
gotoLabel("Keep Hunting1")
end

elseif (labelName == "Hardcore") then
if (HuntHard) then
gotoLabel("Go Hardcore")
else
gotoLabel("No Hardcore")
end

elseif (labelName == "Check Seller") then
if (SellLoot) then
gotoLabel("Sell Items")
else
gotoLabel("Not Selling")
end

elseif (LabelName == "Armors") then
setWalkerEnabled(false)
Self.SayToNpc({"hi", "trade"}, 65)
wait(1500, 2000)
for _, v in ipairs({"brass armor", "plate shield", "scale armor", "chain armor", "brass helmet", "battle shield"}) do
Self.ShopSellAllItems(v)
wait(800, 1200)
setWalkerEnabled(true)
end

elseif (LabelName == "Weapons") then
setWalkerEnabled(false)
Self.SayToNpc({"hi", "trade"}, 65)
wait(1500, 2000)
for _, v in ipairs({"mace", "sword", "double axe"}) do
Self.ShopSellAllItems(v)
wait(800, 1200)
setWalkerEnabled(true)
end

elseif (labelName == "Bank") then
setWalkerEnabled(false)
NpcConv("hi","deposit all","yes","balance")
wait(900, 1200)
Self.WithdrawMoney((MPotprice*(MPots-Self.ItemCount(MPotID))))
wait(900, 1200)
Self.SayToNpc("yes")
wait(900, 1200)
Self.WithdrawMoney((HPotprice*(HPots-Self.ItemCount(HPotID))))
wait(900, 1200)
Self.SayToNpc("yes")
wait(3000,5000)
setWalkerEnabled(true)

elseif (labelName == "Deposit") then
setWalkerEnabled(false)
local dprandomise = (math.random(1,2))
Self.DepositItems({11472, 0}, {11483, 0}, {11482, 0}, {11451, 0}, {7401, 0}, {5878, 0})
wait(1500,1900)
setWalkerEnabled(true)

elseif (labelName == "Supplies") then
setWalkerEnabled(false)
wait(900, 1200)
Self.SayToNpc({"Hi", "flasks", "yes", "Trade"}, 65)
wait(900, 1200)
buyAlotOfItemsBecauseItsSuchAGodDamnBigDeal(MPotID , (MPots-Self.ItemCount(MPotID)))
wait(900, 1200)
buyAlotOfItemsBecauseItsSuchAGodDamnBigDeal(HPotID , (HPots-Self.ItemCount(HPotID)))
wait(900, 1200)
setWalkerEnabled(true)

elseif (labelName == "Backpacks") then
dofile("Forgee.lua")
delayWalker(7000)
resetBackpacks()
end
end

function buyAlotOfItemsBecauseItsSuchAGodDamnBigDeal(item, count)
count = tonumber(count) or 1
repeat
local amnt = math.min(count, 100)
if(Self.ShopBuyItem(item, amnt) == 0)then
return printf("ERROR: failed to buy item: %s", tostring(item))
end
wait(200,500)
count = (count - amnt)
until count <= 0
end

function NpcConv(...)
for _, str in ipairs(arg) do
wait((tostring(str):len() / 125) * 60000 * math.random(1.1, 1.8))
Self.SayToNpc(str)
end
end

Self.ReachNpc = function(name, tries)
local npc = Creature.GetByName(name)
if (npc:DistanceFromSelf() > 3) then
tries = tries or 15
repeat
local nposi = npc:Position()
Self.UseItemFromGround(nposi.x, nposi.y, nposi.z)
wait(1500)
tries = tries - 1
until (npc:DistanceFromSelf() <= 3) or (tries == 0)
end
end

sparkz023
11-12-2014, 01:43 PM
Could you post the whole LUA?

The script's a bit messy I know but it functions the way I need it to (except for this crap)

sparkz023
11-12-2014, 08:51 PM
Do not use Forgee's library, it is outdated.
I have replaced all the functions of him you have used with the default ones and cleaned up your code.
The only thing you have to do now is to add the backpack names to the function at the Backpacks label.

----------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------
----------------------------------------------------MADE BY SPARKZ023 VERSION 1.0---------------------------------

MPotID = 268 --- mana potion ID
MinMPots = 5 ---- if less then script will exit spawn /// Set to 0 if you do not use Mana pots
MPots = 25 ----- amount to refill /// Set to 0 if you do not use Mana pots
MPotprice = 50 ---- price of 1 single mana pot

HPotID = 266 --- health potion ID
MinHPots = 3 --- if less then script will exit spawn /// Set to 0 if you do not use Health pots
HPots = 10 --- amount to refill /// Set to 0 if you do not use Health pots
HPotprice = 45 --- price of 1 single health potion

MinCap = 50 ---- if less then script will exit spawn

HuntHard = false ---- Do you want to hunt -2? You will encounter several guards and archers at the same time. Recommended level 40+ (Greater exp, bigger waste also)
SellLoot = true --- This script is ideally designed for making money. If you're not too phased, I'd suggest setting this to false, and manually going through the looter, and removing the items you don't want to loot.

--------------------------------------------------------------------

registerEventListener(WALKER_SELECTLABEL, "onWalkerSelectLabel")
function onWalkerSelectLabel(labelName)
if (labelName == "Checker1") then
if (Self.ItemCount(MPotID) <= MinMPots or Self.Cap() < MinCap or Self.ItemCount(HPotID) <= MinHPots) then
Walker.Goto("Start")
else
Walker.Goto("Go Hunt")
end

elseif (labelName == "Checker2") then
if (Self.ItemCount(MPotID) <= MinMPots or Self.Cap() < MinCap or Self.ItemCount(HPotID) <= MinHPots) then
Walker.Goto("Finish Hunting")
else
Walker.Goto("Keep Hunting1")
end

elseif (labelName == "Hardcore") then
if (HuntHard) then
Walker.Goto("Go Hardcore")
else
Walker.Goto("No Hardcore")
end

elseif (labelName == "Check Seller") then
if (SellLoot) then
Walker.Goto("Sell Items")
else
Walker.Goto("Not Selling")
end

elseif (LabelName == "Armors") then
Walker.Stop()
Self.SayToNpc({"hi", "trade"}, 65)
wait(1500, 2000)
for _, v in ipairs({"brass armor", "plate shield", "scale armor", "chain armor", "brass helmet", "battle shield"}) do
Self.ShopSellAllItems(v)
wait(800, 1200)
end
Walker.Start()

elseif (LabelName == "Weapons") then
Walker.Stop()
Self.SayToNpc({"hi", "trade"}, 65)
wait(1500, 2000)
for _, v in ipairs({"mace", "sword", "double axe"}) do
Self.ShopSellAllItems(v)
wait(800, 1200)
end
Walker.Start()

elseif (labelName == "Bank") then
Walker.Stop()
Self.SayToNpc({"hi", "deposit all", "yes"}, 65)
local withdrawAmount = (MPotprice*(math.max(0, MPots - Self.ItemCount(MPotID)))) + (HPotprice*(math.max(0, HPots - Self.ItemCount(HPotID))))
if (withdrawAmount > 0) then
Self.SayToNpc({"withdraw " .. withdrawAmount, "yes"}, 65)
end
Self.SayToNpc("balance")
Walker.Start()

elseif (labelName == "Deposit") then
Walker.Stop()
Self.DepositItems({11472, 0}, {11483, 0}, {11482, 0}, {11451, 0}, {7401, 0}, {5878, 0})
Walker.Start()

elseif (labelName == "Supplies") then
Walker.Stop()
Self.SayToNpc("hi")
if (Self.Flasks() > 0) then
Self.SayToNpc("flasks")
wait(300, 500)
while (Self.Flasks() > 0) do
Self.SayToNpc("yes")
wait(300, 500)
end
end
Self.SayToNpc("trade")
wait(1500, 2000)
Self.ShopBuyItemsUpTo(MPotID, MPots)
Self.ShopBuyItemsUpTo(HPotID, HPots)
Walker.Start()

elseif (labelName == "Backpacks") then
Cavebot.Stop()
Self.CloseContainers()
Self.OpenMainBackpack(true):OpenChildren({"backpack1", true}, {"backpack2", true})
Cavebot.Start()

end
end

Wow, thanks. I'll give it a crack soon, keen to see how it goes. Is there a way to name the backpacks used at the top, instead of down the bottom? I try to release 90% of my scripts for free, and I just have a feeling a lot of people wouldn't even think to check there.

sparkz023
11-14-2014, 02:03 PM
You could create a variable for each backpack.
Just replace "backpack1" at the bottom with backpack1 and add backpack1 = "backpackname" at the top and so on.

Hey mate, been a couple of days, but I haven't had a chance to test it.

It's still not working unfortunately. To be honest, it's not even stopping to say hi to the NPC, and if the script is trying to then it must be walking out of range before it does. It's on the label for less then a second. No error codes, it runs fine, and everything else performs as it should. It's not like it's failing to sell the loot, it's just not even getting to the point of greeting the NPC. Idea's?

sparkz023
11-14-2014, 02:55 PM
Not really, no.
Could you also post the settings file please?

Two posts, the rest is just the lua though I think.


<panel name="Spell Shooter">
<control name="shooterList">
</control>
</panel>
<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="98" enabled="1"/>
</control>
<control name="ItemList">
<item id="266" vcomp="0" vsign="1" vrandom="0" vvalue="49" enabled="1"/>
<item id="268" vcomp="0" vsign="2" vrandom="0" vvalue="50" enabled="1"/>
</control>
</panel>
<panel name="Support">
<control name="HiHealSpell" value="Exura"/>
<control name="HiHealHealth" value="90"/>
<control name="HiHealRange" value="5"/>
<control name="HiHealMana" value="20"/>
<control name="HiHealEnable" value="0"/>
<control name="LoHealSpell" value="Exura Gran"/>
<control name="LoHealHealth" value="55"/>
<control name="LoHealPerc" value="5"/>
<control name="LoHealMana" value="70"/>
<control name="LoHealEnable" value="0"/>
<control name="PotHealID" value="266"/>
<control name="PotHealHealth" value="50"/>
<control name="PotHealRange" value="5"/>
<control name="PotHealEnable" value="0"/>
<control name="ManaRestoreID" value="268"/>
<control name="ManaRestoreMana" value="50"/>
<control name="ManaRestoreEnable" value="0"/>
</panel>
<panel name="Frag Helper">
<control name="HoldTarg" value="0"/>
<control name="ComboEnable" value="0"/>
</panel>
<panel name="Tools">
<control name="LightEnable" value="0"/>
<control name="XRayEnable" value="0"/>
<control name="ShowLookIDs" value="0"/>
<control name="ShowManaBar" value="0"/>
<control name="ShowBPInfo" value="0"/>
<control name="EnableAntiIdle" value="0"/>
<control name="EnableEatFood" value="0"/>
<control name="EnableAdvancedInfo" value="0"/>
<control name="EnableReconnect" value="0"/>
</panel>
<panel name="Combo Options">
<control name="ComboSayLeader" value=""/>
<control name="ComboSayPhrase" value=""/>
<control name="ComboSayEnable" value="0"/>
<control name="ComboShotLeader" value=""/>
<control name="ComboShotType" value="0"/>
<control name="ComboShotEnable" value="0"/>
<control name="ComboExivaLeader" value=""/>
<control name="ComboExivaEnable" value="0"/>
<control name="ComboParaWatch" value="0"/>
<control name="ComboParaEnable" value="0"/>
<control name="ComboPartyWatch" value="0"/>
<control name="ComboPartyEnable" value="0"/>
<control name="ComboAttackSpell" value="Exevo Gran Mas Frigo"/>
<control name="ComboAttackSpellEnable" value="0"/>
<control name="ComboAttackRuneID" value="3155"/>
<control name="ComboAttackRuneEnable" value="0"/>
<control name="ComboFocusType" value="0"/>
</panel>
<panel name="HUD">
<control name="HUDItemList">
<item textColor="9" x="5" y="5" pos="4" checked="1"/>
<item textColor="9" x="5" y="5" pos="6" checked="1"/>
<item textColor="9" x="5" y="5" pos="0" checked="1"/>
<item textColor="6" x="5" y="5" pos="8" checked="0"/>
<item textColor="9" x="5" y="5" pos="10" checked="1"/>
<item textColor="9" x="5" y="5" pos="5" checked="1"/>
<item textColor="9" x="5" y="5" pos="2" checked="1"/>
<item textColor="0" x="0" y="0" pos="0" checked="0"/>
</control>
<control name="HPPercOnClick" value="0"/>
<control name="MPPercOnClick" value="0"/>
<control name="MPPercClickEnable" value="0"/>
<control name="MPPercClickEnable" value="0"/>
</panel>
<panel name="Recent Loot">
<control name="LootMonsterList">
</control>
<control name="DisplaySelectLoot" value="0"/>
<control name="HideNothingLoot" value="0"/>
</panel>
<panel name="Spell Timers">
<control name="ShowHasteTimer" value="1"/>
<control name="ShowManaTimer" value="1"/>
<control name="ShowInvisibleTimer" value="1"/>
<control name="ShowBuffTimers" value="1"/>
</panel>
<panel name="Kill Counters">
<control name="KillCounterBox">
</control>
<control name="DisplaySelectCounters" value="0"/>
<control name="DisplayCountRatios" value="0"/>
</panel>
<panel name="Battle Information">
<control name="ShowTakenDamage" value="1"/>
<control name="ShowTakenAvgDamage" value="1"/>
<control name="ShowTakenBurstDamage" value="1"/>
<control name="ShowDealtDamage" value="1"/>
<control name="ShowTarget" value="1"/>
<control name="ShowFollow" value="1"/>
<control name="ShowExiva" value="1"/>
</panel>
<panel name="Experience Information">
<control name="ShowHourlyExp" value="1"/>
<control name="ShowExpTogo" value="1"/>
<control name="ShowTimeLeft" value="1"/>
</panel>
<panel name="Condition Manager">
<control name="PoisonCureLimit" value="6"/>
<control name="PoisonCureMana" value="20"/>
<control name="PoisonCureEnable" value="0"/>
<control name="DeathCureLimit" value="10"/>
<control name="DeathCureMana" value="40"/>
<control name="DeathCureEnable" value="0"/>
<control name="PhysicalCureLimit" value="5"/>
<control name="PhysicalCureMana" value="30"/>
<control name="PhysicalCureEnable" value="0"/>
<control name="FireCureLimit" value="20"/>
<control name="FireCureMana" value="30"/>
<control name="FireCureEnable" value="0"/>
<control name="EnergyCureLimit" value="15"/>
<control name="EnergyCureMana" value="30"/>
<control name="EnergyCureEnable" value="0"/>
<control name="ParaCureEnable" value="0"/>
<control name="ParaCureMana" value="50"/>
<control name="ParaCureSpell" value="Utani Hur"/>
<control name="HasteCastMana" value="50"/>
<control name="HasteCastSpell" value="Utani Hur"/>
<control name="HasteCastEnable" value="0"/>
<control name="InvisibleCastMana" value="50"/>
<control name="InvisibleCastEnable" value="0"/>
<control name="ShieldCastMana" value="50"/>
<control name="ShieldCastEnable" value="0"/>
<control name="RecoveryCastEnable" value="0"/>
<control name="RecoveryCastType" value="0"/>
<control name="RecoveryCastMana" value="75"/>
<control name="RecoveryCheckPzEnable" value="1"/>
</panel>
<panel name="Equipment Manager">
<control name="AmmoRefillID" value="3450"/>
<control name="AmmoRefillEnable" value="0"/>
<control name="WeaponRefillID" value="7368"/>
<control name="WeaponRefillEnable" value="0"/>
</panel>
<panel name="Targeting">
<control name="TargetingList">
<item type="Minotaur" chs="0" max="100" min="0" prio="1" prox="7" count="1"/>
<item type="Minotaur Guard" chs="0" max="100" min="0" prio="4" prox="7" count="1"/>
<item type="Minotaur Archer" chs="0" max="100" min="0" prio="2" prox="7" count="1"/>
</control>
</panel>
<panel name="Walker">
<control name="WaypointList">
<item text="Stand (33214, 32455, 7)" tag="1"/>
<item text="Stand (33214, 32461, 8)" tag="1"/>
<item text="Reach Depot" tag="253"/>
<item text="Deposit:" tag="255"/>
<item text="Stand (33214, 32455, 8)" tag="1"/>
<item text="Node (33219, 32430, 7)" tag="0"/>
<item text="Node (33219, 32420, 7)" tag="0"/>
<item text="Node (33217, 32393, 7)" tag="0"/>
<item text="Stand (33221, 32387, 7)" tag="1"/>
<item text="Bank:" tag="255"/>
<item text="Stand (33217, 32402, 7)" tag="1"/>
<item text="Supplies:" tag="255"/>
<item text="Node (33216, 32427, 7)" tag="0"/>
<item text="Node (33216, 32443, 7)" tag="0"/>
<item text="Stand (33214, 32453, 7)" tag="1"/>
<item text="Backpacks:" tag="255"/>
<item text="Checker1:" tag="255"/>
<item text="Go Hunt:" tag="255"/>
<item text="Node (33223, 32435, 7)" tag="0"/>
<item text="Node (33242, 32413, 7)" tag="0"/>
<item text="Node (33270, 32376, 7)" tag="0"/>
<item text="Node (33285, 32345, 7)" tag="0"/>
<item text="Node (33295, 32300, 7)" tag="0"/>
<item text="Node (33302, 32290, 7)" tag="0"/>
<item text="Keep Hunting:" tag="255"/>
<item text="Node (33306, 32279, 7)" tag="0"/>
<item text="Node (33310, 32284, 7)" tag="0"/>
<item text="Node (33318, 32284, 7)" tag="0"/>
<item text="Stand (33309, 32284, 7)" tag="1"/>
<item text="Node (33306, 32288, 6)" tag="0"/>
<item text="Stand (33306, 32284, 6)" tag="1"/>
<item text="SLure" tag="6"/>
<item text="Stand (33305, 32283, 5)" tag="1"/>
<item text="ELure" tag="9"/>
<item text="Stand (33306, 32284, 5)" tag="1"/>
<item text="Stand (33309, 32284, 6)" tag="1"/>
<item text="Stand (33312, 32281, 7)" tag="1"/>
<item text="Stand (33312, 32282, 8)" tag="1"/>
<item text="SLure" tag="6"/>
<item text="Stand (33309, 32293, 8)" tag="1"/>
<item text="ELure" tag="9"/>
<item text="Node (33303, 32289, 8)" tag="0"/>
<item text="Hardcore:" tag="255"/>
<item text="Go Hardcore:" tag="255"/>
<item text="Stand (33300, 32290, 8)" tag="1"/>
<item text="Stand (33300, 32291, 9)" tag="1"/>
<item text="SLure" tag="6"/>
<item text="Stand (33309, 32291, 9)" tag="1"/>
<item text="ELure" tag="9"/>
<item text="Node (33313, 32280, 9)" tag="0"/>
<item text="Node (33304, 32280, 9)" tag="0"/>
<item text="Stand (33300, 32290, 9)" tag="1"/>
<item text="No Hardcore:" tag="255"/>
<item text="Stand (33312, 32281, 8)" tag="1"/>
<item text="Node (33305, 32286, 7)" tag="0"/>
<item text="Checker2:" tag="255"/>
<item text="Finish Hunting:" tag="255"/>
<item text="Node (33293, 32313, 7)" tag="0"/>
<item text="Node (33275, 32323, 7)" tag="0"/>
<item text="Node (33266, 32345, 7)" tag="0"/>
<item text="Node (33265, 32379, 7)" tag="0"/>
<item text="Node (33244, 32398, 7)" tag="0"/>
<item text="Node (33232, 32416, 7)" tag="0"/>
<item text="Stand (33224, 32424, 7)" tag="1"/>
<item text="Check Seller:" tag="255"/>
<item text="Sell Items:" tag="255"/>
<item text="Stand (33219, 32431, 7)" tag="1"/>
<item text="Armors:" tag="255"/>
<item text="Stand (33225, 32432, 7)" tag="1"/>
<item text="Weapons:" tag="255"/>
<item text="Not Selling:" tag="255"/>
<item text="Node (33214, 32448, 7)" tag="0"/>
</control>
</panel>
<panel name="Walker Options">
<control name="ropeOption" value="0"/>
<control name="shovelOption" value="0"/>
</panel>
<panel name="Looter">
<control name="LootList" first="0" skinner="0" unlisted="0">
<item ID="3031" action="2"/>
<item ID="3264" action="1"/>
<item ID="3286" action="1"/>
<item ID="3410" action="1"/>
<item ID="3358" action="1"/>
<item ID="3354" action="1"/>
<item ID="3359" action="1"/>
<item ID="3377" action="1"/>
<item ID="3413" action="1"/>
<item ID="3275" action="1"/>
<item ID="11472" action="0"/>
<item ID="11483" action="0"/>
<item ID="11482" action="0"/>
<item ID="11451" action="0"/>
<item ID="266" action="0"/>
<item ID="7401" action="0"/>
<item ID="5878" action="0"/>
</control>
</panel>
<panel name="Pathfinder">
<control name="walkOnFireEnable" value="1"/>
<control name="walkOnFurnitureEnable" value="1"/>
<control name="walkOnMaroonGround" value="1"/>
<control name="showDiagnoticEnable" value="0"/>
<control name="walkWithMapclicks" value="0"/>
</panel>
<panel name="Mount">
</panel>
<panel name="Special Areas">
<control name="AreaList">
</control>
</panel>
<panel name="Alarms">
<control name="disAlarm" value="1"/>
<control name="damAlarm" value="0"/>
<control name="lhpAlarm" value="0"/>
<control name="lhpAlarmPercent" value="50"/>
<control name="pmAlarm" value="1"/>
<control name="creatureAlarm" value="0"/>
<control name="attackAlarm" value="1"/>
<control name="attackAlarmYellow" value="1"/>
<control name="playerAlarm" value="0"/>
<control name="playerAlarmLog" value="0"/>
<control name="stuckAlarm" value="1"/>
<control name="burstAlarm" value="0"/>
<control name="burstAlarmPercent" value="500"/>
<control name="averageAlarm" value="0"/>
<control name="averageAlarmPercent" value="200"/>
<control name="alarmPartyIgnore" value="0"/>
</panel>
<panel name="Scripter">
<control name="RunningScriptList">

sparkz023
11-14-2014, 02:55 PM
And this part here


<script name="[Knight] Mino Tower Darashia.lua"><![CDATA[LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS 0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLQ0KLS0tLS 0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS 0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLQ0K LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS 0tLS0tLS0tLS0tLS0tLU1BREUgQlkgU1BBUktaMDIzIFZFUlNJ T04gMS4wLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS 0tDQoJDQoJTVBvdElEID0gMjY4IC0tLSBtYW5hIHBvdGlvbiBJ RA0KCU1pbk1Qb3RzID0gNSAtLS0tIGlmIGxlc3MgdGhlbiBzY3 JpcHQgd2lsbCBleGl0IHNwYXduIC8vLyBTZXQgdG8gMCBpZiB5 b3UgZG8gbm90IHVzZSBNYW5hIHBvdHMNCglNUG90cyA9IDI1IC 0tLS0tIGFtb3VudCB0byByZWZpbGwgLy8vIFNldCB0byAwIGlm IHlvdSBkbyBub3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lnRGVhbChpdGVtLCBjb3VudCkNCgljb3VudC A9IHRvbnVtYmVyKGNvdW50KSBvciAxDQoJcmVwZWF0DQoJCWxv Y2FsIGFtbnQgPSBtYXRoLm1pbihjb3VudCwgMTAwKQ0KCQlpZi hTZWxmLlNob3BCdXlJdGVtKGl0ZW0sIGFtbnQpID09IDApdGhl bg0KCQkJcmV0dXJuIHByaW50ZigiRVJST1I6IGZhaWxlZCB0by BidXkgaXRlbTogJXMiLCB0b3N0cmluZyhpdGVtKSkNCgkJZW5k DQogICAgICAgIHdhaXQoMjAwLDUwMCkNCgkJY291bnQgPSAoY2 91bnQgLSBhbW50KQ0KCXVudGlsIGNvdW50IDw9IDANCmVuZA0K DQpmdW5jdGlvbiBOcGNDb252KC4uLikNCiAgICBmb3IgXywgc3 RyIGluIGlwYWlycyhhcmcpIGRvDQogICAgICAgIHdhaXQoKHRv c3RyaW5nKHN0cik6bGVuKCkgLyAxMjUpICogNjAwMDAgKiBtYX RoLnJhbmRvbSgxLjEsIDEuOCkpDQogICAgICAgIFNlbGYuU2F5 VG9OcGMoc3RyKQ0KICAgIGVuZA0KZW5kIAkJCQ0KDQpTZWxmLl JlYWNoTnBjID0gZnVuY3Rpb24obmFtZSwgdHJpZXMpDQogICAg ICAgIGxvY2FsIG5wYyA9IENyZWF0dXJlLkdldEJ5TmFtZShuYW 1lKQ0KICAgICAgICBpZiAobnBjOkRpc3RhbmNlRnJvbVNlbGYo KSA+IDMpIHRoZW4NCiAgICAgICAgICAgICAgICB0cmllcyA9IC B0cmllcyBvciAxNQ0KICAgICAgICAgICAgICAgIHJlcGVhdA0K ICAgICAgICAgICAgICAgICAgICAgICAgbG9jYWwgbnBvc2kgPS BucGM6UG9zaXRpb24oKQ0KICAgICAgICAgICAgICAgICAgICAg ICAgU2VsZi5Vc2VJdGVtRnJvbUdyb3VuZChucG9zaS54LCBucG 9zaS55LCBucG9zaS56KQ0KICAgICAgICAgICAgICAgICAgICAg ICAgd2FpdCgxNTAwKQ0KICAgICAgICAgICAgICAgICAgICAgIC AgdHJpZXMgPSB0cmllcyAtIDENCiAgICAgICAgICAgICAgICB1 bnRpbCAobnBjOkRpc3RhbmNlRnJvbVNlbGYoKSA8PSAzKSBvci AodHJpZXMgPT0gMCkNCiAgICAgICAgZW5kDQplbmQgIA==]]></script>
</control>
</panel>
<panel name="Advertising">
<control name="watchSellingWords" value="item, item2"/>
<control name="watchSellingEnable" value="0"/>
<control name="watchBuyingWords" value="item, item2"/>
<control name="watchBuyingEnable" value="0"/>
<control name="blockLinksEnable" value="0"/>
<control name="reduceSpamEnable" value="0"/>
</panel>

sparkz023
11-16-2014, 11:40 AM
Not really, no.
Could you also post the settings file please?

Had any luck yet? :o

sparkz023
11-19-2014, 09:17 PM
The settings file is fine.
The reason it skipped the labels is because you did not use the correct function parameter.

You have set the parameter to labelName.
function onWalkerSelectLabel(labelName)

Yet you have used this at the actions that do not work.
elseif (Label == "Armors") then

While it should be like this.
elseif (labelName == "Armors") then

And please, use the lua file I posted and get rid of Forgee's library.

Here the fixed version.
----------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------
----------------------------------------------------MADE BY SPARKZ023 VERSION 1.0---------------------------------

MPotID = 268 --- mana potion ID
MinMPots = 5 ---- if less then script will exit spawn /// Set to 0 if you do not use Mana pots
MPots = 25 ----- amount to refill /// Set to 0 if you do not use Mana pots
MPotprice = 50 ---- price of 1 single mana pot

HPotID = 266 --- health potion ID
MinHPots = 3 --- if less then script will exit spawn /// Set to 0 if you do not use Health pots
HPots = 10 --- amount to refill /// Set to 0 if you do not use Health pots
HPotprice = 45 --- price of 1 single health potion

MinCap = 50 ---- if less then script will exit spawn

HuntHard = false ---- Do you want to hunt -2? You will encounter several guards and archers at the same time. Recommended level 40+ (Greater exp, bigger waste also)
SellLoot = true --- This script is ideally designed for making money. If you're not too phased, I'd suggest setting this to false, and manually going through the looter, and removing the items you don't want to loot.

local ArmorLootID = {3410, 3358, 3354, 3359, 3377, 3413}
local WeaponLootID = {3264, 3286, 3275}

local backpackNames = {{"backpackName1", true}, {"backpackName2", true}}

--------------------------------------------------------------------

registerEventListener(WALKER_SELECTLABEL, "onWalkerSelectLabel")
function onWalkerSelectLabel(labelName)
if (labelName == "Checker1") then
if (Self.ItemCount(MPotID) <= MinMPots or Self.Cap() < MinCap or Self.ItemCount(HPotID) <= MinHPots) then
Walker.Goto("Start")
else
Walker.Goto("Go Hunt")
end

elseif (labelName == "Checker2") then
if (Self.ItemCount(MPotID) <= MinMPots or Self.Cap() < MinCap or Self.ItemCount(HPotID) <= MinHPots) then
Walker.Goto("Finish Hunting")
else
Walker.Goto("Keep Hunting1")
end

elseif (labelName == "Hardcore") then
if (HuntHard) then
Walker.Goto("Go Hardcore")
else
Walker.Goto("No Hardcore")
end

elseif (labelName == "Check Seller") then
if (SellLoot) then
Walker.Goto("Sell Items")
else
Walker.Goto("Not Selling")
end

elseif (labelName == "Armors") then
Walker.Stop()
Self.SayToNpc({"hi", "trade"}, 65)
wait(1500, 2000)
for _, v in ipairs(ArmorLootID) do
Self.ShopSellAllItems(v)
wait(800, 1200)
end
Walker.Start()

elseif (labelName == "Weapons") then
Walker.Stop()
Self.SayToNpc({"hi", "trade"}, 65)
wait(1500, 2000)
for _, v in ipairs(WeaponLootID) do
Self.ShopSellAllItems(v)
wait(800, 1200)
end
Walker.Start()

elseif (labelName == "Bank") then
Walker.Stop()
Self.SayToNpc({"hi", "deposit all", "yes"}, 65)
local withdrawAmount = (MPotprice*(math.max(0, MPots - Self.ItemCount(MPotID)))) + (HPotprice*(math.max(0, HPots - Self.ItemCount(HPotID))))
if (withdrawAmount > 0) then
Self.SayToNpc({"withdraw " .. withdrawAmount, "yes"}, 65)
end
Self.SayToNpc("balance")
Walker.Start()

elseif (labelName == "Deposit") then
Walker.Stop()
Self.DepositItems({11472, 0}, {11483, 0}, {11482, 0}, {11451, 0}, {7401, 0}, {5878, 0})
Walker.Start()

elseif (labelName == "Supplies") then
Walker.Stop()
Self.SayToNpc("hi")
if (Self.Flasks() > 0) then
Self.SayToNpc("flasks")
wait(300, 500)
while (Self.Flasks() > 0) do
Self.SayToNpc("yes")
wait(300, 500)
end
end
Self.SayToNpc("trade")
wait(1500, 2000)
Self.ShopBuyItemsUpTo(MPotID, MPots)
Self.ShopBuyItemsUpTo(HPotID, HPots)
Walker.Start()

elseif (labelName == "Backpacks") then
Cavebot.Stop()
Self.CloseContainers()
Self.OpenMainBackpack(true):OpenChildren(unpack(ba ckpackNames))
Cavebot.Start()

end
end

Yeah, I have been using the one you posted, I may of uploaded an old settings file still holding the old one.

I'm slowly changing all of my old scripts over and re-releasing them on my free script page. Thank you so much for all your help, I'm off to work now but I'll test it later tonight. Thank you!

<Edit> Sorry about the slow reply, for some reason I struggled to connect to the xenobot forums for the past 3-4 days. That single post I sent asking you if you had a chance yet took me 30 minutes to send. Everything seems fine now though.

Works fine btw, I decided to quickly test it before leaving as I already had a character close to the NPC's. Thank you again, so much!</Edit>