Post Reply Home » Forums » Dark Age of Camelot » DAOC Discussion

Hunter Script, Range Pulling : DAOC Discussion

Posted: March 14th, 2004
maximusdm
Thanks, I'm going to start testing the Sub section code soon.

Do you know what the begin statements are for? I'm thinking it's safe to remove them but want to check.


And Repeat, never seen it but think it will do whats under it. This needs to be replaced with something else right? Any ideas on what i should do to change it? Can you explane how i would fix this block of code? (regarding repeat and begin)

Private Function GetStatus(Status) ' Function GetStatus returns the Status you chose as a float between 0 and 1
Dim Border(1, 3)
Dim Bordertype(1, 3)
Dim Bool, CurHP, Step, Dir
'begin
Border(1) = 0
If (Status = _Target) Then Border(3) = TargetPixels Else Border(3) = PlayerPixels
Bordertype(1) = True
Bordertype(3) = False
CurHP = Border(3) -1
Dir = -1
repeat
Step = Trunc( ((Border(Dir + 2) - CurHP) / 2) + (Dir * 0.55) )
CurHP = (CurHP + Step)
Bool = GetStatusPixel(Status, CurHP)
If (Bool = True) Then Border(1) = CurHP Else Border(3) = CurHP
If (Bool = Bordertype(Dir + 2)) Then Dir = (Dir * -1)
Until (Border(1) = Border(3) -1)
If (Status = _Target) Then 'begin
Result = Border(1)
End Else 'begin
Result = Border(1)
End
End Function

Or are Begin and Repeat part of a loop?

Thanks.
Posted: March 14th, 2004
WyvernX
If you know CPP, it is the same as

{ //begin

} //end

repeat can be converted to:

Do 'repeat

Loop 'until xxx
Posted: March 15th, 2004
Trajan
Have any of you tried this in-game yet? hehe I tried it and it didnt do anything . just curious. I know I am forgetting something.
Posted: March 15th, 2004
maximusdm
No, there is still alot of code that needs to be changed.

I'll have small pices of it working today, if you want I can put them in a small script so you can test them.
Posted: March 15th, 2004
JimmyOOOOO
max, I for one want to thank you in advance for working n this and sharing your results with the rest of us.

