Register for your free account! | Forgot your password?

You last visited: Today at 04:49

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

Advertisement



Randomization

Discussion on Randomization within the GW Exploits, Hacks, Bots, Tools & Macros forum part of the Guild Wars category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Mar 2020
Posts: 35
Received Thanks: 12
Question Randomization

hi all

i'm trying to work on my own scripts

can anyone help me with how to randomize paths? i am not sure where to begin. i have seen people using dice rolls for changing districts, could this apply to choosing one path vs another?

is there a way to make the path always differ by a few points each time?

thanks for all and any advice/help
ooklaba is offline  
Old 05/17/2020, 00:25   #2
 
elite*gold: 0
Join Date: Jul 2019
Posts: 103
Received Thanks: 83
If you are using GWA2 the MoveTo function by default adds a random offset of + or -50 to the x and y coordinates when moving. This makes them relatively unique while being pretty accurate to a path.

A very common tactic for more random like pathing is to take a bots movement route and break it into subsections and then make multiple variations on each sub system. So when the pathing enters each one it generates a random number to select that sub path in a switch statement.

You can go much crazier to randomize pathing than that but its generally more than enough.
list comprehension is offline  
Old 05/17/2020, 05:12   #3
 
phat34's Avatar
 
elite*gold: 0
Join Date: Sep 2014
Posts: 354
Received Thanks: 120
Good points... Other options are possible of course...

If the map has a big open pattern you can even use the moveto with a random element at the end such as ….

Moveto( X, Y, Random( 0 , 300, 50)) this will greatly increase the randomness of the destination coordinate between 0, 50, 100, 150, 200, 250, or 300...

I think you might be looking for a way to deal with forks in the maps and have a random run of a map in this case you can either use a for next loop method or you can use the
Random(1, 4, 1) presented in an earlier message with if or case statements to determine the set of waypoints that will be run based on your number....
for it to work in a for next loop you would still have to use a random number generation statement to decide if this is the fork you would choose with an exitloop statement to leave the for next loop...
phat34 is offline  
Old 05/17/2020, 11:14   #4
 
elite*gold: 0
Join Date: Apr 2018
Posts: 38
Received Thanks: 4
A long time ago I wrote this (it was used for exiting outposts)

Code:
; This func creates a random path for exiting outposts. It needs the coords of a spot
; in front of the exit-portal and the coords of a spot outside the portal for exiting.
; You may need to play around with the $aRandom to see which number fits you best.
Func RandomPath($PortalPosX, $PortalPosY, $OutPosX, $OutPosY, $aRandom = 50, $StopsMin = 1, $StopsMax = 5, $NumberOfStops = -1) ; do not change $NumberOfStops

	If $NumberOfStops = -1 Then $NumberOfStops = Random($StopsMin, $StopsMax, 1)

	Local $lAgent = GetAgentByID(-2)
	Local $MyPosX = DllStructGetData($lAgent, 'X')
	Local $MyPosY = DllStructGetData($lAgent, 'Y')
	Local $Distance = ComputeDistance($MyPosX, $MyPosY, $PortalPosX, $PortalPosY)

	If $NumberOfStops = 0 Or $Distance < 200 Then
		MoveTo($PortalPosX, $PortalPosY, (2 * $aRandom)) ; Made this last spot a bit broader
		Move($OutPosX + Random(-$aRandom, $aRandom, 1), $OutPosY + Random(-$aRandom, $aRandom, 1))
	Else
		Local $m = Random(0, 1)
		Local $n = $NumberOfStops - $m
		Local $StepX = (($m * $PortalPosX) + ($n * $MyPosX)) / ($m + $n)
		Local $StepY = (($m * $PortalPosY) + ($n * $MyPosY)) / ($m + $n)

		MoveTo($StepX, $StepY, $aRandom)
		RandomPath($PortalPosX, $PortalPosY, $OutPosX, $OutPosY,  $aRandom, $StopsMin, $StopsMax, $NumberOfStops - 1)
	EndIf
EndFunc
JohnyDee is offline  
Old 05/17/2020, 15:21   #5
 
