Code: Select all
cecandle = player:findNearestNameOrId(_Elemental)
Code: Select all
cecandle = player:findNearestNameOrId(_Elemental)
kuripot wrote:what is this means???
an error after finish AT this is my wp
i have some edit from from previous thread including
Code: Select all
<!-- # 72b --><waypoint x="3624" z="3666" y="92"> </waypoint>
Code: Select all
<!-- # 84 b--><waypoint x="4087" z="3589" y="92"> </waypoint>
Code: Select all
<!-- #105 --><waypoint x="4021" z="3944" y="34"> roomOpenA=player:findNearestNameOrId(113617); roomOpenB=player:findNearestNameOrId(113619); if roomOpenA==nil and roomOpenB==nil then getcandle();rest(10*1000) --10 seconds to wait untli guards disappear end flyoff(); </waypoint>
Code: Select all
<?xml version="1.0" encoding="utf-8"?><waypoints type="TRAVEL"> <onLoad> --=== V 0.4 ===-- --=== Many thanks to Rock5 and Lisa for their assistance and existing code --=== Without their help and patience, this script would not be possible --=== Thank you to those who have given me input on ideas for the script --=== User Options ===-- getcmount = 1 -- "0" do not collect mount chests "1" collect mount chests gettotems = 1 -- "0" do not collect totems "1" collect totems -- (don't know why people would want this but adding the option anyway) exitat = 1 -- Until a check for all chests are opened use this option to set if -- you want the bot to exit the mini game "0" do not exit "1" exit When_Finished = "at to cot" -- "end" to end script, "relog" to log next character and "waypointfilename" to load that waypointfile. CharList = {} -- Character list to use when using the "charlist" option above. Requires Rock5's "userfunction_LoginNextChar" userfunction. -- Find it here. http://www.solarstrike.net/phpBB3/viewtopic.php?p=10350 -- eg. -- CharList = { -- {account=4,chars={}}, -- {account=8,chars={1}}, -- {account=7,chars={1,2,5}}, -- } --====================-- changeProfileOption("MAX_TARGET_DIST", 60); ecandle = player:findNearestNameOrId(114117) --=== Code for When_Finished ===-- function checkRelog() -- Log result local filename = getExecutionPath() .. "/logs/cot.log"; local file, err = io.open(filename, "a+"); if file then file:write("Account: "..RoMScript("GetAccountName()").."\tName: " ..string.format("%-10s",player.Name ).." \tDate: " .. os.date() .. " \tShells gained/total: "..inventory:getItemCount(240181) - numshells.."/".. inventory:getItemCount(240181).. "\t" ..logentry .. "\n") file:close(); end if When_Finished == "relog" then sendMacro("}LoginNextToon=true;a={") sendMacro("Logout();"); waitForLoadingScreen(); loadPaths("cot_tele"); elseif When_Finished == "charlist" then SetCharList(CharList) LoginNextChar() loadprofile() loadPaths("cot_tele"); elseif When_Finished == "end" then error("Ending script",2) else if not string.find(When_Finished,".", 1, true) then When_Finished = When_Finished .. ".xml" end local filename = getExecutionPath() .. "/waypoints/" .. When_Finished local file, err = io.open(filename, "r"); if file then file:close(); loadPaths(When_Finished) else error("'When_Finished' option is invalid",0) end end end --=== Code to disable all profile skills ===-- for k,v in pairs(settings.profile.skills) do v.AutoUse = false end --=== Code to collect Elemental candles ===-- function getecandle() local lastpllocx = 0 local lastpllocz = 0 local lastpllocy = 0 player:update() local cecandle = player:findNearestNameOrId("Elemental Candlestick") local dist = distance(cecandle.X,cecandle.Z,player.X,player.Z) local lastpllocx = player.X local lastpllocz = player.Z local lastpllocy = player.Y if cecandle and (100 > dist) then -- goto ecandle teleport_SetStepSize(40) teleport(cecandle.X, cecandle.Z) -- teleport to above ecandle teleport(cecandle.X + 1, cecandle.Z, cecandle.Y +15) -- teleport in range to click ecandle -- click ecandle player:target(cecandle) rest(100) repeat player:target_Object("Elemental Candlestick", 6000); player:update() until not player.Casting teleport(lastpllocx,lastpllocz,lastpllocy) end end --====================-- local zoneid = RoMScript("GetZoneID()") if math.mod(zoneid,1000) == 10 then player:target_NPC("Ange Rasa"); yrest(2000) CompleteQuestByName("Proceed to the Scar of Despair Camp"); yrest(2000); player:target_NPC("Ange Rasa"); yrest(2000) sendMacro("ChoiceOption(4);"); yrest(2000) sendMacro("ChoiceOption(1);"); yrest(2000) waitForLoadingScreen(); end __WPL:setWaypointIndex(__WPL:getNearestWaypoint(player.X,player.Z)) </onLoad> <!-- # 1 --><waypoint x="3406" z="3588" y="34" tag="SWstart"> fly() player:target_NPC("Luke Xavi"); yrest(2000); sendMacro("ChoiceOption(3);"); yrest(3000); sendMacro("ChoiceOption(1);"); yrest(5000); teleportToWP() </waypoint> <!-- # 2 --><waypoint x="3476" z="3624" y="74"> </waypoint> <!-- # 3 --><waypoint x="3526" z="3653" y="74"> teleportToWP() </waypoint> <!-- # 4 --><waypoint x="3550" z="3668" y="92"> </waypoint> <!-- # 5 --><waypoint x="3599" z="3581" y="92"> </waypoint> <!-- # 6 --><waypoint x="3662" z="3617" y="92"> </waypoint> <!-- # 7 --><waypoint x="3593" z="3752" y="92"> </waypoint> <!-- # 8 --><waypoint x="3627" z="3983" y="92"> </waypoint> <!-- # 9 --><waypoint x="3706" z="4114" y="92"> teleportToWP() </waypoint> <!-- # 10 --><waypoint x="3705" z="4126" y="74"> </waypoint> <!-- # 11 --><waypoint x="3705" z="4185" y="74"> </waypoint> <!-- # 12 --><waypoint x="3648" z="4206" y="34"> __WPL:setWaypointIndex(__WPL:findWaypointTag("commonstart")); </waypoint> <!-- # 13 --><waypoint x="3835" z="4327" y="34" tag="Nstart"> fly() player:target_NPC("Luke Xavi"); yrest(2000); sendMacro("ChoiceOption(3);"); yrest(2000); sendMacro("ChoiceOption(1);"); yrest(5000); teleportToWP() </waypoint> <!-- # 14 --><waypoint x="3835" z="4248" y="74"> </waypoint> <!-- # 15 --><waypoint x="3835" z="4181" y="74"> </waypoint> <!-- # 16 --><waypoint x="3645" z="4206" y="34"> __WPL:setWaypointIndex(__WPL:findWaypointTag("commonstart")); </waypoint> <!-- # 17 --><waypoint x="4271" z="4086" y="34" tag="NEstart"> fly() player:target_NPC("Luke Xavi"); yrest(2000); sendMacro("ChoiceOption(3);"); yrest(2000); sendMacro("ChoiceOption(1);"); yrest(5000); teleportToWP() </waypoint> <!-- # 18 --><waypoint x="4201" z="4044" y="74"> </waypoint> <!-- # 19 --><waypoint x="4157" z="4019" y="74"> teleportToWP() </waypoint> <!-- # 20 --><waypoint x="4142" z="4046" y="92"> </waypoint> <!-- # 21 --><waypoint x="4032" z="4200" y="92"> </waypoint> <!-- # 22 --><waypoint x="3714" z="4197" y="92"> </waypoint> <!-- # 23 --><waypoint x="3648" z="4206" y="34"> __WPL:setWaypointIndex(__WPL:findWaypointTag("commonstart")); </waypoint> <!-- # 24 --><waypoint x="3416" z="4079" y="34" tag="NWstart"> fly() player:target_NPC("Luke Xavi"); yrest(2000); sendMacro("ChoiceOption(3);"); yrest(2000); sendMacro("ChoiceOption(1);"); yrest(5000); teleportToWP() </waypoint> <!-- # 25 --><waypoint x="3476" z="4044" y="74"> </waypoint> <!-- # 26 --><waypoint x="3529" z="4013" y="74"> teleportToWP() </waypoint> <!-- # 27 --><waypoint x="3595" z="4086" y="92"> </waypoint> <!-- # 28 --><waypoint x="3676" z="4046" y="92"> </waypoint> <!-- # 29 --><waypoint x="3705" z="4113" y="92"> teleportToWP() </waypoint> <!-- # 30 --><waypoint x="3705" z="4119" y="72"> </waypoint> <!-- # 31 --><waypoint x="3703" z="4187" y="72"> </waypoint> <!-- # 32 --><waypoint x="3647" z="4208" y="34"> __WPL:setWaypointIndex(__WPL:findWaypointTag("commonstart")); </waypoint> <!-- # 33 --><waypoint x="3847" z="3347" y="34" tag="Sstart"> fly() player:target_NPC("Luke Xavi"); yrest(2000); sendMacro("ChoiceOption(3);"); yrest(2000); sendMacro("ChoiceOption(1);"); yrest(5000); teleportToWP() </waypoint> <!-- # 34 --><waypoint x="3848" z="3419" y="74"> </waypoint> <!-- # 35 --><waypoint x="3849" z="3467" y="74"> teleportToWP() </waypoint> <!-- # 36 --><waypoint x="3977" z="3498" y="74"> </waypoint> <!-- # 37 --><waypoint x="3979" z="3553" y="74"> </waypoint> <!-- # 38 --><waypoint x="4004" z="3574" y="74"> teleportToWP() </waypoint> <!-- # 39 --><waypoint x="4098" z="3754" y="92"> </waypoint> <!-- # 40 --><waypoint x="4068" z="3970" y="92"> </waypoint> <!-- # 41 --><waypoint x="4031" z="4038" y="92"> </waypoint> <!-- # 42 --><waypoint x="4085" z="4104" y="92"> </waypoint> <!-- # 43 --><waypoint x="4046" z="4176" y="92"> </waypoint> <!-- # 44 --><waypoint x="3736" z="4195" y="92"> </waypoint> <!-- # 45 --><waypoint x="3648" z="4209" y="34"> __WPL:setWaypointIndex(__WPL:findWaypointTag("commonstart")); </waypoint> <!-- # 46 --><waypoint x="4261" z="3592" y="34" tag="SEstart"> fly() player:target_NPC("Luke Xavi"); yrest(2000); sendMacro("ChoiceOption(3);"); yrest(2000); sendMacro("ChoiceOption(1);"); yrest(5000); teleportToWP() </waypoint> <!-- # 47 --><waypoint x="4210" z="3619" y="74"> </waypoint> <!-- # 48 --><waypoint x="4159" z="3648" y="74"> teleportToWP() </waypoint> <!-- # 49 --><waypoint x="4081" z="3589" y="92"> </waypoint> <!-- # 50 --><waypoint x="4017" z="3626" y="92"> </waypoint> <!-- # 51 --><waypoint x="4103" z="3767" y="92"> </waypoint> <!-- # 52 --><waypoint x="4076" z="3952" y="92"> </waypoint> <!-- # 53 --><waypoint x="4019" z="4043" y="92"> </waypoint> <!-- # 54 --><waypoint x="4103" z="4100" y="92"> </waypoint> <!-- # 55 --><waypoint x="4044" z="4170" y="92"> </waypoint> <!-- # 56 --><waypoint x="3762" z="4189" y="92"> </waypoint> <!-- # 57 --><waypoint x="3645" z="4208" y="34"> __WPL:setWaypointIndex(__WPL:findWaypointTag("commonstart")); </waypoint> <!-- # 58 --><waypoint x="3643" z="4215" y="34" tag="commonstart"> if gettotems == 1 then player:target_Object(114080, 6000); end teleportToWP() </waypoint> <!-- # 59 --><waypoint x="3704" z="4159" y="74"> </waypoint> <!-- # 60 --><waypoint x="3704" z="4122" y="74"> teleportToWP() </waypoint> <!-- # 61 --><waypoint x="3736" z="4118" y="92"> </waypoint> <!-- # 62 --><waypoint x="3830" z="4094" y="92"> getecandle() </waypoint> <!-- check/get candle --> <!-- # 63 --><waypoint x="3676" z="4124" y="92"> getecandle() </waypoint> <!-- actual coords --> <!-- # 64 --><waypoint x="3643" z="4057" y="92"> </waypoint> <!-- # 65 --><waypoint x="3595" z="4094" y="92"> teleportToWP() </waypoint> <!-- # 66 --><waypoint x="3609" z="4181" y="34"> teleportToWP() </waypoint> <!-- # 67 --><waypoint x="3610" z="4188" y="34"> if gettotems == 1 then player:target_Object(114080, 6000); end teleportToWP() </waypoint> <!-- # 68 --><waypoint x="3591" z="4093" y="92"> </waypoint> <!-- # 69 --><waypoint x="3686" z="4022" y="92"> </waypoint> <!-- # 70 --><waypoint x="3572" z="3929" y="92"> </waypoint> <!-- # 71 --><waypoint x="3506" z="3836" y="92"> getecandle() </waypoint> <!-- check/get candle --> <!-- # 72 --><waypoint x="3681" z="3549" y="92"> getecandle() </waypoint> <!-- # 72b --><waypoint x="3624" z="3666" y="92"> </waypoint> <!-- actual coords --> <!-- # 73 --><waypoint x="3827" z="3577" y="92"> getecandle() </waypoint> <!-- check/get candle --> <!-- # 74 --><waypoint x="3662" z="3621" y="92"> </waypoint> <!-- # 75 --><waypoint x="3584" z="3574" y="92"> </waypoint> <!-- # 76 --><waypoint x="3632" z="3493" y="92"> </waypoint> <!-- # 77 --><waypoint x="3948" z="3488" y="92"> teleportToWP() </waypoint> <!-- # 78 --><waypoint x="3981" z="3449" y="34"> if gettotems == 1 then player:target_Object(114080, 6000); end teleportToWP() </waypoint> <!-- # 79 --><waypoint x="3978" z="3499" y="74"> </waypoint> <!-- # 80 --><waypoint x="3979" z="3547" y="74"> </waypoint> <!-- # 81 --><waypoint x="3948" z="3559" y="92"> </waypoint> <!-- # 82 --><waypoint x="3840" z="3573" y="92"> getecandle() </waypoint> <!-- check/get candle --> <!-- # 83 --><waypoint x="4012" z="3551" y="92"> getecandle() </waypoint> <!-- check/get candle --> <!-- # 84 --><waypoint x="4036" z="3616" y="92"> </waypoint> <!-- # 84 b--><waypoint x="4087" z="3589" y="92"> </waypoint> <!-- # 85 --><waypoint x="4089" z="3585" y="92"> </waypoint> <!-- # 86 --><waypoint x="4102" z="3527" y="92"> teleportToWP() </waypoint> <!-- # 87 --><waypoint x="4110" z="3525" y="34"> if gettotems == 1 then player:target_Object(114080, 6000); end teleportToWP() </waypoint> <!-- # 88 --><waypoint x="4077" z="3588" y="92"> </waypoint> <!-- # 89 --><waypoint x="4031" z="3626" y="92"> </waypoint> <!-- # 90 --><waypoint x="4111" z="3805" y="92"> </waypoint> <!-- # 91 --><waypoint x="4169" z="3837" y="92"> getecandle() </waypoint> <!-- actual coords --> <!-- # 92 --><waypoint x="3984" z="4074" y="92"> </waypoint> <!-- # 93 --><waypoint x="4007" z="4128" y="92"> getecandle() </waypoint> <!-- check/get candle --> <!-- # 94 --><waypoint x="3873" z="4097" y="92"> getecandle() </waypoint> <!-- actual coords --> <!-- # 95 --><waypoint x="4070" z="3970" y="92"> </waypoint> <!-- # 96 --><waypoint x="4081" z="3821" y="92"> teleportToWP() </waypoint> <!-- # 97 --><waypoint x="4047" z="3813" y="75"> </waypoint> <!-- # 98 --><waypoint x="4013" z="3812" y="75"> teleportToWP() </waypoint> <!-- # 99 --><waypoint x="3972" z="3800" y="92"> </waypoint> <!-- #100 --><waypoint x="3835" z="3629" y="92"> getecandle() </waypoint> <!-- actual coords --> <!-- #101 --><waypoint x="3657" z="3728" y="92"> getecandle() </waypoint> <!-- check/get candle --> <!-- #102 --><waypoint x="3711" z="3897" y="92"> </waypoint> <!-- #103 --><waypoint x="3847" z="4029" y="92"> getecandle() </waypoint> <!-- actual coords --> <!-- #104 --><waypoint x="4021" z="3944" y="92"> teleportToWP() </waypoint> <!-- #105 --><waypoint x="4021" z="3944" y="34"> roomOpenA=player:findNearestNameOrId(113617); roomOpenB=player:findNearestNameOrId(113619); if roomOpenA==nil and roomOpenB==nil then getcandle();rest(10*1000) --10 seconds to wait untli guards disappear end flyoff(); </waypoint> <!-- check/get candle then wait 15 seconds --> <!-- #106 --><waypoint x="3964" z="3845" y="34"> </waypoint> <!-- #107 --><waypoint x="3911" z="3749" y="34"> </waypoint> <!-- #108 --><waypoint x="3751" z="3742" y="34"> </waypoint> <!-- #109 --><waypoint x="3714" z="3845" y="34"> </waypoint> <!-- #110 --><waypoint x="3780" z="3800" y="34"> if gettotems == 1 then player:target_Object(114080, 6000); end </waypoint> <!-- #111 --><waypoint x="3699" z="3802" y="34"> </waypoint> <!-- #112 --><waypoint x="3773" z="3945" y="34"> </waypoint> <!-- #113 --><waypoint x="3840" z="3945" y="34"> </waypoint> <!-- #114 --><waypoint x="3842" z="3838" y="49"> --=== Create table for material chests ===-- chests = {left = {}, right = {}} local objectList = CObjectList(); objectList:update(); local objSize = objectList:size() for i = 0,objSize do local obj = objectList:getObject(i); if obj.Id == 113617 then if obj.X > 3878 then -- left side table.insert(chests.left, table.copy(obj)) else -- right side table.insert(chests.right, table.copy(obj)) end end end -- Sort chests table.sort(chests.left, function(a,b) return b.Z > a.Z end) table.sort(chests.right, function(a,b) return a.Z > b.Z end) -- Get left side for k,v in pairs(chests.left) do player:target(v.Address); Attack() yrest(2000) Attack() yrest(2000) repeat yrest(2000) player:update() until not player.Casting end -- Get right side for k,v in pairs(chests.right) do player:target(v.Address); Attack() yrest(2000) Attack() yrest(2000) repeat yrest(2000) player:update() until not player.Casting end </waypoint> <!-- #115 --><waypoint x="3842" z="3838" y="49"> --=== Create table for rune and mount chests ===-- chests = {runes = {}, mount = {}} local objectList = CObjectList(); objectList:update(); local objSize = objectList:size() for i = 0,objSize do local obj = objectList:getObject(i); if obj.Id == 113618 or obj.Id == 113619 then if obj.Z > 3825 then -- mount table.insert(chests.mount, table.copy(obj)) else -- runes table.insert(chests.runes, table.copy(obj)) end end end -- Sort chests table.sort(chests.mount, function(a,b) return b.X > a.X end) table.sort(chests.runes, function(a,b) return a.X > b.X end) -- Get mount if getcmount == 1 then for k,v in pairs(chests.mount) do player:target(v.Address); Attack() yrest(2000) Attack() yrest(2000) repeat yrest(2000) player:update() until not player.Casting end end -- Get runes for k,v in pairs(chests.runes) do player:target(v.Address); Attack() yrest(2000) Attack() yrest(2000) repeat yrest(2000) player:update() until not player.Casting end </waypoint> <!-- #115 --><waypoint x="3842" z="3838" y="49"> if exitat == 1 then player:target_Object("Transport Candlestick"); RoMScript("StaticPopup_OnClick(StaticPopup1, 1);") waitForLoadingScreen(); checkRelog() else error("Bot finished", 0); end </waypoint> </waypoints>
Code: Select all
<?xml version="1.0" encoding="utf-8"?><waypoints type="TRAVEL"> <!-- # 1 --><waypoint x="-35786" z="5435" y="163"> player:mount("Horse"); </waypoint> <!-- # 2 --><waypoint x="-35720" z="5337" y="149"> </waypoint> <!-- # 3 --><waypoint x="-35778" z="5192" y="160"> </waypoint> <!-- # 4 --><waypoint x="-35857" z="5107" y="179"> </waypoint> <!-- # 5 --><waypoint x="-35940" z="5020" y="173"> </waypoint> <!-- # 6 --><waypoint x="-36068" z="4929" y="175"> </waypoint> <!-- # 7 --><waypoint x="-36335" z="4752" y="160"> </waypoint> <!-- # 8 --><waypoint x="-36419" z="4651" y="159"> </waypoint> <!-- # 9 --><waypoint x="-36457" z="4527" y="159"> </waypoint> <!-- # 10 --><waypoint x="-36455" z="4354" y="120"> </waypoint> <!-- # 11 --><waypoint x="-36430" z="4107" y="26"> </waypoint> <!-- # 12 --><waypoint x="-36603" z="4010" y="5"> </waypoint> <!-- # 13 --><waypoint x="-36772" z="3769" y="-3"> </waypoint> <!-- # 14 --><waypoint x="-36913" z="3530" y="-12"> </waypoint> <!-- # 15 --><waypoint x="-36989" z="3250" y="-38"> </waypoint> <!-- # 16 --><waypoint x="-37154" z="2896" y="-69"> </waypoint> <!-- # 17 --><waypoint x="-37349" z="2736" y="-51"> </waypoint> <!-- # 18 --><waypoint x="-37554" z="2534" y="-39"> </waypoint> <!-- # 19 --><waypoint x="-37713" z="2262" y="-26"> </waypoint> <!-- # 20 --><waypoint x="-37773" z="2061" y="-18"> </waypoint> <!-- # 21 --><waypoint x="-37986" z="1775" y="27"> </waypoint> <!-- # 22 --><waypoint x="-38219" z="1517" y="30"> </waypoint> <!-- # 23 --><waypoint x="-38441" z="1394" y="11"> </waypoint> <!-- # 24 --><waypoint x="-38653" z="1289" y="-12"> </waypoint> <!-- # 25 --><waypoint x="-38687" z="1504" y="6"> </waypoint> <!-- # 26 --><waypoint x="-38723" z="1542" y="15"> </waypoint> <!-- # 27 --><waypoint x="-38723" z="1542" y="15"> player:target_NPC(111256); sendMacro("ChoiceOption(3)"); waitForLoadingScreen(); </waypoint> <!-- # 28 --><waypoint x="-20462" z="6503" y="-174"> </waypoint> <!-- # 29 --><waypoint x="-20462" z="6503" y="-174"> player:target_NPC(111256); sendMacro("ChoiceOption(3)"); waitForLoadingScreen(); </waypoint> <!-- # 30 --><waypoint x="2295" z="1154" y="14"> </waypoint> <!-- # 31 --><waypoint x="2520" z="1068" y="50"> </waypoint> <!-- # 32 --><waypoint x="2759" z="970" y="69"> </waypoint> <!-- # 33 --><waypoint x="2759" z="970" y="69"> player:target_NPC(110755); sendMacro("ChoiceOption(2)"); waitForLoadingScreen(); </waypoint> <!-- # 11 --><waypoint x="4745" z="-1968" y="115"> </waypoint> <!-- # 12 --><waypoint x="4854" z="-1979" y="115"> </waypoint> <!-- # 13 --><waypoint x="4860" z="-1952" y="109"> loadPaths("cot_tele"); </waypoint> </waypoints>
this error after teleport outside mini treasure
The blue triangles are candle locations, the grey squares are totems. I'm pretty sure he missed 2 possible candle spawns. On the opposite wall of 3873, 4097 and the SW corner of the center ring.lisa wrote:So I am looking at something more like this then. I assumed the blue and grey dots were possible candles.
Users browsing this forum: No registered users and 3 guests