OK to ask for exploit/Scripting help here...

03/28/2019 10:42 lasse1993#91
How can i unequip an item without equipping another item instead?

Code:
Global Const $HEADER_ITEM_UNEQUIP						= 0x52	;Unequip item
03/28/2019 17:35 RiflemanX#92
Quote:
Originally Posted by lasse1993 View Post
How can i unequip an item without equipping another item instead?

Code:
Global Const $HEADER_ITEM_UNEQUIP						= 0x52	;Unequip item
Sorry, I am not able to help much at the moment but I can provide you this from gwapi. The structure looks correct but I do not think you can directly port this but it gives you an idea of what needs to be done.

Code:
Func UnequipItem($aEquipmentSlot, $aBag, $aSlot)
   If IsPtr($aBag) Then
	  $lBagID = MemoryRead($aBag + 8, 'long')
   ElseIf IsDllStruct($aBag) Then
	  $lBagID = DllStructGetData($aBag, 'ID')
   Else
	  $lBagID = MemoryRead(GetBagPtr($aBag) + 8, 'long')
   EndIf
   Return SendPacket(0x10, 0x49, $aEquipmentSlot - 1, $lBagID, $aSlot - 1)
EndFunc   ;==>UnequipItem
In the above code these are the parameters:

Description: Unequips item to $abag, $aslot (1-based).
Equipmentslots:

1 -> Mainhand/Two-hand
2 -> Offhand
3 -> Chestpiece
4 -> Leggings
5 -> Headpiece
6 -> Boots
7 -> Gloves

Hope this helps.




Ok, there was another function in the Fiber Farmer. Try this one:

Code:
	Func unequipitem($aequipmentslot, $abag, $aslot)
		If IsPtr($abag) Then
			$lbagid = memoryread($abag + 8, "long")
		ElseIf IsDllStruct($abag) Then
			$lbagid = DllStructGetData($abag, "ID")
		Else
			$lbagid = memoryread(getbagptr($abag) + 8, "long")
		EndIf
		Return sendpacket(16, $HEADER_ITEM_UNEQUIP, $aequipmentslot - 1, $lbagid, $aslot - 1)
	EndFunc
Notice that this one calls $Header_Item_Unequip so it will read off your current gwa2 headers.
03/29/2019 11:29 lasse1993#93
Quote:
Originally Posted by RiflemanX View Post
Sorry, I am not able to help much at the moment but I can provide you this from gwapi. The structure looks correct but I do not think you can directly port this but it gives you an idea of what needs to be done.

Code:
Func UnequipItem($aEquipmentSlot, $aBag, $aSlot)
   If IsPtr($aBag) Then
	  $lBagID = MemoryRead($aBag + 8, 'long')
   ElseIf IsDllStruct($aBag) Then
	  $lBagID = DllStructGetData($aBag, 'ID')
   Else
	  $lBagID = MemoryRead(GetBagPtr($aBag) + 8, 'long')
   EndIf
   Return SendPacket(0x10, 0x49, $aEquipmentSlot - 1, $lBagID, $aSlot - 1)
EndFunc   ;==>UnequipItem
In the above code these are the parameters:

Description: Unequips item to $abag, $aslot (1-based).
Equipmentslots:

1 -> Mainhand/Two-hand
2 -> Offhand
3 -> Chestpiece
4 -> Leggings
5 -> Headpiece
6 -> Boots
7 -> Gloves

Hope this helps.




Ok, there was another function in the Fiber Farmer. Try this one:

Code:
	Func unequipitem($aequipmentslot, $abag, $aslot)
		If IsPtr($abag) Then
			$lbagid = memoryread($abag + 8, "long")
		ElseIf IsDllStruct($abag) Then
			$lbagid = DllStructGetData($abag, "ID")
		Else
			$lbagid = memoryread(getbagptr($abag) + 8, "long")
		EndIf
		Return sendpacket(16, $HEADER_ITEM_UNEQUIP, $aequipmentslot - 1, $lbagid, $aslot - 1)
	EndFunc
Notice that this one calls $Header_Item_Unequip so it will read off your current gwa2 headers.

Just so anyone can use it if he stumbles in here:
Code:
Global Const $HEADER_ITEM_UNEQUIP						= 0x54
03/30/2019 06:20 RiflemanX#94
Quote:
Originally Posted by CoderAndy View Post
Hello i'm trying to make a global array with all the 1 point alcohol so i can use them with my Deldrimor skills and don't have to change the alcohol model id all the time i use:QUOTE
Code:
Global $OnePoint_Alcohol_Array[11] = [910, 5585, 6049, 6367, 6375, 15477, 19171, 19172, 19173, 22190, 28435]
Global $ThreePoint_Alcohol_Array[7] = [2513, 6366, 24593, 30855, 31145, 31146, 35124]
Global $FiftyPoint_Alcohol_Array[1] = [36682]