elite*gold: 0
Join Date: Feb 2014
Posts: 181
Received Thanks: 337
I have used a few methods in the past to randomize my paths. When opening up your path with a modified MoveTo() you just really need to make sure that there is nothing nearby that you can get stuck on and so for that reason I just use pre-scripted coords with perhaps a minimum +50 randomness to the path or whats some call the "Dice Roll". Below is an example of 20 random paths that I created and then I extended the MoveTo from +50 up to +100.

Code:
Func MoveRandom()
   Out("Random Movement")
   Switch (Random(1, 20, 1))    ;<<<<<<<<<<<<<<<<<<<<<<<< NOTICE:  MAKE SURE TO CHANGE THIS TO THE NUMBER OF RANDOM PATHS >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>.
   Case 1
	     Out("Random Move-1")
		 MoveTo(-3921, 17481, 100)
	  Case 2
		 Out("Random Move-2")
		 MoveTo(-3872, 17407, 100)
	  Case 3
		 Out("Random Move-3")
		 MoveTo(-4030, 17267, 100)
	  Case 4
		 Out("Random Move-4")
		 MoveTo(-4318, 17257, 100)
	  Case 5
		 Out("Random Move-5")
		 MoveTo(-4517, 17140, 100)
		 MoveTo(-3298, 17703, 100)
	  Case 6
		 Out("Random Move-6")
		 MoveTo(-3604, 17680, 100)
	  Case 7
		 Out("Random Move-7")
		 MoveTo(-3110, 17908, 100)
	  Case 8
		 Out("Random Move-8")
		 MoveTo(-3041, 18051, 100)
	  Case 9
		 Out("Random Move-9")
		 MoveTo(-2958, 18041, 100)
	  Case 10
	     Out("Random Move-10")
		 MoveTo(-3349, 17643, 100)
	  Case 11
	     Out("Random Move-11")
		 MoveTo(-4217, 16914, 100)
	  Case 12
		 Out("Random Move-12")
		 MoveTo(-4210, 17072, 100)
		 MoveTo(-3729, 17264, 100)
	  Case 13
	     Out("Random Move-13")
		 MoveTo(-4776, 17714, 100)
		 MoveTo(-2989, 18115, 100)
	  Case 14
	     Out("Random Move-14")
		 MoveTo(-4207, 17233, 100)
		 Sleep(GetPing()+250)
		 MoveTo(-3316, 17795, 100)
	  Case 15
	     Out("Random Move-15")
		 MoveTo(-5347, 18281, 100)
		 Sleep(GetPing()+350)
		 MoveTo(-4764, 18646, 100)
		 Sleep(GetPing()+350)
		 MoveTo(-3655, 17592, 100)
		 MoveTo(-3050, 17958, 100)
	  Case 16
	     Out("Random Move-16")
		 MoveTo(-3724, 17171, 100)
		 Sleep(GetPing()+350)
	  Case 17
	     Out("Random Move-17")
		 MoveTo(-5063, 19388, 100)
		 Sleep(GetPing()+5550)
		 MoveTo(-3902, 17738, 100)
		 Sleep(GetPing()+350)
		 MoveTo(-3757, 17694, 100)
		 MoveTo(-3614, 17697, 100)
		 MoveTo(-3614, 17697, 100)
		 MoveTo(-3400, 17779, 100)
	  Case 18
	     Out("Random Move-18")
		 MoveTo(-4667, 17195, 100)
		 MoveTo(-4667, 17195, 100)
		 MoveTo(-3935, 17277, 100)
	  Case 19
	     Out("Random Move-19")
		 MoveTo(-4110, 17172, 100)
		 ReverseDirection()
		 Sleep(GetPing()+1550)
		 ReverseDirection()
		 Sleep(GetPing()+1550)
		 MoveTo(-3471, 17634, 100)
	  Case 20
	     Out("Random Move-20")
		 MoveTo(-4601, 17762, 100)
		 Sleep(GetPing()+1550)
		 ReverseDirection()
		 Sleep(GetPing+1550)
		 ReverseDirection()
		 MoveTo(-4196, 17809, 100)
		 MoveTo(-3476, 17772, 100)
	EndSwitch
