target all mobs
target all mobs
guys i have a prob for target mobs in dod......is there a string i add for do this?how can i also add ID mobs and where?imaybe in on leave combat?i have this in mine ty
<onLeaveCombat><![CDATA[
-- Additional Lua code to execute after killing an enemy
local enemies = player:findEnemy(true, nil, evalTargetDefault, player.IgnoreTarget)
player:target(enemies);
player:update();
if not self.Battling or not self:findEnemy(true,nil,evalTargetDefault) then
self:lootAll()
end
]]></onLeaveCombat>
i ask because debuggin in rombot say me:
debug waypoint type run or travel(mine set run).we don't target mobs
and after when in dono player don't attack anything and boss too infact rombot say me"clearing target,loot skipped because of aggro"
HELP PLS
<onLeaveCombat><![CDATA[
-- Additional Lua code to execute after killing an enemy
local enemies = player:findEnemy(true, nil, evalTargetDefault, player.IgnoreTarget)
player:target(enemies);
player:update();
if not self.Battling or not self:findEnemy(true,nil,evalTargetDefault) then
self:lootAll()
end
]]></onLeaveCombat>
i ask because debuggin in rombot say me:
debug waypoint type run or travel(mine set run).we don't target mobs
and after when in dono player don't attack anything and boss too infact rombot say me"clearing target,loot skipped because of aggro"
HELP PLS
Re: target all mobs
You can add this to youre onload of youre waypont it has all important mobs in DoD you still to set target for bosses tho
or use the lisa's changing profile option, friend and mob userfunction (http://www.solarstrike.net/phpBB3/viewt ... mob#p37146)
and loads more of this if you want to add all mobs
Code: Select all
settings.profile.mobs = {
"Experimental Item No. 21",
"Incomplete Bloody Beast",
"Strange Cask",
"Rat for Experimentation",
}
Code: Select all
incBloodyBeastV1Norm = GetIdName(103793);
incBloodyBeastV2Norm = GetIdName(103794);
incBloodyBeastV1Easy = GetIdName(103879);
incBloodyBeastV2Easy = GetIdName(103880);
experimental21Norm = GetIdName(103795);
experimental21Easy = GetIdName(103881);
changeOptionFriendMob("mob", incBloodyBeastV1Norm, "Add") --experimental-item-no-21 normal mode
changeOptionFriendMob("mob", incBloodyBeastV1Easy, "Add") --experimental-item-no-21 easy mode
changeOptionFriendMob("mob", incBloodyBeastV2Norm, "Add") --experimental-item-no-21 normal mode
changeOptionFriendMob("mob", incBloodyBeastV2Easy, "Add") --experimental-item-no-21 easy mode
changeOptionFriendMob("mob", experimental21Norm, "Add") --experimental-item-no-21 normal mode
changeOptionFriendMob("mob", experimental21Easy, "Add") --experimental-item-no-21 easy mode
don't comment on my language im not english, just trying to make myself understood.
Re: target all mobs
but where precisally i can add incomplete bloody beast for target?i post you my waypoint ty
Re: target all mobs
i'm not any idea where add and how:):) example pls?
Re: target all mobs
ok i this is the onload section of the waypoint you uploaded i removed the name of you're player for safety and added the code you should add in just before the </onload> tag.
Code: Select all
<onLoad><![CDATA[
DOD_SOLO = true
DOD_PARTY_MEMBERS = {"REMOVED"}
if not DOD_SOLO then
SlashCommand("ILG on")
end
changeProfileOption("AUTO_ELITE_FACTOR",1000)
changeProfileOption("LOOT_IN_COMBAT",false)
if DOD_SOLO then
if player.Name == "REMOVED" then
joinname = "REMOVED"
elseif player.Name == "Char3" then
joinname = "Char4"
else
error("No party match!",0)
end
end
function autoInvite()
if DOD_SOLO then
while ( RoMScript("GetNumPartyMembers()") > 1 ) do
RoMScript("LeaveParty()")
yrest(2000)
end
for i = 1, 3 do
if( RoMScript("GetNumPartyMembers()") < 2 ) then
RoMScript("InviteByName('"..joinname.."')")
printf("Waiting for party join...\n")
end
yrest(2000)
if RoMScript("GetNumPartyMembers()") > 1 then
break
end
if i == 3 then
error("Party join failed!",0)
end
end
else
while RoMScript("GetNumPartyMembers()") > 1 do
SlashCommand("ILG destroy")
cprintf(cli.yellow,"ILG destroy\n")
yrest(2000)
end
SlashCommand("ILG inv")
cprintf(cli.yellow,"ILG inv\n")
yrest(2000)
if RoMScript("GetNumPartyMembers()") <= #DOD_PARTY_MEMBERS then
for i = 1, #DOD_PARTY_MEMBERS do
cprintf(cli.yellow,"Inviting "..DOD_PARTY_MEMBERS[i].."\n")
RoMScript("InviteByName('"..DOD_PARTY_MEMBERS[i].."')")
yrest(2000)
end
end
end
RoMScript("SetInstanceLevel('easy')")
end
function waitForParty()
repeat
local we_ready = true
player:update()
for i = 1, #DOD_PARTY_MEMBERS do
local _partymember = player:findNearestNameOrId(DOD_PARTY_MEMBERS[i])
if not _partymember or (_partymember and distance(player.X,player.Z,player.Y,_partymember.X,_partymember.Z,_partymember.Y) > 150) then
we_ready = false
cprintf(cli.lightred,"Waiting for "..DOD_PARTY_MEMBERS[i].."\n")
end
end
yrest(2000)
until we_ready
cprintf(cli.lightgreen,"Party is ready!\n")
end
function CountObjectsNearPoint(_nameorid, _point, inrange, printnames)
if type(_point) ~= "table" then _point = {player.X,player.Z,player.Y} end
local objectList = CObjectList();
local detected = {}
objectList:update()
for i = 0,objectList:size() do
local obj = objectList:getObject(i)
if obj ~= nil and (obj.Id == _nameorid or obj.Name == _nameorid) and obj.Address ~= player.Address and obj.Name ~= "<UNKNOWN>" and (inrange == nil or inrange >= distance(_point.X,_point.Z,_point.Y,obj.X,obj.Z,obj.Y) ) then
if printnames then
table.insert(detected,obj.Name)
end
end
end
if #detected > 0 then
cprintf(cli.yellow,"Objects in range:\n")
for i = 1, #detected do
cprintf(cli.pink,detected[i].."\t")
end
printf("\n")
end
return #detected
end
npcName = GetIdName(115536) -- Isaac Haden
function visitmerchant()
return true
end
mentos = 0
settings.profile.mobs = {
"Experimental Item No. 21",
"Incomplete Bloody Beast",
"Strange Cask",
"Rat for Experimentation",
}
]]></onLoad>
don't comment on my language im not english, just trying to make myself understood.
Re: target all mobs
i must added only character name right?all done?i try
Re: target all mobs
rombot say me there is an errors:
...script/rom/classes/waypointlist.lua:24 xml parse error
file:....this document(name)
line 118
column :10(idk how to see column when open xml)
pos:3641
message:not well-formed (invalid token)
can you help me pls?
...script/rom/classes/waypointlist.lua:24 xml parse error
file:....this document(name)
line 118
column :10(idk how to see column when open xml)
pos:3641
message:not well-formed (invalid token)
can you help me pls?
Re: target all mobs
You don't seem to understand the structure of n waypoint xml file. I'll give you a bit of a lesson.
A waypoint file is made up of a lot of xml open and close tags.
This is an example of an open tag
This is an example of a closed tag
Notice the difference?
The whole file should be enclosed in "waypoints" tags. So the file should start withand end with
Sometimes the open tag can have extra information, eg.
A waypoint file often has lots of waypoints. Each waypoint is made up of a start and end tag. This is a waypoint start tag.
and this is a waypoint end tag
The number at the start of the line is just a comment, eg.
Lua code always goes between tags, either between onload tags or waypoint tags.
So a very basic waypoint file that incluse an onload section should look like this
Hope that helps.
A waypoint file is made up of a lot of xml open and close tags.
This is an example of an open tag
Code: Select all
<onLoad>
Code: Select all
</onLoad>
The whole file should be enclosed in "waypoints" tags. So the file should start with
Code: Select all
<waypoints>
Code: Select all
</waypoints>
Code: Select all
<waypoints type="TRAVEL">
Code: Select all
<waypoint x="1662" z="-4970" y="760">
Code: Select all
</waypoint>
Code: Select all
<!-- # 2 -->
So a very basic waypoint file that incluse an onload section should look like this
Code: Select all
<waypoints>
<onLoad>
-- onload lua code
</onLoad>
<waypoint x="1111" z="2222" y="3333"> </waypoint>
<waypoint x="4444" z="5555" y="6666">
-- lua code you want to execute at this waypoint
</waypoint
</waypoints>
- Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
- I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
- How to: copy and paste in micromacro
________________________
Quote:- “They say hard work never hurt anybody, but I figure, why take the chance.”
- Ronald Reagan
Re: target all mobs
i understand but why my xml work if at the start there isn't open waypoint?example:
</waypoint>
<!-- # 2 --><waypoint x="1662" z="-4970" y="760"> </waypoint>
<!-- # 3 --><waypoint x="1660" z="-5072" y="760"> </waypoint>
<!-- # 4 --><waypoint x="1667" z="-5124" y="761" tag="entrance">
if not DOD_SOLO then waitForParty() end
__WPL:setForcedWaypointType("RUN")
autoInvite()
if not DOD_SOLO then sendPartyChat("enter") end
GoThroughPortal(200)
__WPL:setWaypointIndex(__WPL:getNearestWaypoint(player.X,player.Z,player.Y))
</waypoint>
and this work,maybe is not important when start?
so there are some problem for my profile i try and check all and i'm arrive at one conclusion:
if refresh micromacro(and i have vgreen on rom folder) and i use default my bot work(but not target mobs:incomplete bloody beast,and mallen) but die because come back from mallen much soon(maybe because i have a skill or rogue in profile say him attack melee)
i tested the right function of it because if i kill manually madman folder work and run for 5 second
i still don't understand why if i use default profile and character don't clear the trash(because not target)when him has in front of the boss rombot say me loot skipped because of aggro.
i add your strings for target mobs and boss but without success.....any idea?
<onLevelup><![CDATA[
-- Additional Lua code to execute after having a levelup
-- and levelup the skills for a new character (mage or priest recommended)
-- e.g. sendMacro("SetSpellPoint(_tabnr, _skillnr);"); would levelup a skill
]]></onLevelup>
<onSkillCast><![CDATA[
target = player:getTarget();
if target.Id == 103857 then
if sendMacro("madman.Time") >= 1 then
player:clearTarget();
printf("Running\n")
yrest(6000)
end
end
]]></onSkillCast>
<onHarvest><![CDATA[
-- Additional Lua code to execute directly before the actual harvesting takes place.
-- Note: arg1 contains the object to be harvested.
-- i.e. arg1.Name will be the name of the node you are about to harvest
-- If this snippet returns 'false', the node will *not* be harvested.
-- All other return values result in the player attempting to harvest the node.
-- Note that returning 'false' here breaks out of harvesting completely;
-- You will not attempt to harvest other nearby nodes instead.
]]></onHarvest>
<onUnstickFailure><![CDATA[
-- Lua code to execute when MAX_UNSTICK_TRIALS is reached.
]]></onUnstickFailure>
</profile>
</waypoint>
<!-- # 2 --><waypoint x="1662" z="-4970" y="760"> </waypoint>
<!-- # 3 --><waypoint x="1660" z="-5072" y="760"> </waypoint>
<!-- # 4 --><waypoint x="1667" z="-5124" y="761" tag="entrance">
if not DOD_SOLO then waitForParty() end
__WPL:setForcedWaypointType("RUN")
autoInvite()
if not DOD_SOLO then sendPartyChat("enter") end
GoThroughPortal(200)
__WPL:setWaypointIndex(__WPL:getNearestWaypoint(player.X,player.Z,player.Y))
</waypoint>
and this work,maybe is not important when start?
so there are some problem for my profile i try and check all and i'm arrive at one conclusion:
if refresh micromacro(and i have vgreen on rom folder) and i use default my bot work(but not target mobs:incomplete bloody beast,and mallen) but die because come back from mallen much soon(maybe because i have a skill or rogue in profile say him attack melee)
i tested the right function of it because if i kill manually madman folder work and run for 5 second
i still don't understand why if i use default profile and character don't clear the trash(because not target)when him has in front of the boss rombot say me loot skipped because of aggro.
i add your strings for target mobs and boss but without success.....any idea?
<onLevelup><![CDATA[
-- Additional Lua code to execute after having a levelup
-- and levelup the skills for a new character (mage or priest recommended)
-- e.g. sendMacro("SetSpellPoint(_tabnr, _skillnr);"); would levelup a skill
]]></onLevelup>
<onSkillCast><![CDATA[
target = player:getTarget();
if target.Id == 103857 then
if sendMacro("madman.Time") >= 1 then
player:clearTarget();
printf("Running\n")
yrest(6000)
end
end
]]></onSkillCast>
<onHarvest><![CDATA[
-- Additional Lua code to execute directly before the actual harvesting takes place.
-- Note: arg1 contains the object to be harvested.
-- i.e. arg1.Name will be the name of the node you are about to harvest
-- If this snippet returns 'false', the node will *not* be harvested.
-- All other return values result in the player attempting to harvest the node.
-- Note that returning 'false' here breaks out of harvesting completely;
-- You will not attempt to harvest other nearby nodes instead.
]]></onHarvest>
<onUnstickFailure><![CDATA[
-- Lua code to execute when MAX_UNSTICK_TRIALS is reached.
]]></onUnstickFailure>
</profile>
Who is online
Users browsing this forum: Bing [Bot] and 1 guest