Global Const $ITEM_ID_Hunters_Ale = 910
Global Const $ITEM_ID_Flask_of_Firewater = 2513
Global Const $ITEM_ID_Dwarven_Ale = 5585
Global Const $ITEM_ID_Witchs_Brew = 6049
Global Const $ITEM_ID_Spiked_Eggnog = 6366
Global Const $ITEM_ID_Vial_of_Absinthe = 6367
Global Const $ITEM_ID_Eggnog = 6375
Global Const $ITEM_ID_Bottle_of_Rice_Wine = 15477
Global Const $ITEM_ID_Zehtukas_Jug = 19171
Global Const $ITEM_ID_Bottle_of_Juniberry_Gin = 19172
Global Const $ITEM_ID_Bottle_of_Vabbian_Wine = 19173
Global Const $ITEM_ID_Shamrock_Ale = 22190
Global Const $ITEM_ID_Aged_Dwarven_Ale = 24593
Global Const $ITEM_ID_Hard_Apple_Cider = 28435
Global Const $ITEM_ID_Bottle_of_Grog = 30855
Global Const $ITEM_ID_Aged_Hunters_Ale = 31145
Global Const $ITEM_ID_Keg_of_Aged_Hunters_Ale = 31146
Global Const $ITEM_ID_Krytan_Brandy = 35124
Global Const $ITEM_ID_Battle_Isle_Iced_Tea = 36682
03/31/2019 03:07 afmart#95
ill just leave this here
*flies away*

Quote:
Originally Posted by RiflemanX View Post
Code:
Global $OnePoint_Alcohol_Array[11] = [910, 5585, 6049, 6367, 6375, 15477, 19171, 19172, 19173, 22190, 28435]
Global $ThreePoint_Alcohol_Array[7] = [2513, 6366, 24593, 30855, 31145, 31146, 35124]
Global $FiftyPoint_Alcohol_Array[1] = [36682]

Global Const $ITEM_ID_Hunters_Ale = 910
Global Const $ITEM_ID_Flask_of_Firewater = 2513
Global Const $ITEM_ID_Dwarven_Ale = 5585
Global Const $ITEM_ID_Witchs_Brew = 6049
Global Const $ITEM_ID_Spiked_Eggnog = 6366
Global Const $ITEM_ID_Vial_of_Absinthe = 6367
Global Const $ITEM_ID_Eggnog = 6375
Global Const $ITEM_ID_Bottle_of_Rice_Wine = 15477
Global Const $ITEM_ID_Zehtukas_Jug = 19171
Global Const $ITEM_ID_Bottle_of_Juniberry_Gin = 19172
Global Const $ITEM_ID_Bottle_of_Vabbian_Wine = 19173
Global Const $ITEM_ID_Shamrock_Ale = 22190
Global Const $ITEM_ID_Aged_Dwarven_Ale = 24593
Global Const $ITEM_ID_Hard_Apple_Cider = 28435
Global Const $ITEM_ID_Bottle_of_Grog = 30855
Global Const $ITEM_ID_Aged_Hunters_Ale = 31145
Global Const $ITEM_ID_Keg_of_Aged_Hunters_Ale = 31146
Global Const $ITEM_ID_Krytan_Brandy = 35124
Global Const $ITEM_ID_Battle_Isle_Iced_Tea = 36682
03/31/2019 16:17 diguano#96
hello, I have a coding problem in the function fight I want to make sure that the bot attack priority Forgotten Sage.and if there is not in the group he normally target. could you m ' please help? cordially
03/31/2019 18:37 RiflemanX#97
Quote:
Originally Posted by diguano View Post
hello, I have a coding problem in the function fight I want to make sure that the bot attack priority Forgotten Sage.and if there is not in the group he normally target. could you m ' please help? cordially
There are some scripts that target a boss or a healer in a group first. Think about what scripts might have this and look through the functions to see if there is something to help. I know Kilroy has something like this so you can try editing the below first.

