Page 1 of 1
Andor training
Posted: Tue May 14, 2013 3:59 pm
by newton666
Anyone have a working andor training scripte that swap accounts after it finishes?
Ive been trying to get this one to work but i give up and maybe you guys may have better luck :-
Code: Select all
<?xml version="1.0" encoding="utf-8"?><waypoints type="TRAVEL">
<onLoad>
--=== User Options ===--
When_Finished = "charlist"
-- "end" to end script, "relog" to log next character, "charlist" to log next in 'charlist' and "waypointfilename" to load that waypointfile.
CharList = {
{account=1, chars= {1}},
{account=2, chars= {1}},
{account=3, chars= {1}},
{account=4, chars= {1}},
{account=5, chars= {3}},
{account=6, chars= {3}},
{account=7, chars= {1}},
{account=9, chars= {2}},
{account=10, chars= {1}},
}
--====================--
local kate = GetIdName(121035) --Kate Wesker
local magelly = GetIdName(120687) --Magelly Basac
--== MINIGAME ==--
repeat
player:update()
if getZoneId() ~= 355 then
local empties = inventory:itemTotalCount(0)
if 5 > empties then
-- Wait for user to make some space in inventory.
cprintf(cli.yellow,"Not much space left in inventory. Are you sure you want to continue with only %d spaces left?\n",empties)
player:sleep()
end
if 30 > inventory:itemTotalCount(203038) then
print("Not enough Phirius Token Coins.")
logentry = "Not enough Phirius Token Coins."
-- checkRelog()
return
end
if player:target_NPC(kate) then
sendMacro("ChoiceOption(1);");
yrest(1000);
waitForLoadingScreen(10)
if getZoneId() ~= 360 then
print("Failed to teleport into Ancient Treasure. Maybe you already done it today.")
logentry = "Failed to teleport into Ancient Treasure. Maybe you already done it today."
end
-- checkRelog()
end
if player:target_NPC(magelly) then
yrest(2000);
sendMacro("ChoiceOption(2);"); --Make it 1 if you want Timed arena
yrest(2000);
sendMacro("ChoiceOption(1);");
yrest(2000);
sendMacro("ChoiceOption(1);");
yrest(12000);
-- checkRelog()
-- return
end
end
repeat
yrest(10)
until player:findNearestNameOrId(106881)
print("OK event has started")
repeat
tort()
player:update()
buffed = player:getBuff(622402)
yrest(10)
until buffed.Level >= 2800 or not player:hasBuff(622402)
print("Event finished, end score was "..buffed.Level)
error("Ending script")
until false
</onLoad>
</waypoints>
Re: Andor training
Posted: Tue May 14, 2013 5:54 pm
by lisa
bits to change are at the top
Code: Select all
SetCharList({
{account=5, chars= {}},
{account=6, chars= {}},
{account=7, chars= {}},
{account=8, chars= {}},
{account=9, chars= {}},
{account=10, chars= {}},
})
there are descriptions for the last 2 in the file.
Re: Andor training
Posted: Wed May 15, 2013 6:26 am
by newton666
i'm just using your ""andy1.xml" file and just changed the accouts .
and "local requiredscore = 2700. But how come the file will just fire a few fireballs at the start then just stops and does nothing?
Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<waypoints>
<onLoad>
unregisterTimer("GMdetection");
SetCharList({
{account=1, chars= {1}},
{account=2, chars= {1}},
{account=3, chars= {1}},
{account=4, chars= {1}},
{account=5, chars= {3}},
{account=6, chars= {3}},
{account=7, chars= {1}},
{account=9, chars= {2}},
{account=10, chars= {1}},
})
-- V 3.5
<![CDATA[
--=== user options ===--
-- it will stop once this score is reached, bonuses will be added afterwards though
-- so 2700 will probably be total score of 3100
local requiredscore = 2700
-- alter to your local language, caps sensative, in english is "Go!!!", so "Go" is enough
local goMessage = "Go"
if getZoneId() == 2 and 30 > inventory:itemTotalCount(203038) then
LoginNextChar()
loadProfile()
loadPaths(__WPL.FileName)
return
end
for k,v in pairs(settings.profile.skills) do
v.AutoUse = false
end
id_kate = 121035
id_magelly = 120687
-- Move to Kate Wesker and enter
if getZoneId() == 2 then
repeat
yrest(500)
until player:target_NPC(id_kate)
repeat
yrest(500)
until ChoiceOptionByName(getTEXT("SKWERL_MOBIUS_24"))
yrest(1000)
waitForLoadingScreen()
end
-- Move to Magelly Basac
repeat
yrest(500)
until player:target_NPC(id_magelly)
-- Check if we already completed
repeat
yrest(500)
until ChoiceOptionByName(getTEXT("SKWERL_MOBIUS_14"))
repeat
yrest(500)
until ChoiceOptionByName(getTEXT("SKWERL_MOBIUS_25"))
repeat
yrest(500)
until ChoiceOptionByName(getTEXT("SYS_OKAY"))
yrest(1000)
local round = 0
local score = 0
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()
for i = 0,objSize do
obj = objectList:getObject(i)
obj:update()
if (obj.Id == ID or ID == 106885) and checkclicked(obj.Address) then
player:target(obj)
RoMScript("UseExtraAction(1)")
yrest(10)
player:target(obj)
RoMScript("UseExtraAction(1)")
if ID == 106883 then
yrest(10)
player:target(obj)
RoMScript("UseExtraAction(1)")
end
yrest(100)
end
end
end
if player:findNearestNameOrId(106881,106882,106883,106884) then
--== monitor chat
EventMonitorStart("Tortevent", "SYSTEM_MESSAGE");
local time, moreToCome, name, msg, _go
repeat
time, moreToCome, name, msg = EventMonitorCheck("Tortevent",1)
yrest(10)
if name and string.find(name,goMessage) then
_go = true
end
until _go == true
EventMonitorStop("Tortevent")
round = round + 1
print("Wave: "..round..", Score: "..score)
yrest(1000)
one(106882)
yrest(1000)
one(106882)
one(106884)
one(106884)
one(106884)
end
end
repeat
yrest(100)
until player:findNearestNameOrId(106881)
print("OK event has started")
tort()
repeat yrest(1000) until not RoMScript("TimeKeeperFrame:IsVisible()")
yrest(15000)
logloot()
LoginNextChar()
loadProfile()
loadPaths(__WPL.FileName)
]]>
</onLoad>
</waypoints>
Re: Andor training
Posted: Wed May 15, 2013 8:51 am
by lisa
forum search got this, just work out what you want to use from each
http://www.solarstrike.net/phpBB3/viewt ... 730#p48730
Re: Andor training
Posted: Wed May 15, 2013 2:33 pm
by newton666
OMG you guys make it sound so easy and me tearing my hair out to get this to work. But still no joy. Can someone please edite my scripte so that it works and i can get some sleep
Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<waypoints>
<onLoad>
-- V 3.2
<![CDATA[
--=== user options ===--
SetCharList({
{account=3 , chars= {1}},
{account=5 , chars= {1}},
{account=6 , chars= {1}},
})
LoginNextChar()
loadprofile()
loadPaths(__WPL.FileName);
end
local function loadprofile()
-- Re-initialize player
player = CPlayer.new();
settings.load();
settings.loadProfile(convertProfileName(player.Name))
end
-- it will stop once this score is reached, bonuses will be added afterwards though
-- so 4700 will probably be total score of 3100
local requiredscore = 2700
-- alter to your local language, caps sensative, in english is "Go!!!", so "Go" is enough
local goMessage = "Go"
id_kate = 121035
id_magelly = 120687
-- Move to Kate Wesker and enter
if getZoneId() == 2 then
player:target_NPC(id_kate)
--ChoiceOptionByName("Transport to Andor Training Range");
--yrest(1000)
ChoiceOptionByName(getTEXT("SKWERL_MOBIUS_24"))
yrest(1000)
waitForLoadingScreen()
end
-- Move to Magelly Basac
player:target_NPC(id_magelly)
-- Check if we already completed
--ChoiceOptionByName("Register for timed training"); yrest(1000)
ChoiceOptionByName(getTEXT("SKWERL_MOBIUS_14")) yrest(1000)
--ChoiceOptionByName("Participate in training"); yrest(1000)
ChoiceOptionByName(getTEXT("SKWERL_MOBIUS_25")) yrest(1000)
--ChoiceOptionByName("Confirm"); yrest(1000)
ChoiceOptionByName(getTEXT("SYS_OKAY")) yrest(1000) --(might be wrong)
local round = 0
local score = 0
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()
for i = 0,objSize do
obj = objectList:getObject(i)
obj:update()
if (obj.Id == ID or ID == 106885) and checkclicked(obj.Address) then
player:target(obj)
RoMScript("UseExtraAction(1)")
yrest(10)
player:target(obj)
RoMScript("UseExtraAction(1)")
if ID == 106883 then
yrest(10)
player:target(obj)
RoMScript("UseExtraAction(1)")
end
yrest(100)
end
end
end
if player:findNearestNameOrId(106881,106882,106883,106884) then
--== monitor chat
EventMonitorStart("Tortevent", "SYSTEM_MESSAGE");
local time, moreToCome, name, msg, _go
repeat
time, moreToCome, name, msg = EventMonitorCheck("Tortevent",1)
yrest(10)
if name and string.find(name,goMessage) then
_go = true
end
until _go == true
EventMonitorStop("Tortevent")
round = round + 1
print("Wave: "..round..", Score: "..score)
repeat
one(106882)
one(106882)
one(106881)
one(106883)
one(106884)
until not player:findNearestNameOrId(106881,106882,106883,106884)
end
end
repeat
yrest(100)
until player:findNearestNameOrId(106881)
print("OK event has started")
repeat
tort()
player:update()
yrest(100)
buffed = player:getBuff(622402)
if buffed then score = buffed.Level end
until not player:hasBuff(622402) or ( buffed and buffed.Level > requiredscore )
error("Event finished, end score was "..score)
]]>
</onLoad>
</waypoints>
Re: Andor training
Posted: Wed May 15, 2013 8:03 pm
by lisa
Just so u know the score means nothing when it comes to the loot you receive, been running that exact same file I posted which literally scores 40-60 points and I regularly get 3 reward.
Re: Andor training
Posted: Thu May 16, 2013 1:39 am
by newton666
Thank for helping lisa but its still not logging out and changing to new acccounts or characters. instead i get attempt to call globe"logloot"<a Nil value" when finished?
do i need to download a function called "logloot"?
Re: Andor training
Posted: Thu May 16, 2013 2:12 am
by lisa
I did a forum search for "logloot"
guess what it gave the link to the userfunction
http://www.solarstrike.net/phpBB3/viewt ... oot#p48909
You can just comment out the logloot() in the WP using --
so it would look like
Re: Andor training
Posted: Thu May 16, 2013 1:36 pm
by newton666
thankyou , thankyou lisa it works great !!!
I've got 1 more favour if its not too much of a trouble.
All i want this to do is exit and change account and character when it reaches waypoint 5. keep getting errors:-
Code: Select all
<?xml version="1.0" encoding="utf-8"?><waypoints type="TRAVEL">
<onLoad>
SetCharList({
{account=1, chars= {1}},
{account=2, chars= {1}},
{account=3, chars= {1}},
{account=4, chars= {1}},
{account=5, chars= {3}},
{account=6, chars= {3}},
{account=7, chars= {1}},
{account=9, chars= {2}},
{account=10, chars= {1}},
})
LoginNextChar()
loadProfile()
loadPaths("__WPL.FileName");
end
</onLoad>
<!-- # 1 --><waypoint x="-626" z="-5927" y="25"> </waypoint>
<!-- # 2 --><waypoint x="-613" z="-5837" y="23"> player:target_NPC("Logar Bulletin Board");
</waypoint>
<!-- # 3 --><waypoint x="-621" z="-5903" y="25"> </waypoint>
<!-- # 4 --><waypoint x="-631" z="-5992" y="26"> player:target_NPC("Dell");
<!-- # 5 --><waypoint x="-631" z="-5992" y="26"> </waypoint>
LoginNextChar()
loadProfile()
loadPaths("__WPL.FileName");
</waypoints>
Thank again .
Re: Andor training
Posted: Thu May 16, 2013 1:57 pm
by rock5
Firstly, like I said before,
__WPL.FileName is a variable, not a string. You should learn to tell the difference. So it should be
loadPaths(__WPL.FileName);.
With the above fix, waypoint 5 should work, but you have a mistake in the onload. It looks like you tried to create the "relog" function but you missed the first line
So you have 2 choices to fix it.
1. Finish creating the relog function in the onload by adding
function relog() like your other script and use relog() at waypoint 5.
or
2. Leave waypoint 5 as it is and change the onload to only set the character list.
Code: Select all
<onLoad>
SetCharList({
{account=1, chars= {1}},
{account=2, chars= {1}},
{account=3, chars= {1}},
{account=4, chars= {1}},
{account=5, chars= {3}},
{account=6, chars= {3}},
{account=7, chars= {1}},
{account=9, chars= {2}},
{account=10, chars= {1}},
})
</onLoad>
Re: Andor training
Posted: Thu May 16, 2013 11:50 pm
by kenzu38
Also, in that latest code you posted, you have a missing and a misplaced closing tag. Do take care where you put those </waypoint> .