Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Guild Wars > GW Bots
You last visited: Today at 03:11

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Problem with function to scan enemies in certain distance

Discussion on Problem with function to scan enemies in certain distance within the GW Bots forum part of the Guild Wars category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: May 2018
Posts: 1
Received Thanks: 0
Problem with function to scan enemies in certain distance

Heya I've been working to improve the pongmei chestrun thats been posted here bunch of times. I've been trying to implement the function posted below(found in faction only dmoss farm afaik) to make skill casting bit more "intelligent". My problem is that it fails to count certain enemies or completely breaks. I tried this by printing number of foes every time function is executed. So far it for example checks enemies every 0.1s so I know when im entering agro or when I have melee distance foes hitting me.

What could cause this?

Thanks in advance




Func GetNumberOfFoesInRangeOfAgent($aAgent, $aRange)
Local $lAgent, $lDistance
Local $lCount = 0

If Not IsDllStruct($aAgent) Then $aAgent = GetAgentByID($aAgent)

For $i = 1 To GetMaxAgents()
$lAgent = GetAgentByID($i)
If BitAND(DllStructGetData($lAgent, 'typemap'), 262144) Then ContinueLoop
If DllStructGetData($lAgent, 'Type') <> 0xDB Then ContinueLoop
If DllStructGetData($lAgent, 'Allegiance') <> 3 Then ContinueLoop
If DllStructGetData($lAgent, 'HP') <= 0 Then ContinueLoop
If BitAND(DllStructGetData($lAgent, 'Effects'), 0x0010) > 0 Then ContinueLoop
$lDistance = GetDistance($lAgent)
If $lDistance > $aRange Then ContinueLoop
$lCount += 1
Next

Return $lCount
EndFunc


EDIT: Found this same function written more understandibly in vaettir script and got it working
hanneli is offline  
Reply


Similar Threads Similar Threads
how to award certain player certain items
01/14/2015 - EO PServer Hosting - 7 Replies
hi there, trying to figure out how to award items to certain players for donating and such. lets go with the newbiegift as example, how would i get it to a non pm player?
std::function of a function returning an std::function
11/11/2013 - C/C++ - 19 Replies
Nun muss ich nach langer Zeit auch mal wieder einen Thread erstellen, weil mir Google nicht mehr weiterhelfen kann. Ich verzweifle an Folgendem Vorhaben: #include <Windows.h> #include <string> #include <iostream> using namespace std;
Need FULL enemies and map enemies list !
06/29/2013 - Nostale - 4 Replies
Can someone upload the full enemies and map enemies list ? I'll be really grateful !:rolleyes:



All times are GMT +1. The time now is 03:13.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.