Does anyone know if there's a way to get the event system to work?
It seems to me that some relevant region are it are disabled within the "ModifyMemory" function but so far I couldn't find any working version of GWA2 where this is not the case.
Do you guys know what exacly parts of memory should i look for and add an offset to base adress to get nickname of account characters or the one that is already logged in?
Thats so far what i've got.
EDIT:
I managed to fix it. Basicaly function returns currently logged in character or if in switch characters window it returns lastly logged-in character. Returns empty String if you are not logged-in into account. I also found the way to return all character names out of logged-in account. For interested:
Code:
Func MemoryRead($aAddress, $aType = 'dword')
Local $lBuffer = DllStructCreate($aType)
DllCall($mKernelHandle, 'int', 'ReadProcessMemory', 'int', $mGWProcHandle, 'int', $aAddress, 'ptr', DllStructGetPtr($lBuffer), 'int', DllStructGetSize($lBuffer), 'int', '')
Return DllStructGetData($lBuffer, 1)
EndFunc ;==>MemoryRead
Func GetModuleInfo(ByRef $aModuleBase, ByRef $aModuleSize)
Local $lProcName = _WinAPI_GetProcessName($mGWProcId)
Local $lProcNameLength = StringLen($lProcName)
Local $lModules = _WinAPI_EnumProcessModules($mGWProcId)
;_ArrayDisplay($lModules, "$lModules")
For $i = 1 To $lModules[0][0]
Local $lModuleName = StringRight($lModules[$i][1], $lProcNameLength)
ConsoleWrite [MENTION=3576271]CRLF[/MENTION] & "$lModuleName : " & $lModuleName & [MENTION=3576271]CRLF[/MENTION])
If StringCompare($lModuleName, $lProcName, $STR_NOCASESENSE) = 0 Then
Local $lModuleInfo = _WinAPI_GetModuleInformation($mGWProcHandle, $lModules[$i][0])
ConsoleWrite [MENTION=3576271]CRLF[/MENTION] & "$lModuleInfoEntryPoint : " & DllStructGetData($lModuleInfo, "EntryPoint") & [MENTION=3576271]CRLF[/MENTION])
$aModuleBase = DllStructGetData($lModuleInfo, 'BaseOfDll')
$aModuleSize = DllStructGetData($lModuleInfo, 'SizeOfImage')
Return True
EndIf
Next
Return False
EndFunc ;==>GetModuleInfo
Func MyScanForCurrentlyLoggedIn($aModuleBase)
Local $lCurrentSearchAddress = $aModuleBase + 0x6292D0
Local $lLoggedInCharacter = MemoryRead($lCurrentSearchAddress,'wchar[30]')
;ConsoleWrite("Found logged-in character: " & $lLoggedInCharacter & [MENTION=3576271]CRLF[/MENTION])
Return $lLoggedInCharacter
EndFunc ;==>MyScanForCurrentlyLoggedIn
Im looking to add a func to use merch stones for vaettir bot but im not sure how to go about writing it as im newer to coding with 0 background any help would be wonderful. The issue I have is its telling me that on the endfunc its got no matching If Statment but idn where it needs one...Here is what i have so far
Code:
Func UseMercantile()
If $UseMercantile = True Then
out("Using Merchant-Stone selected")
Else
out("No Merchant-Stone selected")
EndIf
GetNumberOfFreeSlots <= 10 Then
If CountItemInBagsByModelID(31154) > 0 Then
useitem(31154)
Sleep(500
out("Cleaning Ineventory")
EndIf
$i = 0;
Do
If FindIDKit() = 0 Then
EndIf
BuyIDKit()
Do
Sleep(200)
Until FindIDKit() <> 0
GetNumberOfFreeSlots = 10 Then
Ident()
Sleep(GetPing())
$i += 1
Until FindIDKit() <> 0 Or $i > 4
Sell()
Sleep(300)
EndIf
If GetGoldCharacter() > 97000 Then
Out("Buying Lockpick")
BuyLockPick
Sleep(GetPing()+500) EndIf
If GetGoldCharacter() > 10000 Then
EndFunc
Im looking to add a func to use merch stones for vaettir bot but im not sure how to go about writing it as im newer to coding with 0 background any help would be wonderful. The issue I have is its telling me that on the endfunc its got no matching If Statment but idn where it needs one...Here is what i have so far
If GetGoldCharacter() > 97000 Then
Out("Buying Lockpick")
BuyLockPick
Sleep(GetPing()+500) EndIf
If GetGoldCharacter() > 10000 Then
EndFunc[/code]
What did you want to do with last If? You might not even need it.
I have added this function to an old bot i had and whenever i activate it, rendering is off BUT bot also stops at that location. Am i doing something wrong or did something change in gw?
Code:
Func ToggleRendering()
$RenderingEnabled = Not $RenderingEnabled
If $RenderingEnabled Then
EnableRendering()
WinSetState(GetWindowHandle(), "", [MENTION=330060]Sw_[/MENTION]SHOW)
Else
DisableRendering()
WinSetState(GetWindowHandle(), "", [MENTION=330060]Sw_[/MENTION]HIDE)
ClearMemory()
EndIf
EndFunc ;==>ToggleRendering
What did you want to do with last If? You might not even need it.
I have added this function to an old bot i had and whenever i activate it, rendering is off BUT bot also stops at that location. Am i doing something wrong or did something change in gw?
Code:
Func ToggleRendering()
$RenderingEnabled = Not $RenderingEnabled
If $RenderingEnabled Then
EnableRendering()
WinSetState(GetWindowHandle(), "", [MENTION=330060]Sw_[/MENTION]SHOW)
Else
DisableRendering()
WinSetState(GetWindowHandle(), "", [MENTION=330060]Sw_[/MENTION]HIDE)
ClearMemory()
EndIf
EndFunc ;==>ToggleRendering
What i was aiming to do is make it so if the gold value is 10k then end the func for merch stone
i'd like to setup a func to pull multiple item from inventory to chest (white item)
I have all Global Const ID and Func Canpickup ....
but need help how to pull them from inv to chest
Any help is really appreciated
To do so, you need to go through your inventory in order to detect white item, then find the first available slot in your storage and then move item into this slot.
It should look something like this :
Code:
Func StoreWhiteItems()
Local $aItem
Local $slot
Local $full = False
For $bagIndex = 1 To 4
For $slotIndex = 1 To DllStructGetData(GetBag($bagIndex), 'Slots')
$aItem = GetItemBySlot($bagIndex, $slotIndex)
If DllStructGetData($aItem, 'ID') = 0 Then ContinueLoop
If GetRarity($aItem) == $RARITY_White Then ;2621
For $storePan = 8 To 12
$slot = FindEmptySlot($storePan)
If $slot <> 0 Then
ExitLoop
EndIf
Next
If $slot <> 0 Then
MoveItem($aItem, $storePan, $slot)
Sleep(GetPing()+500)
Else
ExitLoop 2 ;Full storage...
EndIf
EndIf
Next
Next
EndFunc ;==>StoreWhiteItems
Func FindEmptySlot($bagIndex)
Local $aItem
For $slotIndex = 1 To DllStructGetData(GetBag($bagIndex), 'Slots')
$aItem= GetItemBySlot($bagIndex, $slotIndex)
If DllStructGetData($aItem, 'ID') = 0 Then ;Means empty slot
Return $slotIndex
EndIf
Next
Return 0
EndFunc ;==>FindEmptySlot
Here is my issue : I'm using a public version of GWA2 and i'm trying to get the name of an item in my inventory (similar to what TB is doing in the info window)
As far as I can see there are no function to directly get the item name. After some digging here what I understand :
When I use getitembyslot() to select an item in my inventory I can access the following informations :
Now to get the name of an item, i would need to extract the information on NameString or SingleItemName.
As far as I understand DllStructGetData($aItem, 'NameString') or DllStructGetData($aItem, 'singleItemName') will only return a pointer and not the information I need.
I have no clue how to exactly read that pointer so I tried to copy what was going on with fonctions involving a pointer : GetRarity() and GetModStruct()
Another thing that I tried is to get the item to an agent then to use the GetAgentName() fonction. But it appears to be bugged in my version to GWA2 as it's not returning anything (doesn't return anything when the agent is a random mob and doesn't return anything when the agent is an item).
Hello guys, i got hacked and gm didnt help me :( so i ask for help here 12/22/2009 - Kal Online - 25 Replies Hello guys, i got hacked 7 days ago, i sent a c/s to gms connected my id card, they told me twrite back after 7 days...
GM Reply
Hello.
This is Kalonline.
We checked over your report and blocked hackers.
HELP! I need help scripting 02/06/2007 - Conquer Online 2 - 1 Replies OK, I want to know how u ppl do it! I what program do u use to make them? cause i wanna help but i dun know how... somone plz reply!
L2Walker, scripting questions/help 12/13/2006 - Lineage 2 - 0 Replies Hey, just asking a few questions hope you don't mind ^_^
I'm looking to make a script so when I cast magic on something, the walker bot will cast, say Wind Strike, on the same thing, at the same time.
I've looked through the options in walker and have it setup now, but it doesn't cast at the same time, but when I've finished casting.
If this isn't possible, last time I checked Walker scripts could not pickup what was said in chat, is this still the case?
Thanks. ^_^
Note: If you...
I need help scripting 09/05/2006 - General Coding - 0 Replies Ok I am tired of leeching I am ready to try my hand at scripting but I dont know where to start and I was wondering if someone could help me get started or tell me a website that can help me learn so I can make my own hacks and contribute to the epvp community that we all love :D