For changelogs and discussion related to a specific revision.
-
rock5
- Posts: 12173
- Joined: Tue Jan 05, 2010 3:30 am
- Location: Australia
#1
Post
by rock5 » Wed Apr 18, 2012 8:49 am
Added new features - KillZone and ExcludeZones.
New Functions:
- __WPL:setKillZone(_zone)
- Sets the area in which to target mobs. If mobs are outside this zone then they will not be targeted (aggroed mobs excluded). _zone is a table of X, Z coordinates or the name of a waypoint file created outlining the zone.
Examples:
Code: Select all
__WPL:setKillZone({{X=123,Z=2345},{X=432,Z=456},{X=64,Z=654},{X=432,Z=675},})
or
__WPL:setKillZone("room1zone")
__WPL:clearKillZone()
- Clears the kill zone so it goes back to targeting all mobs. Not: when changing waypoint file the kill zone will be cleared.
__WPL:addExcludeZone(_zone,_zonename)
- Adds an exclude zone. Any mob within this zone will be ignored (aggroed mobs excluded). You can have multiple exclude zones. If you specify a "_zonename" you are able to delete it individually later. "_zonename" is just a name to identify the zone.
__WPL:deleteExcludeZone(_zonename)
- If you specified a "_zonename" when adding the exclude zone then you are able to delete it individually.
__WPL:clearExcludeZones()
- Deletes all exclude zones.
PointInPoly(vertices, testx, testz )
- A separate but related function needed by the functions above. This function returns true if point testx,testz is within the polygon represented by vertices. vertices is a zone represented by a table of X, Z values or a waypoint file name, the same as the functions above.
Changed melee ranged pull - now it immediately moves into melee range if no usable skill is found
- No point in waiting for mobs to come to you if you didn't use any skills.
Changed WARRIOR_SURPRISE_ATTACK to be able to attack in combat in case a ranged attacker attacks you.
After all, there is no in-combat limitation to using this skill so why add one?
Added "ROGUE_UNKNOWN_CHOICE" to skills database.
- 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.”
-
BillDoorNZ
- Posts: 446
- Joined: Wed Aug 03, 2011 7:37 pm
#2
Post
by BillDoorNZ » Wed Apr 18, 2012 2:15 pm
nice
thx rock
Another suggestion for you. I was testing my KS script the other day and had the joy of watching the bot run my char off a wall
due to a mob dying right by the wall and drop a sigil. As a result I added a new LOOT option to player.lua:
Code: Select all
if (settings.profile.options.LOOT_SIGILS) then
local sigil = getNearestSigil();
--while( sigil ) do
if( sigil ) then
local dist = distance(self.X, self.Z, self.Y, sigil.X, sigil.Z, sigil.Y);
local angle = math.atan2(sigil.Z - self.Z, sigil.X - self.X);
local yangle = math.atan2(sigil.Y - self.Y, ((sigil.X - self.X)^2 + (sigil.Z - self.Z)^2)^.5 );
local nY = self.Y + math.sin(yangle) * (dist + 15);
local hypotenuse = (1 - math.sin(yangle)^2)^.5
local nX = self.X + math.cos(angle) * (dist + 15) * hypotenuse;
local nZ = self.Z + math.sin(angle) * (dist + 15) * hypotenuse;
self:moveTo( CWaypoint(nX, nZ, nY), true );
yrest(500);
self:update();
sigil = getNearestSigil();
end
end
so I can turn sigil looting on and off. Might be worth adding that permanent like
-
BillDoorNZ
- Posts: 446
- Joined: Wed Aug 03, 2011 7:37 pm
#3
Post
by BillDoorNZ » Wed Apr 18, 2012 2:35 pm
lastly, I notice in you example above you say:
Code: Select all
__WPL:setKillZone({{X=123,Z=2345},{X=432,Z=456},{X=64,Z=654},{X=432,Z=675},})
or
__WPL:setKillZone("room1zone")
There is an extra comma on the end of the first call, I'm assuming thats a typo?
-
rock5
- Posts: 12173
- Joined: Tue Jan 05, 2010 3:30 am
- Location: Australia
#4
Post
by rock5 » Wed Apr 18, 2012 2:45 pm
BillDoorNZ wrote:There is an extra comma on the end of the first call, I'm assuming thats a typo?
No, it was intentional but not necessary. Typically I would write a table like this
Code: Select all
{
{X=123,Z=2345},
{X=432,Z=456},
{X=64,Z=654},
{X=432,Z=675},
}
Adding the last comma just makes sure that you don't forget to add it if you add an extra line. It should work fine as it is.
- 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.”
-
BillDoorNZ
- Posts: 446
- Joined: Wed Aug 03, 2011 7:37 pm
#5
Post
by BillDoorNZ » Wed Apr 18, 2012 3:17 pm
ahh...nice...ya learn something every day
damn dynamic languages!!!
Who is online
Users browsing this forum: No registered users and 0 guests