EndFunc   ;Move to 1 of 20 random spots
RiflemanX is offline  
Old 05/19/2020, 03:05   #6
 
elite*gold: 0
Join Date: Mar 2020
Posts: 35
Received Thanks: 12
thank you for all the replies, will be trying out!
ooklaba is offline  
Old 05/20/2020, 01:13   #7
 
phat34's Avatar
 
elite*gold: 0
Join Date: Sep 2014
Posts: 354
Received Thanks: 120
Oh one more thing when modifying the MoveTo's third argument... by the portal...

Make sure you portal cord is that amount inside the portal or you may end up not making it to through the portal... in other words if the portal cords are 250,250 and your inside point is 0,0 then your moveto argument should be MoveTo( 350, 350, 100)…
phat34 is offline  
Old 05/20/2020, 17:23   #8
 
elite*gold: 110
The Black Market: 172/0/0
Join Date: May 2008
Posts: 257
Received Thanks: 33
Quote:
Originally Posted by phat34 View Post
Oh one more thing when modifying the MoveTo's third argument... by the portal...

Make sure you portal cord is that amount inside the portal or you may end up not making it to through the portal... in other words if the portal cords are 250,250 and your inside point is 0,0 then your moveto argument should be MoveTo( 350, 350, 100)…
You don't want to use the GWA2 "MoveTo" function to go through a portal. The only advice, if you really want to give one, is to not put a number too high as third parameter for the last MoveTo before the portal.

The MoveTo function calls the Move function, and it does until you are close to the destination. If you MoveTo inside a portal, the coordinates are (0,0) during the loading, so it will call the Move function, and it will result in a crash.
Dany7376 is offline  
Old 05/20/2020, 19:07   #9
 
elite*gold: 0
Join Date: Feb 2014
Posts: 63
Received Thanks: 7
Quote:
Originally Posted by Dany7376 View Post
You don't want to use the GWA2 "MoveTo" function to go through a portal. The only advice, if you really want to give one, is to not put a number too high as third parameter for the last MoveTo before the portal.

The MoveTo function calls the Move function, and it does until you are close to the destination. If you MoveTo inside a portal, the coordinates are (0,0) during the loading, so it will call the Move function, and it will result in a crash.
Agreed, you should use the Move function when going out of a portal, otherwise it will crash and/or result in your character going backward into the portal if you load fast enough.

As for the randomization of paths, as said earlier the MoveTo function already adds in some randomization that you can increase/decrease depending on what you want to do.
If you want to randomize between two different paths, the best way is to have your waypoints stored in two arrays, and to randomly load one of them when your run starts
LamaChoco is offline  
Old 05/22/2020, 09:13   #10
 
phat34's Avatar
 
elite*gold: 0
Join Date: Sep 2014
Posts: 354
Received Thanks: 120
My bad... I was only using the portal as an example. But, yes I do recall, now and thanks... If you try to move while the map is loading you will cause a crash. Good of you guys to point that out. I stand corrected.
phat34 is offline  
Reply


Similar Threads Similar Threads
[Selling] No Recoil, Rapid Fire, Shield Exploit, Randomization, Record
05/09/2018 - Rainbow Six Siege Trading - 0 Replies
Removed
[Python] Proxy & UA Randomization + Access Link
05/30/2014 - Coding Snippets - 1 Replies
I was totally shocked about how hard this was to make, not in the sense of the code, but the logic and I thought people could appreciate it to generate views/whatever! All you'll need: 1) A list of proxies that work (port 80/8080) This is made to run continously and to randomize the gap between requests. import urllib2, socket, time, httplib from random import randint class __access():
Gacha/Randomization hack?
08/13/2011 - Grand Chase - 18 Replies
I just encountered a topic in the official forum of Grand Chase, and this new person was talking about something that kind of make sense, but since he's in the official forum, he cannot release anything or break any rules, but he said some stuff that seems very interesting. And can possibly lead to a hack... This is what he said: "I know a friend of mine who's been experimenting with a KGC client(He doesn't edit the files, but just reads some source code.). I gave him an idea based on a RNG...



All times are GMT +1. The time now is 04:50.


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.