Quote:
Originally Posted by gabe4628
I have several observations/comments/notes about this one.
1. Store gold unids function would be really cool.
2. The bot recasts scourge healing instead of spamming necrosis, even though it has enough energy to do it. Generally it uses scourge healing twice and necrosis just once, even though it could use it well over 2-3 times.
3. If the bot doesn't have enough energy it won't wait for it to use corpse teleport even when there are drops to be picked up. Instead it just restarts the run.
4. The aforementioned tiger glitch. I haven't seen the tiger, but I did notice the bot getting completely stuck around the shrine.
5. I use a +5e sword and -50 cesta, not sure whether high ene staff was supposed to be put in a specific weapon set, either way I don't use high energy staff, so maybe that's the reason why I have the problems in points 2. and 3.
6. That drunken master could work even without alcohol, 15% is better than nothing, and that slot where prot spirit is, is useless anyway, since the hexes and necrosis should do the job anyway.
|
These are good observations. Lets break this down and see what we can learn together.
1. Store gold unids function would be really cool.
For this script, because the gold drops only occur about 2 per hour (that are not stackable like FoW Scrolls, UW Scrolls, XP Scrolls, etc) I did not feel that it needed to have any gold item storage, especially because at this time its not really a good idea to run longer than 6-8 hours for risk of being flagged and ban so that would only be about 16-20 gold items max. Regardless, lets say that you did wish to have some sort of gold storage. I would simply cut and paste the storage components needed from a working script such as Boreal Chest Bot or perhaps Raptor Farm. Lets take a look at Raptor Farm real quick and see how its done.
Ok, I see this at the beginning of the Raptor Farm cycle:
Code:
If CountFreeSlots() < 4 and GetChecked ($CBX_StoreUNID_Golds) Then
StoreGolds()
EndIf
So we know that the gold drop are not often so lets change the amount of spaces left before storing golds from "4" down to "2". Also, we do not have a button or option to store golds so lets delete GetChecked ($CBX_StoreUNID_Golds and make it look like this:
Code:
If CountFreeSlots() < 2 Then
StoreGolds()
EndIf
We will place it at the beginning of the cycle in our Byzzr Bot right after it uses chocolate bunnies so we will have some speed if selected.
Next, we need this function that we are declaring: StoreGolds(). Again we search the Raptor Bot and find it. To find it quickly, I highlight it in AutoIt and then go top left to "Search" and then "Find".
Code:
Func StoreGolds()
Out("Storing Golds")
Local $AITEM, $lItem, $m, $Q, $r, $lbag, $SLOT, $FULL, $NSLOT
For $i = 1 To 4
$lbag = GetBag($i)
For $j = 1 To DllStructGetData($lbag, 'Slots')
$AITEM = GetItemBySlot($lbag, $j)
If DllStructGetData($AITEM, "ID") = 0 Then ContinueLoop
$m = DllStructGetData($AITEM, "ModelID")
$r = GetRarity($lItem)
If CanStoreGolds($AITEM) Then
Do
For $BAG = 8 To 12
$SLOT = FindEmptySlot($BAG)
$SLOT = [MENTION=368499]Extended[/MENTION]
If $SLOT <> 0 Then
$FULL = False
$NSLOT = $SLOT
ExitLoop 2
Else
$FULL = True
EndIf
Sleep(400)
Next
Until $FULL = True
If $FULL = False Then
MoveItem($AITEM, $BAG, $NSLOT)
Sleep(GetPing() + 500)
EndIf
EndIf
Next
Next
EndFunc ;==>StoreGolds
I already know that this code calls more functions that are not original to the Byzzr Bot and so its not going to be that simple but I go ahead and attempt to run it so I can see the error codes and know what other functions I might be missing.
I get a flag for: CanStoreGold, FindEmptySlot, and CountFreeSlots so I cut and paste them from Raptor and put them at the bottom of the Byzzr Bot. I also organize them together and make some comments like "#Region Store Items" so that in the future if I need to cut and paste into another script I can quickly and easily do so.
Code:
#Region Store Items
Func StoreGolds()
Out("Storing Golds")
Local $AITEM, $lItem, $m, $Q, $r, $lbag, $SLOT, $FULL, $NSLOT
For $i = 1 To 4
$lbag = GetBag($i)
For $j = 1 To DllStructGetData($lbag, 'Slots')
$AITEM = GetItemBySlot($lbag, $j)
If DllStructGetData($AITEM, "ID") = 0 Then ContinueLoop
$m = DllStructGetData($AITEM, "ModelID")
$r = GetRarity($lItem)
If CanStoreGolds($AITEM) Then
Do
For $BAG = 8 To 12
$SLOT = FindEmptySlot($BAG)
$SLOT = [MENTION=368499]Extended[/MENTION]
If $SLOT <> 0 Then
$FULL = False
$NSLOT = $SLOT
ExitLoop 2
Else
$FULL = True
EndIf
Sleep(400)
Next
Until $FULL = True
If $FULL = False Then
MoveItem($AITEM, $BAG, $NSLOT)
Sleep(GetPing() + 500)
EndIf
EndIf
Next
Next
EndFunc ;==>StoreGolds
Func CountFreeSlots()
Local $temp = 0
Local $bag
$bag = GetBag(1)
$temp += DllStructGetData($bag, 'slots') - DllStructGetData($bag, 'ItemsCount')
$bag = GetBag(2)
$temp += DllStructGetData($bag, 'slots') - DllStructGetData($bag, 'ItemsCount')
$bag = GetBag(3)
$temp += DllStructGetData($bag, 'slots') - DllStructGetData($bag, 'ItemsCount')
Return $temp
EndFunc
Func CanStoreGolds($AITEM)
Local $m = DllStructGetData($AITEM, "ModelID")
Local $r = GetRarity($AITEM)
Switch $r
Case $RARITY_GOLD
If $m = 22280 Then
Return False
Else
Return True
EndIf
EndSwitch
EndFunc ;==>CanStoreGolds
Func FindEmptySlot($bagIndex)
Local $LITEMINFO, $aslot
For $aslot = 1 To DllStructGetData(GetBag($bagIndex), "Slots")
Sleep(40)
$LITEMINFO = GetItemBySlot($bagIndex, $aslot)
If DllStructGetData($LITEMINFO, "ID") = 0 Then
SetExtended($aslot)
ExitLoop
EndIf
Next
Return 0
EndFunc ;==>FindEmptySlot
#EndRegion Store Items
Now I just test. I always make sure to test many times and over a long time to ensure stability and no typo errors. To start I am just going to go to my chest and fill my entire inventory with gold items and start the script.
Ok, works. Seems to lag a bit and some items seem to take up to 8 seconds to transfer but that could be because of my lag. No worries, its working. Now I am curious if it will work without having to go to Xunlai Chest and open. Testing....
Ok! Great! We are now able to deposit gold items into the chest without having to move over to it and open it. This will save time.
Quote:
Originally Posted by gabe4628
I have several observations/comments/notes
2. The bot recasts scourge healing instead of spamming necrosis, even and necrosis should do the job anyway.
|
Cast Engines are extremely important for obvious reasons. You have to tailor your cast sequence to the best possible solution for your specific needs. Lets look at the Byzzr Bot casting starting with the first skill. I first search the cast function: Func Cast()
Here is the first skill called:
Code:
;~ Awaken The Blood
If CanUseSkill(1, 10) Then
UseSkill(1, $mSelfID)
UseSkill(2, $Byzzr)
Return True
EndIf
So here we see that it checks to see if you can use the skill "CanUseSkill" and then we see (1,10). "1" = first skill in your skill bar and "10" = the amount of energy needed.
Then you see UseSkill(1, $myselfID) which just means use the first skill on skill bar and $myselfID just means to target yourself because the skill is a self buff.
We also see that it automatically casts the 2nd skill (Spoil Victor) also when the first skill is triggered: UseSkill(2, $Byzzr) also notice that this skill and any other skills that target Byzzr are called with $Byzzr. I dont think this is the best way to do this because the very next thing in the cast is:
Code:
;~ Spoil Victor
If CanUseSkill(2, 10) Then
UseSkill(2, $Byzzr)
Return True
EndIf
I might delete one of these Spoil Victor casts because I do not think both are needed.
Lets look at the next skill #3:
Code:
;~ Price of Failure
If GetHasHex($Byzzr) Then
If CanUseSkill(3, 15) Then
UseSkill(3, $Byzzr)
Return True
EndIf
EndIf
This one is interesting because here you see that the skill checks to see if the target has a hex and if so then it uses the skill if no hex then it skips this skill.
Next Skill #4
Code:
;~ Rip Enchantment
If CanUseSkill(4, 5) Then
If GetIsEnchanted($Byzzr) Then
UseSkill(4, $Byzzr)
Return True
EndIf
EndIf
And now we see it checks for Enchant before using to maximize the effect of the skill. If no enchant then it skips this skill.
Next Skill #5
Code:
;~ Necrosis
If CanUseSkill(6, 5) Then
If GetHasCondition($Byzzr) Or GetHasHex($Byzzr) And GetEnergy() > 15 Then
UseSkill(6, $Byzzr)
Return True
EndIf
EndIf
Ok, look carefully at this skill, "Necrosis". Here you see that it is identified as skill 6,5 meaning it is skill#6 and needs 5 energy to cast but the next line has an error. It checks for condition, or Hex but then says GetEnergy 15. Why 15? This is the mistake that keeps it from spamming correctly. Change 15 down to 5 and this will fix it.
The next skill in the sequence is "Scourge Healing"
Code:
;~ Scourge Healing
If CanUseSkill(5, 10) Then
UseSkill(5, $Byzzr)
Return True
EndIf
After some thought and after another scripter SavSuds pointed out, this is not really the best skill for this. If you change this for another blood or curse skill then you can increase the attribute points and do more damage. Try changing Scourge Healing to something like Strip Enchantment or something with more damage.
Code:
;~ Strip Enchantment
If CanUseSkill(5, 10) Then
UseSkill(5, $Byzzr)
Return True
EndIf
so now I am going to test and see how it performs.
Ok! Working better!
Quote:
Originally Posted by gabe4628
3. If the bot doesn't have enough energy it won't wait for it to use corpse teleport even when there are drops to be picked up. Instead it just restarts the run.
|
Ok, then try this technique. Keep your weapon set and -50 Cesta in weapon slot-1. In weapon slot-2 put a high energy staff. Then look at the script to see where you would need energy, which is just after you kill Byzzr and write:
Code:
ChangeWeaponSet(2)
Sleep(100)
This will swap weapons and then cast Necrotic Traversal. Dont forget to swap back to your other weapon set before your next run:
Code:
ChangeWeaponSet(1)
Sleep(100)
Quote:
Originally Posted by gabe4628
4. The aforementioned tiger glitch. I haven't seen the tiger, but I did notice the bot getting completely stuck around the shrine.
|
Ok, this is a simple fix. Simply use a bot developer that shows you coordinates. There are several already posted on this site and I think at least one on this thread. Load it up and run your char around the area where it gets stuck to make new check points.
For me, I changed the beginning check points to go a little wider away from the edge of the cliff, especially where this a point that sticks out and sometimes the pet tiger pushes the bot into it and it gets stuck:
Code:
Func MoveToFarmSpot()
Out("Running to Safe Spot")
Move(-6972, 2976) ;New, Avoid Tiger
If GetChecked ($Use_Alch) Then
Drink_Shamrock_Ale()
UseSkill(7,$mSelfID)
Out("Sprinting!")
EndIf
MoveTo(-7648, 4091) ;New, Avoid Tiger
MoveTo(-7533, 4295) ;New, Avoid Tiger
MoveTo(-7442, 4792) ;New, Avoid Tiger
MoveTo(-7651, 5101) ;New, Avoid Tiger
MoveTo(-8563, 5201) ;New, Avoid Tiger
;MoveTo(-8850, 5064) ;Old Delete
;MoveTo(-10856, 8031) ;Old Delete
MoveTo(-11456, 8896)
$Byzzr = GetAgentByName("Byzzr Wingmender")
Out("Byzzr Wingmender")
ChangeTarget($Byzzr)
RndSleep(400)
If GUICtrlRead($cbxStone) = $GUI_CHECKED Then
$Legionaire = GetItemByModelID(37810)
UseItem($Legionaire)
KillBoss()
Else
KillBoss()
EndIf
EndFunc ;==>RuntoSafespot
Quote:
Originally Posted by gabe4628
5. I use a +5e sword and -50 cesta, not sure whether high ene staff was supposed to be put in a specific weapon set, either way I don't use high energy staff, so maybe that's the reason why I have the problems in points 2. and 3.
|
As mentioned before, try using ChangeWeaponSet to resolve this issue.
Quote:
Originally Posted by gabe4628
6. That drunken master could work even without alcohol, 15% is better than nothing, and that slot where prot spirit is, is useless anyway, since the hexes and necrosis should do the job anyway.
|
For Drunken Master, it was an easy solution for me and helps me to get rid of some alcohol and work on drunk title but you can even change this and do it like Raptor Farm and take a paragon hero with you to use speed boost and then flag hero away. This will free up a skill slot for you to spike Byzzr Faster. Also, I agree that prot spirit is useless. Change it out with another damage skill and ensure cast engine is modified to use it.