Code: Select all
buffed = player:getBuff(622402)Code: Select all
nameurvarsbettertoavoidnameclashes = player:getBuff(622402)Code: Select all
local buffed = player:getBuff(622402)Code: Select all
buffed = player:getBuff(622402)Code: Select all
nameurvarsbettertoavoidnameclashes = player:getBuff(622402)Code: Select all
local buffed = player:getBuff(622402)So you missed this post?Cindy wrote:Fixed another bug
lisa wrote:try
if rombot can't find the buff it returns it as false, so buffed would be falseCode: Select all
repeat tort() player:update() buffed = player:getBuff(622402) yrest(100) until (not RoMScript("TimeKeeperFrame:IsVisible()")) or (buffed and buffed.Level >= 3400)
all you have to do is check it first.Cindy wrote:ah that sucks.. so when its false, its essentially nil?
Code: Select all
(buffed and buffed.Level >= 3400)
Code: Select all
<?xml version="1.0" encoding="utf-8"?><waypoints type="TRAVEL">
<onLoad>
--=== User Options ===--
When_Finished = "end"
-- "end" to end script, "relog" to log next character, "charlist" to log next in 'charlist' and "waypointfilename" to load that waypointfile.
CharList = {
}
-- Character list to use when using the "charlist" option above. Requires my "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}},
-- }
--====================--
tortoiseID = 106881;
newtID = 106882;
armoredbugID = 106883;
rabbitID = 106884;
ammunitionturtleID = 106885;
function tort()
local proc = getProc()
local function checkclicked(address)
local tmp = memoryReadRepeat("int", proc, address + addresses.pawnAttackable_offset) or 0;
if bitAnd(tmp,0x8) then
return true
else
return false
end
end
local function one(ID)
print("targeting: "..ID)
local objectList = CObjectList();
objectList:update();
local objSize = objectList:size()
--printf("List size:"..objSize.."\n")
for i = 0,objSize do
--printf("List size:"..objSize)
obj = objectList:getObject(i)
obj:update()
if (obj.Id ~= 0 and obj.Type ~= -1) then
if (obj.Id == ID or ID == 106885) and checkclicked(obj.Address) then
player:target(obj)
yrest(10)
RoMScript("UseExtraAction(1)")
yrest(10)
player:target(obj)
yrest(10)
RoMScript("UseExtraAction(1)")
if ID == 106883 then
yrest(10)
player:target(obj)
yrest(10)
RoMScript("UseExtraAction(1)")
end
yrest(10)
end
end
end
end
if player:findNearestNameOrId(tortoiseID) then
local countt = 12
print("resting a little before attacking, countdown starts now.")
repeat
print(countt)
yrest(1000)
countt = countt -1
until countt == 0
for i = 1,6 do
one(ammunitionturtleID)
one(newtID)
one(tortoiseID)
one(armoredbugID)
one(rabbitID)
end
end
end
</onLoad>
<!-- # 1 --><waypoint x="4935" z="-1936" y="109">
player:target_NPC("Kate Wesker");
sendMacro("ChoiceOption(2);"); -- turn in certificates
yrest(2000);
player:target_NPC("Kate Wesker");
yrest(1000);
sendMacro("ChoiceOption(1);");
waitForLoadingScreen();
player:target_NPC("Magelly Basac");
yrest(1000);
sendMacro("ChoiceOption(1);");
yrest(1000);
sendMacro("ChoiceOption(1);");
yrest(1000);
sendMacro("ChoiceOption(1);");
yrest(14000);
</waypoint>
<!-- # 2 --><waypoint x="53" z="411" y="963">
local lvl = 0;
repeat
tort()
printf("Updating...\n")
player:update()
local buffed = player:getBuff(622402)
if (buffed) then
lvl = buffed.Level
end
yrest(250)
until (not RoMScript("TimeKeeperFrame:IsVisible()")) or (lvl > 3234)
print("Event finished, end score was "..lvl)
</waypoint>
<!-- # 3 --><waypoint x="-48" z="337" y="961">
player:target_NPC("Magelly Basac");
sendMacro("ChoiceOption(1);");
yrest(1000);
sendMacro("ClickRequestDialogButton(0)");
waitForLoadingScreen(15);
</waypoint>
<!-- # 4 --><waypoint x="4935" z="-1936" y="109">
player:target_NPC("Kate Wesker");
sendMacro("ChoiceOption(2);");
</waypoint>
</waypoints>
I'm still crashing.Cindy wrote:Ok I think I have that (the obj update), here is what I use
Code: Select all
sendMacro("CloseWindows()")