Func SkeleBoom()
Local $lSkeleID = GetSkeleID()
; spike it.
ChangeTarget($lSkeleID)
Out("Pulling Skeleton...")
UseSkill($Dash, -2)
UseSkill($HoS, $lSkeleID)
Do
Sleep(300)
Until GetSkillbarSkillRecharge($HoS) > 0 Or GetIsDead(-2)
UseSkill($ShadowSanctuary, -2)
Sleep(750)
Out("Spiking...")
UseSkill($smokepowderdefense, -2)
Sleep(300)
UseSkill($DeathsCharge, $lSkeleID, True)
Do
Sleep(150)
Until GetSkillbarSkillRecharge($DeathsCharge) > 0 Or GetIsDead(-2)
UseSkill($YMLaD, $lSkeleID)
Sleep(100)
UseSkill($BaneSignet, $lSkeleID)
Do
Sleep(50)
Until DllStructGetData(GetAgentByID($lSkeleID), 'HP') < .5 Or GetIsDead(-2) Or GetIsDead($lSkeleID)
UseSkill($FinishHim, $lSkeleID)
Do
Sleep(50)
Until GetIsDead($lSkeleID) Or GetIsDead(-2)
If Not GetIsDead(-2) Then
Out("Harvesting Skeleton Soul")
UseItem(GetItemByModelID($MODEL_ID_MOBSTOPPER))
Out("Checking for Ectos and shinies.")
Else
$fails += 1
EndIf
Out("Run over, resigning")
Resign()
WaitForPartyWipe()
Sleep(150)
Out("Returning to City")
If DllStructGetData(GetAgentByID(-2), 'PlayerNumber') == 1 Then ReturnToOutpost()
Sleep(500)
If getmapID() = Then
Do
Sleep(500)
If DllStructGetData(GetAgentByID(-2), "PlayerNumber") == 1 Then ReturnToOutpost()
Until getmapID() <> 72
EndIf
EndFunc ;==>SkeleBoom
Code:
Global Const $MODEL_ID_MOBSTOPPER = 32558
Global Const $MODEL_ID_CAPTURED_SKELETON = 32559
why is it not using a mobstopper on top of skeleton
I didn't find a modstruct string for dual vamp/zeal OS weapons, so I found the byte pattern and made a simple func. I figure maybe someone will have a use for it.
Code:
Func IsDualVampZeal($aItem)
Local $Type = DllStructGetData($aItem, "Type")
Local $Rarity = GetRarity($aItem)
Local $DV15 = 0
Local $DV14 = 0
Local $DZ15 = 0
Local $DZ14 = 0
If $Rarity == $RARITY_GOLD Then
If $Type == $TYPE_BOW Or $Type == $TYPE_SWORD Or $Type == $TYPE_HAMMER Or $Type == $TYPE_AXE Then
Local $ModStruct = GetModStruct($aItem)
$DV15 = StringInStr($ModStruct, "0F0038220100E820", 0, 1) ;DV15%
$DV14 = StringInStr($ModStruct, "0E0038220100E820", 0, 1) ;DV14%
$DZ15 = StringInStr($ModStruct, "0F0038220100C820", 0, 1) ;DZ15%
$DZ14 = StringInStr($ModStruct, "0E0038220100C820", 0, 1) ;DZ14%
EndIf
EndIf
If $DV15 > 0 Or $DV14 > 0 Or $DZ15 > 0 Or $DZ14 > 0 Then
Return True
Else
Return False
EndIf
EndFunc
EDIT: Found an edge case where it grabbed 15 -5e and 15 -10 weapons so updated patterns so those are skipped now.
Func _GetAgentByGadgetID($nGadgetID)
Local $aAgentArray = GetAgentArray();This may differ depending on GWA2 possible to get it already filtered
For $i = 1 To $aAgentArray[0] ;Do this for every agent in agent array
If DllStructGetData($aAgentArray[$i], 'Type' ) <> 0x200 Then ContinueLoop ;If agent isn't gadget go to next agent
If DllStructGetData($aAgentArray[$i], 'ExtraType') = $nGadgetID Then ;Extra type = Gadget ID
Return $aAgentArray[$i];return the agent
EndIf
Next
Return 0; returns 0 if Gadget wasn't found
EndFunc
Do
$Lever = _GetAgentByGadgetID($GadgetID_Lever)
ActionInteract(); Can send packet instead of using perform action
Sleep(100)
Until DllStructGetData($Lever,'NameProperties') = $LeverNamePropertiesAfterUse ;Or If IAmDead() Or Timerdiff($DeadlockTimer) > $TimeItTakes
A rough way to do it. Forgot if you're using action interact that you need to change target to the agent before interacting but hopefully you get the idea
Quote:
Originally Posted by list comprehension
I didn't find a modstruct string for dual vamp/zeal OS weapons, so I found the byte pattern and made a simple func. I figure maybe someone will have a use for it.
Code:
Func IsDualVampZeal($aItem)
Local $Type = DllStructGetData($aItem, "Type")
Local $Rarity = GetRarity($aItem)
Local $DV15 = 0
Local $DV14 = 0
Local $DZ15 = 0
Local $DZ14 = 0
If $Rarity == $RARITY_GOLD Then
If $Type == $TYPE_BOW Or $Type == $TYPE_SWORD Or $Type == $TYPE_HAMMER Or $Type == $TYPE_AXE Then
Local $ModStruct = GetModStruct($aItem)
$DV15 = StringInStr($ModStruct, "0F0038220100E820", 0, 1) ;DV15%
$DV14 = StringInStr($ModStruct, "0E0038220100E820", 0, 1) ;DV14%
$DZ15 = StringInStr($ModStruct, "0F0038220100C820", 0, 1) ;DZ15%
$DZ14 = StringInStr($ModStruct, "0E0038220100C820", 0, 1) ;DZ14%
EndIf
EndIf
If $DV15 > 0 Or $DV14 > 0 Or $DZ15 > 0 Or $DZ14 > 0 Then
Return True
Else
Return False
EndIf
EndFunc
EDIT: Found an edge case where it grabbed 15 -5e and 15 -10 weapons so updated patterns so those are skipped now.
Code:
Local $BrawnOverBrains = StringInStr($sModString,"0500B820", 0, 1);Energy -5
Local $ToThePain = StringInStr($sModString,"0A001820", 0, 1);Armor -10 (while attacking)
Local $HealthRegen = StringInStr($sModString,"0100E820", 0, 1);Health regeneration -1
Local $DamageAlwaysRoll = GetAlwaysDmgRoll($aItem)
If $DamageAlwaysRoll > 14 And $HealthRegen > 0 Then ; if 15% dmg and -1hp
If $ToThePain > 0 Or $BrawnOverBrains > 0 Then Return False; if 15% -10 vamp Or 15% -5energy vamp return false
Return True ; if it made it here then its a dual vamp
EndIf
;returns roll of dmg modifier $DamageAlways = StringInStr($iModString,"0F00[3822]", 0, 1);Damage +15%
Func GetAlwaysDmgRoll($aItem)
Local $1Mod = GetModByIdentifier($aItem, "3822")
Return $1Mod[0]
EndFunc
I usually do something along those lines. Experiment with GetModByIdentifier it will make your life easy.
Code:
Func IsDualVampZeal($aItem)
Local $Type = DllStructGetData($aItem, "Type")
Local $Rarity = GetRarity($aItem)
alot of times you already read those in the function that's calling IsDualVampZeal so you if you want to speed it up just send it with the function Func IsDualVampZeal($aItem,$Type,$Rarity)
MoveTo(17168, -9412)
$Renk = GetNearestNPCToAgent(-2)
If GetAgentExists($Renk) Then
GoToNPCNearestCoords(17611, -9341) ; Renk
Sleep(1000)
Dialog(0x833404)
Sleep(1000)
EndIf
MoveTo(16473, -9495)
Doesn't work with GetAgentExists($Renk) = False Then
or GetAgentExists($Renk) = True Then
I just want him to check if there is an NPC, if there is one, go see him, do the dialogue and continue, but if there is no one, skip this step and continue to moving forward
the NPC I'm looking for isn't always there
i'm new to coding and I hope this is the right place to ask. I'm trying to learn by doing some simple scripts. Therefore I want to output the id of an enemy target into a MsgBox.
This is my code:
Code:
While 1
For $i = 1 To GetMaxAgents()
$lAgent = GetAgentByID($i)
$aEnemy = DllStructGetData($lAgent, 'Allegiance')
$Skill = DllStructGetData($lAgent, "Skill")
If $aEnemy == 3 Then
$tTarget = GetTarget($lAgent)
MsgBox(1, "AgentID", $tTarget)
EndIf
Next
WEnd
Somehow it returns always 0. Is my logic behind this wrong? Is there any approach to get the correct agent ID? Thanks very much in advance
i'm new to coding and I hope this is the right place to ask. I'm trying to learn by doing some simple scripts. Therefore I want to output the id of an enemy target into a MsgBox.
This is my code:
Code:
While 1
For $i = 1 To GetMaxAgents()
$lAgent = GetAgentByID($i)
$aEnemy = DllStructGetData($lAgent, 'Allegiance')
$Skill = DllStructGetData($lAgent, "Skill")
If $aEnemy == 3 Then
$tTarget = GetTarget($lAgent)
MsgBox(1, "AgentID", $tTarget)
EndIf
Next
WEnd
Somehow it returns always 0. Is my logic behind this wrong? Is there any approach to get the correct agent ID? Thanks very much in advance
Try this:
Code:
While 1
For $i = 1 To GetMaxAgents()
$lAgent = GetAgentByID($i)
$lEnemy = DllStructGetData($lAgent, 'Allegiance')
If $lEnemy = 3 Then
$lAgentID = DllStructGetData($lAgent, 'ID')
MsgBox(1, "AgentID", $lAgentID )
EndIf
Next
WEnd
Edit:
Ohh, I totally missunderstood your question
Well, "GetTarget()" doesn't work because nobody updated the related Function "CreateTargetLog()"
While 1
For $i = 1 To GetMaxAgents()
$lAgent = GetAgentByID($i)
$lEnemy = DllStructGetData($lAgent, 'Allegiance')
If $lEnemy = 3 Then
$lAgentID = DllStructGetData($lAgent, 'ID')
MsgBox(1, "AgentID", $lAgentID )
EndIf
Next
WEnd
Edit:
Ohh, I totally missunderstood your question
Well, "GetTarget()" doesn't work because nobody updated the related Function "CreateTargetLog()"
Thank you very much for your reply! Could you give me any hint where I can find information in the forum regarding to update the function? Or a rough direction on steps that are needed? (I'm aware, that I might not have the skills yet to do so and it is a complicated task)
Thank you very much for your reply! Could you give me any hint where I can find information in the forum regarding to update the function? Or a rough direction on steps that are needed? (I'm aware, that I might not have the skills yet to do so and it is a complicated task)
Thank you!
I believe the very most of the community here do not have the skill to update such low level stuff. Also i don't share the updated function because it can be used to (rupt)bot in pvp which is a no-go for me ...
Is there any useful use for it beside pvp?
ok so i wanna learn how to code! My idea for a Red Iris Flower Farmer... i dont know what func im looking for....
1. Get map ID
2. if not ashford, map there
3. when mapping random District
4. when mapped, retreive spawn point
5. when spawn is located, start pathing to portal
6. exit portal, load
7. done loading, path to x,y,z
8. while pathing look for flower
9. once located flower interact with flower to pick up
10. once picked up map with random district
11. loop
ok so i wanna learn how to code! My idea for a Red Iris Flower Farmer... i dont know what func im looking for....
1. Get map ID
2. if not ashford, map there
3. when mapping random District
4. when mapped, retreive spawn point
5. when spawn is located, start pathing to portal
6. exit portal, load
7. done loading, path to x,y,z
8. while pathing look for flower
9. once located flower interact with flower to pick up
10. once picked up map with random district
11. loop
Is there somewher i can look for reference?
Chest run bot such as the pong mei or boreal basically does all of that but instead of flowers looks for chests.
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