Code:
Func SelectTarget()
	$target = GetCurrentTarget()
	$Me = GetAgentByID(-2)
	If $target <> 0 And DllStructGetData($target, 'Type') = 219 _
			And DllStructGetData($target, 'Allegiance') = 3 And GetIsDead($target) = 0 Then
		If TimerDiff($tSwitchtarget) < 1000 Or GetDistance($Me, $target) < 100 Then
			Return DllStructGetData($target, 'Id')
		Else
			ConsoleWrite("Switching target, out of range!" &  [MENTION=3576271]CRLF[/MENTION])
		EndIf
	EndIf
	$tSwitchtarget = TimerInit()
	Update("Looking for items")
	PickupItems(1000)
	Update("Selecting new target")
	$kilroy = GetAgentById($kilroyID)
	If GetIsDead($kilroy) Then
		$target = GetNearestEnemyToAgent($meID)
		ConsoleWrite("Kilroy is dead! Roaming!" &  [MENTION=3576271]CRLF[/MENTION])
	Else
		$target = GetAgentByID(GetTarget($kilroy))
		If $target = 0 Or GetIsDead($target) Or DllStructGetData($target, 'Allegiance') <> 3 Then
			$possibletarget = GetNearestEnemyToAgent($kilroy)
			If GetDistance($possibletarget, $kilroy) < 1250 Then
				ConsoleWrite("Roaming!" &  [MENTION=3576271]CRLF[/MENTION])
				$target = $possibletarget
			EndIf
		Else
			ConsoleWrite("Trying to copy target!" &  [MENTION=3576271]CRLF[/MENTION])
		EndIf
	EndIf
	If GetIsBoss($target) Then
		;It's a boss, lets search for minions first!
		$possibletarget = GetNearestEnemyToAgent($target)
		If $possibletarget <> 0 And GetDistance($possibletarget, $kilroy) < 1250 Then
			ConsoleWrite("Retargeting to minion!" &  [MENTION=3576271]CRLF[/MENTION])
			$target = $possibletarget
		EndIf
	EndIf
	If $target <> 0 And GetIsDead($target) = 0 Then
		$targetId = DllStructGetData($target, 'Id')
		Update("Attacking " & $targetId)
		ChangeTarget($target)
		Sleep(GetPing())
		Attack($target)
		Return $targetId
	EndIf
EndFunc   ;==>SelectTarget
07/01/2019 15:15 noobsuy#98
How do i go about updating the PerformAction functions in GWA2 (especially TargetNearestAlly, TargetNearestEnemy, etc.) ? Any hints?

Func TargetNearestAlly()
Return PerformAction(0xBC, 0x18)
EndFunc ;==>TargetNearestAlly

Any way to find these with BotDeveloper?
07/02/2019 06:24 phat34#99
Not 100% sure... but two updates ago we raised most of the second PeformAction values by +6.... so this would change the 0x18 to 0x1E and that function should work.

@[Only registered and activated users can see links. Click Here To Register...]
for completeness when you have time can you also add the Func GetIsBoss() to message #100

@[Only registered and activated users can see links. Click Here To Register...]
Did that help you solve the problem...?? I use to use a Func GetAgentbyName() to help me with situations like this and then Func Target($lAgent)… Let me know if you still need help with this.
07/04/2019 19:22 makryno#100
In GWA2,
Code:
GetTraderCostValue()
always returns 0. Anyone any ideas on this?
07/05/2019 13:28 1328™#101
anyone got an updated gwbible? i tried that one from the working JQ bot but still get an error "Label: SkillLogProc not provided"
07/09/2019 23:10 1328™#102
i have two questions:

First one: is there an list of all map ids? i am to lazy to create one ;)

Second: SetDisplayedTitle(0x29) change the displayed title to Norn. how can i find out for other titles? i dont find anything in the botdeveloper :/
07/10/2019 06:04 phat34#103
Quote:
Originally Posted by 1328™ View Post
i have two questions:

First one: is there an list of all map ids? i am to lazy to create one ;)

Second: SetDisplayedTitle(0x29) change the displayed title to Norn. how can i find out for other titles? i dont find anything in the botdeveloper :/
1)
[Only registered and activated users can see links. Click Here To Register...]

********* = gam3r3vision but with normal letters (site blocks it)

2)
;~ Description: Set the currently displayed title.
;~ Author: Skaldish
;~ No Title = 0x00
;~ Spearmarshall = 0x11
;~ Lightbringer = 0x14
;~ Asuran = 0x26
;~ Dwarven = 0x27
;~ Ebon Vanguard = 0x28
;~ Norn = 0x29
07/10/2019 21:55 spartanfbj#104
Hey all, I’m a full-time software developer and recently got back into Guild Wars to start making bots as a hobby. This forum has been an awesome resource and props to all of the main contributors around here making/updating bots and helping out everyone. Some people seem unappreciative of the few folk that are really doing a lot to support this community and I want to say thank you to those guys.

I’ve started editing a Vaettir bot with success but I’d like to make it more intelligent when it comes to handling items. Things like salvaging certain Mods, saving r9 items of specific attributes, salvaging Highly Salvagable items, and salvaging items for specific materials.

My idea was to make a script that bots could require in their script that would act as a module to handle these different scenarios with a GUI to select and prioritize what inscriptions/mods you’d like to salvage/store, items and requirements you’d like to store, materials you’d aim to salvage from items that don’t meet any of the other criteria, etc.

My question is, is this something that’s already done or attempted? Is this more work than I assume? I’ve laid out a decent sized framework of GUI, functions and workflow. But I haven’t developed a bot start to finish yet and I’m not sure if it’s even possible to make a ‘module’ like this that can be essentially plugged in to existing bots to handle their item/inventory logic.
07/11/2019 06:35 phat34#105
Anything is possible till they turn the switch off or decide to make it impossible...