I have ZERO scripting knowledge, so I'll wait patiently until it's done. Something this useful would definitely be worth a 'donation' imho.
Posted: March 29th, 2004
darkfriend
im working to on it i got now... i changed the sub where u can look at power health and end and get the value back ... so and this part is working the rest it seems to be not a big deal as long u stand at a spot where u dont have to move...to pull...i will put in my script also in here as soon it is finished ...1-2 weeks...major part working ... but it is still configed to run in si client ... (works well now... on si :-))
Posted: March 29th, 2004
darkfriend
Option Explicit
'---------------------------------------------------------------------------
Const CharXWin = 672 'X-Axis From CharWin Start
Const CharYWin = 504 'Y-Axis From CharWin Start
'Set the Con of the Mobs your allowed to Hunt only 3 Colors right now.
'***************************************************************************
'** DO NOT CHANGE ANYTHING BELOW THIS !!! **********************************
'***************************************************************************
XUScriptHost.Sleep(3000)
XUScriptHost.Importscript("SendKeys.vbs") ' Import the SendKeys() Command
XUScriptHost.Importscript("LineKeyCom.vbs") ' Import the Line Keys Command
'***************************************************************************
'** Variable Definition **
'***************************************************************************
Dim DebugFile ' Debugfile Definition
Dim Fso ' Object Definition
Dim GodFlag
'---------------------------------------------------------------------------
Set Fso = CreateObject("Scripting.FileSystemObject")
Set DebugFile = Fso.OpenTextFile("c:Test.log", 2, True)
'***************************************************************************
'** JOB Run **
'***************************************************************************
DebugPrint("Test script started")
'-- Main Procedure ---------------------------------------------------------
Recover
'-- End --------------------------------------------------------------------
DebugPrint("Test script finished")
DebugFile.Close
'***************************************************************************
'** Subroutines **
'***************************************************************************
'-- Recover ----------------------------------------------------------------
Sub Recover()
Dim Flag
DebugPrint("Sub Recover")
L_Sit
Flag = False
Do Until Flag = True
If CheckStats("Hea") = 89 and CheckStats("End") = 89 and CheckStats("Pow") = 89 Then
Flag = True
Else
XUScriptHost.Sleep(1000)
End If
Loop
L_Stand
End Sub
'-- Debugprinter -----------------------------------------------------------
Sub DebugPrint(varText)
DebugFile.WriteLine(CStr(Now) + " " + varText)
End Sub
'***************************************************************************
'** Functions **
'***************************************************************************
'-- CheckStats -------------------------------------------------------------
Function CheckStats(Status)
Dim iCounter,YAxe,Color,Red,Blue,Green
DebugPrint("Fun CheckStats")
Select Case Status
Case "Hea" YAxe = 44
' DebugPrint("WCS001 Status: " & Status & "YAxe: " & YAxe)
Case "Pow" YAxe = 66
' DebugPrint("WCS002 Status: " & Status & "YAxe: " & YAxe)
Case "End" YAxe = 54
' DebugPrint("WCS003 Status: " & Status & "YAxe: " & YAxe)
Case "Tar" YAxe = 110
' DebugPrint("WCS004 Status: " & Status & "YAxe: " & YAxe)
End Select
' DebugPrint("Check Value: " & YAxe)
For iCounter = 89 to 1 Step -1
Color = XUScriptHost.GetPixelColor(CharXWin+iCounter+33,CharYWin+YAxe)
Red = XUScriptHost.ExtractRGB_Red(Color)
Green = XUScriptHost.ExtractRGB_Green(Color)
Blue = XUScriptHost.ExtractRGB_Blue(Color)
' DebugPrint(Status & " X: " & (CharXWin+iCounter+33) & "Y: " & (CharYWin+YAxe) &" Color: " & Color & " R/G/B: "& Red & "/" & Green & "/" & Blue)
Select Case Status
Case "Hea"
If (Red > Green) and (Red > 150) and (Red > Blue) Then
Checkstats = iCounter
' DebugPrint("Health iCounter: " & iCounter)
Exit Function
End If
Case "Pow"
If (Red > 150) and (Green > 150) and ((Red+Green) > (3*Blue)) Then
Checkstats = iCounter
' DebugPrint("Check iCounter: " & iCounter)
Exit Function
End If
Case "End"
If (Green > Red) and (Green > Blue) and (Green > 150) Then
Checkstats = iCounter
' DebugPrint("Check iCounter: " & iCounter)
Exit Function
End If
' Case "Tar"
' If (Red > Green) and (Red > 150) and (Red > Blue) Then
' Checkstats = iCounter
' DebugPrint("Check iCounter: " & iCounter)
' Exit Function
' End If
End Select
Next
End Function
Posted: March 29th, 2004
darkfriend
thats the recover part... i will send rest soon im finished..
Posted: March 30th, 2004
darkfriend
kk.. im so far now...

1) i can target ..and check con if it matches with the colors u entered to kill
(macro set also with a full health check o u will not target any mobs that are already engaged)
2) to pull mob and style attack as long u have end .. and send heal or any other order to a bot as soon
u fall bellow mobs health.
3) Loot
4) sit until all those stats are back to 100% ..(u can choose end health power ..) also can heal to do this faster
when all selected stats at the point u entered it ...stands up again and goes from beging thats it..

working on death routine and on customize for any client classic si toa

any others still working on it to share some stuff ??
Posted: March 30th, 2004
Trajan
All I can say darkfriend is .. wow..

Awesoem work if you have it doing all that already.

Keep up the good work
Posted: March 31st, 2004
krasniy
Sounds great! Please keep us updated..... you are creating a super script!
Posted: March 31st, 2004
darkfriend
kk ..
... i will do that :-) more comming saturday!
Posted: April 1st, 2004
stagemaster
Really impressive guys!!! Can't wait to see this in action! If you need a beta tester who not mind dying lemme know :-)
Want Advertisements After The Last Post Removed? Create A Free Account!
blue large dotWho is online
Users browsing this forum: No registered users and 10 guests
Post Reply