harvest & co
harvest & co
iam serching for the function that wait at a harvest wp until he can use it... i want these for a daily and cant find that
can someone help ?
PS. sorry for my bad english
can someone help ?
PS. sorry for my bad english
Re: harvest & co
Can you be more specific?
Do you want to harvest mats, like wood. Or you want to harvest an item?
What's the daily name? So I might help out better.
Do you want to harvest mats, like wood. Or you want to harvest an item?
What's the daily name? So I might help out better.
Re: harvest & co
its an daily, where i must do 10 fires on... but not all the fires are "useable" in these time.... can i say that rombot wait at each fire until he can use it ?
i hope its better now ....
i hope its better now ....
Re: harvest & co
not really "more specific" (look to your pm)
but you could try to work with a loop.
but you could try to work with a loop.
- Bill D Cat
- Posts: 555
- Joined: Sat Aug 10, 2013 8:13 pm
- Location: Deep in the Heart of Texas
Re: harvest & co
Perhaps you are looking to do something like this. It scans for the item to use, and if it is found AND within a distance of 50 (melee) then it uses it. Otherwise it waits 5 seconds and scans again.
Code: Select all
local itemhere = false
repeat
item = player:findNearestNameOrId(xxxxxx) -- Whatever the Name or Id is for the item you want to use
if item and 50 > distance(item,player) then
player:target_Object(item.Id)
itemhere = true
else
yrest(5000)
end
until itemhere == true
Re: harvest & co
mh, that must i copy in each harvest wp in these lua ?
- Bill D Cat
- Posts: 555
- Joined: Sat Aug 10, 2013 8:13 pm
- Location: Deep in the Heart of Texas
Re: harvest & co
You could just make it a function in the <onload> section and just have a command to call that function in the appropriate waypoints.
Re: harvest & co
never done this before , i can try but maybe i need a bit help
- Bill D Cat
- Posts: 555
- Joined: Sat Aug 10, 2013 8:13 pm
- Location: Deep in the Heart of Texas
Re: harvest & co
You can use this as a function and place it before the first waypoint.
And then in each waypoint that needs it, just put "findMyItem()"
Code: Select all
<onload>
function findMyItem()
local itemhere = false
repeat
item = player:findNearestNameOrId(xxxxxx) -- Whatever the Name or Id is for the item you want to use
if item and 50 > distance(item,player) then
player:target_Object(item.Id)
itemhere = true
else
yrest(5000)
end
until itemhere == true
end
</onload>
Re: harvest & co
it dont work or i have a mistake in the script
Re: harvest & co
function findMyItem()
local itemhere = false
repeat
item = player:findNearestNameOrId(120431) -- Whatever the Name or Id is for the item you want to use
if item and 50 > distance(item,player) then
player:target_Object(120431)
itemhere = true
function checkDQCount()
local dailyQuestCount, dailyQuestsPerDay= RoMScript("Daily_count()")
cprintf(cli.lightblue,"%s quests completed.\n",tostring(dailyQuestCount));
if (dailyQuestCount == 10) then
cprintf(cli.lightblue,"Completed max number of daily quests, trying to log in next chara.\n");
SetCharList({
{account=20 , chars= {}},
{account=21 , chars= {}},
{account=22 , chars= {}},
{account=23 , chars= {}},
{account=24 , chars= {}},
{account=25 , chars= {}},
{account=26 , chars= {}},
{account=27 , chars= {}},
{account=28 , chars= {}},
{account=29 , chars= {}},
{account=30 , chars= {}},
})
LoginNextChar()
end
end
function relog()
SetCharList({
{account=20 , chars= {}},
{account=21 , chars= {}},
{account=22 , chars= {}},
{account=23 , chars= {}},
{account=24 , chars= {}},
{account=25 , chars= {}},
{account=26 , chars= {}},
{account=27 , chars= {}},
{account=28 , chars= {}},
{account=29 , chars= {}},
{account=30 , chars= {}},
})
if IsLastChar() then
player:logout();
else
LoginNextChar()
end
SetRestartClientSettings(7, "rom4u")
end
</onLoad>
<!-- # 1 --><waypoint x="4488" z="2165" y="1418">sendMacro("ChangeParallelID(1)");
player:target_NPC("xxxx");
player:target_NPC("xxxx");
CompleteQuestByName("xxxx");
checkDQCount()
AcceptQuestByName("xxxx");
</waypoint>
<!-- # 2 --><waypoint x="4491" z="2167" y="1419">
findMyItem()</waypoint>
<!-- # 3 --><waypoint x="4557" z="2198" y="1421"> </waypoint>
<!-- # 4 --><waypoint x="4557" z="2198" y="1421">
findMyItem()</waypoint>
<!-- # 5 --><waypoint x="4561" z="2080" y="1418"> </waypoint>
<!-- # 6 --><waypoint x="4561" z="2080" y="1418">
findMyItem()</waypoint>
<!-- # 7 --><waypoint x="4477" z="2049" y="1418"> </waypoint>
<!-- # 8 --><waypoint x="4477" z="2049" y="1418">
findMyItem()</waypoint>
<!-- # 9 --><waypoint x="4478" z="2089" y="1418"> </waypoint>
<!-- # 10 --><waypoint x="4478" z="2089" y="1418">
findMyItem()</waypoint>
<!-- # 11 --><waypoint x="4496" z="2179" y="1420"> </waypoint>
<!-- # 12 --><waypoint x="4496" z="2179" y="1420">
findMyItem()</waypoint>
<!-- # 13 --><waypoint x="4560" z="2199" y="1421"> </waypoint>
<!-- # 14 --><waypoint x="4560" z="2199" y="1421">
findMyItem()</waypoint>
<!-- # 15 --><waypoint x="4557" z="2076" y="1418"> </waypoint>
<!-- # 16 --><waypoint x="4557" z="2076" y="1418">
findMyItem()</waypoint>
<!-- # 17 --><waypoint x="4476" z="2044" y="1418"> </waypoint>
<!-- # 18 --><waypoint x="4476" z="2044" y="1418">
findMyItem()</waypoint>
<!-- # 19 --><waypoint x="4478" z="2090" y="1418"> </waypoint>
<!-- # 20 --><waypoint x="4478" z="2090" y="1418">
findMyItem()</waypoint>
<!-- # 21 --><waypoint x="4499" z="2164" y="1418"> </waypoint>
checkDQCount()
</waypoints>
maybe, someone can help, rombot says: line 98... mismatched tag
local itemhere = false
repeat
item = player:findNearestNameOrId(120431) -- Whatever the Name or Id is for the item you want to use
if item and 50 > distance(item,player) then
player:target_Object(120431)
itemhere = true
function checkDQCount()
local dailyQuestCount, dailyQuestsPerDay= RoMScript("Daily_count()")
cprintf(cli.lightblue,"%s quests completed.\n",tostring(dailyQuestCount));
if (dailyQuestCount == 10) then
cprintf(cli.lightblue,"Completed max number of daily quests, trying to log in next chara.\n");
SetCharList({
{account=20 , chars= {}},
{account=21 , chars= {}},
{account=22 , chars= {}},
{account=23 , chars= {}},
{account=24 , chars= {}},
{account=25 , chars= {}},
{account=26 , chars= {}},
{account=27 , chars= {}},
{account=28 , chars= {}},
{account=29 , chars= {}},
{account=30 , chars= {}},
})
LoginNextChar()
end
end
function relog()
SetCharList({
{account=20 , chars= {}},
{account=21 , chars= {}},
{account=22 , chars= {}},
{account=23 , chars= {}},
{account=24 , chars= {}},
{account=25 , chars= {}},
{account=26 , chars= {}},
{account=27 , chars= {}},
{account=28 , chars= {}},
{account=29 , chars= {}},
{account=30 , chars= {}},
})
if IsLastChar() then
player:logout();
else
LoginNextChar()
end
SetRestartClientSettings(7, "rom4u")
end
</onLoad>
<!-- # 1 --><waypoint x="4488" z="2165" y="1418">sendMacro("ChangeParallelID(1)");
player:target_NPC("xxxx");
player:target_NPC("xxxx");
CompleteQuestByName("xxxx");
checkDQCount()
AcceptQuestByName("xxxx");
</waypoint>
<!-- # 2 --><waypoint x="4491" z="2167" y="1419">
findMyItem()</waypoint>
<!-- # 3 --><waypoint x="4557" z="2198" y="1421"> </waypoint>
<!-- # 4 --><waypoint x="4557" z="2198" y="1421">
findMyItem()</waypoint>
<!-- # 5 --><waypoint x="4561" z="2080" y="1418"> </waypoint>
<!-- # 6 --><waypoint x="4561" z="2080" y="1418">
findMyItem()</waypoint>
<!-- # 7 --><waypoint x="4477" z="2049" y="1418"> </waypoint>
<!-- # 8 --><waypoint x="4477" z="2049" y="1418">
findMyItem()</waypoint>
<!-- # 9 --><waypoint x="4478" z="2089" y="1418"> </waypoint>
<!-- # 10 --><waypoint x="4478" z="2089" y="1418">
findMyItem()</waypoint>
<!-- # 11 --><waypoint x="4496" z="2179" y="1420"> </waypoint>
<!-- # 12 --><waypoint x="4496" z="2179" y="1420">
findMyItem()</waypoint>
<!-- # 13 --><waypoint x="4560" z="2199" y="1421"> </waypoint>
<!-- # 14 --><waypoint x="4560" z="2199" y="1421">
findMyItem()</waypoint>
<!-- # 15 --><waypoint x="4557" z="2076" y="1418"> </waypoint>
<!-- # 16 --><waypoint x="4557" z="2076" y="1418">
findMyItem()</waypoint>
<!-- # 17 --><waypoint x="4476" z="2044" y="1418"> </waypoint>
<!-- # 18 --><waypoint x="4476" z="2044" y="1418">
findMyItem()</waypoint>
<!-- # 19 --><waypoint x="4478" z="2090" y="1418"> </waypoint>
<!-- # 20 --><waypoint x="4478" z="2090" y="1418">
findMyItem()</waypoint>
<!-- # 21 --><waypoint x="4499" z="2164" y="1418"> </waypoint>
checkDQCount()
</waypoints>
maybe, someone can help, rombot says: line 98... mismatched tag
Re: harvest & co
Is that your whole WP?
I am can't see any tags right now. So I am not sure where the problems lies.
But you Code has only 94 lines
So either something is missing or you misread the error There is no line 98
I am can't see any tags right now. So I am not sure where the problems lies.
But you Code has only 94 lines
So either something is missing or you misread the error There is no line 98
Re: harvest & co
<?xml version="1.0" encoding="utf-8"?><waypoints>
<onLoad>
cprintf(cli.lightgreen,"\n xxx von xxxx\n")
function findMyItem()
local itemhere = false
repeat
item = player:findNearestNameOrId(120431) -- Whatever the Name or Id is for the item you want to use
if item and 50 > distance(item,player) then
player:target_Object(120431)
itemhere = true
function checkDQCount()
local dailyQuestCount, dailyQuestsPerDay= RoMScript("Daily_count()")
cprintf(cli.lightblue,"%s quests completed.\n",tostring(dailyQuestCount));
if (dailyQuestCount == 10) then
cprintf(cli.lightblue,"Completed max number of daily quests, trying to log in next chara.\n");
SetCharList({
{account=20 , chars= {}},
{account=21 , chars= {}},
{account=22 , chars= {}},
{account=23 , chars= {}},
{account=24 , chars= {}},
{account=25 , chars= {}},
{account=26 , chars= {}},
{account=27 , chars= {}},
{account=28 , chars= {}},
{account=29 , chars= {}},
{account=30 , chars= {}},
})
LoginNextChar()
end
end
function relog()
SetCharList({
{account=20 , chars= {}},
{account=21 , chars= {}},
{account=22 , chars= {}},
{account=23 , chars= {}},
{account=24 , chars= {}},
{account=25 , chars= {}},
{account=26 , chars= {}},
{account=27 , chars= {}},
{account=28 , chars= {}},
{account=29 , chars= {}},
{account=30 , chars= {}},
})
if IsLastChar() then
player:logout();
else
LoginNextChar()
end
SetRestartClientSettings(7, "rom4u")
end
</onLoad>
<!-- # 1 --><waypoint x="4488" z="2165" y="1418">sendMacro("ChangeParallelID(1)");
player:target_NPC("xxxx");
player:target_NPC("xxxx");
CompleteQuestByName("xxxx");
checkDQCount()
AcceptQuestByName("xxxx");
</waypoint>
<!-- # 2 --><waypoint x="4491" z="2167" y="1419">
findMyItem()</waypoint>
<!-- # 3 --><waypoint x="4557" z="2198" y="1421"> </waypoint>
<!-- # 4 --><waypoint x="4557" z="2198" y="1421">
findMyItem()</waypoint>
<!-- # 5 --><waypoint x="4561" z="2080" y="1418"> </waypoint>
<!-- # 6 --><waypoint x="4561" z="2080" y="1418">
findMyItem()</waypoint>
<!-- # 7 --><waypoint x="4477" z="2049" y="1418"> </waypoint>
<!-- # 8 --><waypoint x="4477" z="2049" y="1418">
findMyItem()</waypoint>
<!-- # 9 --><waypoint x="4478" z="2089" y="1418"> </waypoint>
<!-- # 10 --><waypoint x="4478" z="2089" y="1418">
findMyItem()</waypoint>
<!-- # 11 --><waypoint x="4496" z="2179" y="1420"> </waypoint>
<!-- # 12 --><waypoint x="4496" z="2179" y="1420">
findMyItem()</waypoint>
<!-- # 13 --><waypoint x="4560" z="2199" y="1421"> </waypoint>
<!-- # 14 --><waypoint x="4560" z="2199" y="1421">
findMyItem()</waypoint>
<!-- # 15 --><waypoint x="4557" z="2076" y="1418"> </waypoint>
<!-- # 16 --><waypoint x="4557" z="2076" y="1418">
findMyItem()</waypoint>
<!-- # 17 --><waypoint x="4476" z="2044" y="1418"> </waypoint>
<!-- # 18 --><waypoint x="4476" z="2044" y="1418">
findMyItem()</waypoint>
<!-- # 19 --><waypoint x="4478" z="2090" y="1418"> </waypoint>
<!-- # 20 --><waypoint x="4478" z="2090" y="1418">
findMyItem()</waypoint>
<!-- # 21 --><waypoint x="4499" z="2164" y="1418"> </waypoint>
checkDQCount()
</waypoints>
<onLoad>
cprintf(cli.lightgreen,"\n xxx von xxxx\n")
function findMyItem()
local itemhere = false
repeat
item = player:findNearestNameOrId(120431) -- Whatever the Name or Id is for the item you want to use
if item and 50 > distance(item,player) then
player:target_Object(120431)
itemhere = true
function checkDQCount()
local dailyQuestCount, dailyQuestsPerDay= RoMScript("Daily_count()")
cprintf(cli.lightblue,"%s quests completed.\n",tostring(dailyQuestCount));
if (dailyQuestCount == 10) then
cprintf(cli.lightblue,"Completed max number of daily quests, trying to log in next chara.\n");
SetCharList({
{account=20 , chars= {}},
{account=21 , chars= {}},
{account=22 , chars= {}},
{account=23 , chars= {}},
{account=24 , chars= {}},
{account=25 , chars= {}},
{account=26 , chars= {}},
{account=27 , chars= {}},
{account=28 , chars= {}},
{account=29 , chars= {}},
{account=30 , chars= {}},
})
LoginNextChar()
end
end
function relog()
SetCharList({
{account=20 , chars= {}},
{account=21 , chars= {}},
{account=22 , chars= {}},
{account=23 , chars= {}},
{account=24 , chars= {}},
{account=25 , chars= {}},
{account=26 , chars= {}},
{account=27 , chars= {}},
{account=28 , chars= {}},
{account=29 , chars= {}},
{account=30 , chars= {}},
})
if IsLastChar() then
player:logout();
else
LoginNextChar()
end
SetRestartClientSettings(7, "rom4u")
end
</onLoad>
<!-- # 1 --><waypoint x="4488" z="2165" y="1418">sendMacro("ChangeParallelID(1)");
player:target_NPC("xxxx");
player:target_NPC("xxxx");
CompleteQuestByName("xxxx");
checkDQCount()
AcceptQuestByName("xxxx");
</waypoint>
<!-- # 2 --><waypoint x="4491" z="2167" y="1419">
findMyItem()</waypoint>
<!-- # 3 --><waypoint x="4557" z="2198" y="1421"> </waypoint>
<!-- # 4 --><waypoint x="4557" z="2198" y="1421">
findMyItem()</waypoint>
<!-- # 5 --><waypoint x="4561" z="2080" y="1418"> </waypoint>
<!-- # 6 --><waypoint x="4561" z="2080" y="1418">
findMyItem()</waypoint>
<!-- # 7 --><waypoint x="4477" z="2049" y="1418"> </waypoint>
<!-- # 8 --><waypoint x="4477" z="2049" y="1418">
findMyItem()</waypoint>
<!-- # 9 --><waypoint x="4478" z="2089" y="1418"> </waypoint>
<!-- # 10 --><waypoint x="4478" z="2089" y="1418">
findMyItem()</waypoint>
<!-- # 11 --><waypoint x="4496" z="2179" y="1420"> </waypoint>
<!-- # 12 --><waypoint x="4496" z="2179" y="1420">
findMyItem()</waypoint>
<!-- # 13 --><waypoint x="4560" z="2199" y="1421"> </waypoint>
<!-- # 14 --><waypoint x="4560" z="2199" y="1421">
findMyItem()</waypoint>
<!-- # 15 --><waypoint x="4557" z="2076" y="1418"> </waypoint>
<!-- # 16 --><waypoint x="4557" z="2076" y="1418">
findMyItem()</waypoint>
<!-- # 17 --><waypoint x="4476" z="2044" y="1418"> </waypoint>
<!-- # 18 --><waypoint x="4476" z="2044" y="1418">
findMyItem()</waypoint>
<!-- # 19 --><waypoint x="4478" z="2090" y="1418"> </waypoint>
<!-- # 20 --><waypoint x="4478" z="2090" y="1418">
findMyItem()</waypoint>
<!-- # 21 --><waypoint x="4499" z="2164" y="1418"> </waypoint>
checkDQCount()
</waypoints>
Re: harvest & co
Line: 98
Column: 17
Pos: 3256
Message: mismatched tag
Column: 17
Pos: 3256
Message: mismatched tag
Re: harvest & co
now there is the whole wp and the error message
Re: harvest & co
change
than it should work.
into<!-- # 21 --><waypoint x="4499" z="2164" y="1418"> </waypoint>
checkDQCount()
Code: Select all
<!-- # 21 --><waypoint x="4499" z="2164" y="1418">
checkDQCount() </waypoint>
Re: harvest & co
scripts/rom/classes/waypointlist.lua:83: Fehler beim
kompilieren und ausfuhren des LUA codes. Fehler in dem onLoad Event in der Wegp
unkt Datei.
an other error message
kompilieren und ausfuhren des LUA codes. Fehler in dem onLoad Event in der Wegp
unkt Datei.
an other error message
Who is online
Users browsing this forum: No registered users and 55 guests