Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Guild Wars > GW Bots
You last visited: Today at 02:36

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

Advertisement



how to script resigning when a NPC is present in zone

Discussion on how to script resigning when a NPC is present in zone within the GW Bots forum part of the Guild Wars category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Nov 2015
Posts: 18
Received Thanks: 4
how to script resigning when a NPC is present in zone

Hi all - I've been tinkering with old peacekeeper farming bots and have had some success running them outside of Beetletun.

I recently completed War in Kryta, and with that sometimes Courier Falken appears when zoning into Nebo Terrace. Because his presence changes the spawn pattern, the bot fails the run, and takes a while because it needs to go through a resurrection sequence.

What I'd like to do is add something to the bot script that looks to see if Falken is present maybe 10 seconds after loading into the zone and if he is, resign to restart the loop.

Is there anywhere this code already exists that I could crib from for this purpose or can someone help me understand what functions I could possibly use?

Thanks!
timtimcharoo is offline  
Old 04/12/2023, 09:16   #2
 
elite*gold: 0
Join Date: Apr 2023
Posts: 1
Received Thanks: 1
Hey there! It's great to hear that you've been tinkering with the old peacekeeper farming bots and having some success with them.

Regarding your question, it sounds like you're experiencing some difficulties with Courier Falken appearing when zoning into Nebo Terrace, which is causing the bot to fail its run. It's understandable that this can be frustrating, but I'm happy to help you figure out a solution.

As for adding something to the bot script that looks for Falken's presence, there may be existing code out there that you could use, but I'm not entirely sure. However, one possible solution could be to create a function that checks for Falken's presence using a command like "/target Courier Falken" and then waits for 10 seconds to see if he appears. If he does, the bot can then use the "/resign" command to restart the loop.

On a related note, since you've been doing well with the farming bots, have you considered them to other players who may be interested in using them? It could be a nice gesture and a way to contribute to the community. Let me know if you have any questions or if there's anything else I can help you with.
nax_gt is offline  
Thanks
1 User
Old 04/18/2023, 17:23   #3
 
elite*gold: 0
Join Date: Nov 2015
Posts: 18
Received Thanks: 4
Quote:
Originally Posted by nax_gt View Post
Let me know if you have any questions or if there's anything else I can help you with.
I just shot you a DM with a question. I'm almost there, but need an assist.
timtimcharoo is offline  
Old 04/19/2023, 17:35   #4
 
elite*gold: 0
Join Date: Nov 2015
Posts: 18
Received Thanks: 4
thought I'd post this question to the masses as well to see if I could get any additional help.

after playing around with scripting, I thought it might make sense to create a function explicitly for checking for Falken. To do that I used this script:

Code:
Func Falken()
    TargetNearestAlly()
	 if  GetNumberOfAlliesInRangeOfAgent(-2,1250) > 0 Then
		Out("Falken Punch!!!")
	    $NoSpawn = $NoSpawn + 1
		GUICtrlSetData($NoSpawnLabel, $NoSpawn)

		Resign()
        Sleep(3000)
		Do
		   Sleep(50)
	    Until GetIsDead(-2) = True

		ReturnToOutpost()
		WaitMapLoading($Beetletun)
	 Else
		$bCanContinue = True
	 EndIf
EndFunc
the good news is that the function works at detecting Falken and resigning. the problem is that I don't think I know the proper way to implement it. I tried just injecting it into the MainFarm() function in the script. The problem is that when it resigns due to Falken, it then wants to go ahead and continue the rest of the function and starts moving around in Beetletun instead of exiting out to restart the MainFarm() loop. I'm clearly missing some if-then statement that would kill the MainFarm() function and start again, but I'm not sure what.

here's how I just slapped it into the MainFarm() code:

Code:
Func MainFarm()
     Local $lTimer, $lTime
	 Local $lDeadlock

	 Local $lDebug, $lDebugTime

     Sleep(1000)
	 Move(22500, -11700)
	 WaitMapLoading($NeboTerrace)

     $lTimer = TimerInit()
	 Out("Begin run #" & $Runs)

Falken()

	 MoveTo(-10998, 18328)
	 MoveTo(-8005, 17962)
	 UseSkillEx($DE, -2)
	 MoveTo(-3618, 17264)
	 MoveTo(-1077, 16959)

	 Out("Checking Spawn...")

	 TargetNearestAlly()
	 if  GetNumberOfAlliesInRangeOfAgent(-2,1250) > 4 Then
		$bCanContinue = True
	 Else
		$bCanContinue = False
	 EndIf

     If $bCanContinue = True Then
	    Out("Found spawn")
        Out("Waiting for text")
		Sleep(35000)

		Out("Pre buff")
		UseSkillEx($SOD, -2)

	  $lDeadlock = TimerInit()
		Do
		   Sleep(50)
	    Until GetNumberOfFoesInRangeOfAgent(-2, 1250) > 0 Or TimerDiff($lDeadlock) > 50000

		UseSkillEx($IAU, -2)
		UseSkillEx($EBSOH, -2)
		Fight()

		If $bCanContinue = True Then PickUpLoot()
        If $bCanContinue = True Then $EnemiesKilled = $EnemiesKilled + 7
	    Resign()
        Sleep(3000)
	    Do
		   Sleep(200)
        Until GetIsDead(-2) = True

	    ReturnToOutpost()
	    WaitMapLoading($Beetletun)

     Else
	    Out("No spawn, restarting")
	    $NoSpawn = $NoSpawn + 1
		GUICtrlSetData($NoSpawnLabel, $NoSpawn)

		Resign()
        Sleep(3000)
		Do
		   Sleep(50)
	    Until GetIsDead(-2) = True

		ReturnToOutpost()
		WaitMapLoading($Beetletun)

	 EndIf

	    $Runs = $Runs + 1
		GUICtrlSetData($RunsLabel, $Runs)
        Out("Run finished")
	    Sleep(200)

	    Sleep(200)
	 EndFunc
so if anyone can help me understand how I messed this up, I'll work on tweaking it and releasing an updated version.
timtimcharoo is offline  
Old 05/01/2023, 22:15   #5
 
solos's Avatar
 
elite*gold: 0
Join Date: Dec 2007
Posts: 324
Received Thanks: 85
as with my tired eyes, it looks like there is no global $bcancontinue and you use different $bcancontinue variables in the 2 different functions without willing to do so. try to add "global $bcancontinue" at the most top might solve the issue, just thinking .. without any testing of myself, just being on my phone.

or just pass the variable as return.
you can use return true or return false inside the falken function.
and check using "if falken() then. .. else .. "
the long term would be " if falken() =1 then ... else ..."
solos is offline  
Reply


Similar Threads Similar Threads
Resigning
05/25/2010 - Eudemons Online - 0 Replies
Just letting everyone know I´m no longer part of any eo development. I had enough of all the BS and all the backstabbing. For those who has me on msn or yahoo I´ll talk to yalls there. Thank you everyone for helping me become what I am. I wanna give my most thanks to forcer, DeadPool, funhacker and soulerman. I now know alot more because of you guys. Take care everyone and try not to fight too much xD Bai from the GummyBear. ;)



All times are GMT +1. The time now is 02:36.


Powered by vBulletin®
Copyright ©2000 - 2025, 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 ©2025 elitepvpers All Rights Reserved.