Author Topic: Attack script issues.  (Read 8033 times)

0 Members and 1 Guest are viewing this topic.

Offline dxromTopic starter

  • Master of the milestones!
  • Elite
  • *
  • *
  • Posts: 1080
  • Activity:
    0%
  • Reputation Power: 15
  • dxrom is working their way up.dxrom is working their way up.dxrom is working their way up.
  • KEYBOARD COWBOY, GREAT SAMURAI OF THE INTERNET.
  • Respect: +100
  • Referrals: 1
    • View Profile
Re: Attack script issues.
« Reply #15 on: February 03, 2012, 02:10:59 PM »
0
The easiest thing would be to look at the CLAw and see how I do it in there.  I'm at work now so I can't really be more verbose, but I'll try and make another post later with more details.

Yep yep... I've been digging through it and any other loot script I come across trying to code up a method for it.



 ​_██​_
(ಠ​_ృ)
I do say, ol' Chap! Come play EVE Online! Why here is a 21 Day Free Trial!

Offline manwinc

  • Elite
  • *
  • *
  • Posts: 2556
  • Activity:
    0%
  • Reputation Power: 32
  • manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!
  • Gender: Male
  • "The Devs Hard at Work"
  • Respect: +123
  • Referrals: 1
    • View Profile
Re: Attack script issues.
« Reply #16 on: February 03, 2012, 02:35:50 PM »
0
Hmm?? This is definitely a strange occurrence. (Not to mention my cat liking to sleep on my arm while I am typing)

I seem to remember a similar instance happening when I wrote a bull tamer, character would spam trying to tame its dead body like a silly necromancer.

I'll try and get one of my old attack scripts up and running and let you know if I notice the issue happening. I didn't see any countermeasures in my Code like I would of Expected.

Maybe try checking to see if the TYPE is still the Same for the Monster? Maybe it saves the ID, but changes to a different type as its falling.


Another Method, Probably a better one, is to not care what the ID for the Monster is except when just performing the attack macro. In other words, stay away from Loops that require the #Findcnt for the target to go to 0. 

while #true
{
Check for Monsters in the Area through Type
if Monsters in Area
{
Locate Nearest
Move to Target
Attack Target
Perform specials/Casting
}
if Monsters Notin Area and Corspes In Area
Loot
if Monsters notin Area and Corpses Notin Area
Run Rail
}

That loop "Setup" right there should make it so you move to the closest target, and since you are on top of it, you will continue to destroy it until its no more. or until it invises, and you run away like a little girl, only to return later for round 2.
 

 

Monkeys and Typewriters!

" Oh I know, We'll make a Boss Encounter that requires 3 keys per player to enter, Then we'll make it not a closed instance so you never know if you are going to pop into a fresh room or a boss that has 1% Health left with 20 dudes smashing its face in, wasting your time and effort"

Offline dxromTopic starter

  • Master of the milestones!
  • Elite
  • *
  • *
  • Posts: 1080
  • Activity:
    0%
  • Reputation Power: 15
  • dxrom is working their way up.dxrom is working their way up.dxrom is working their way up.
  • KEYBOARD COWBOY, GREAT SAMURAI OF THE INTERNET.
  • Respect: +100
  • Referrals: 1
    • View Profile
Re: Attack script issues.
« Reply #17 on: February 03, 2012, 02:48:24 PM »
0
Working with the types is something I've been beating my head against the table trying to do, but haven't found anything within the EUO documentation that sufficiently allows me to do it.



 ​_██​_
(ಠ​_ృ)
I do say, ol' Chap! Come play EVE Online! Why here is a 21 Day Free Trial!

Offline manwinc

  • Elite
  • *
  • *
  • Posts: 2556
  • Activity:
    0%
  • Reputation Power: 32
  • manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!
  • Gender: Male
  • "The Devs Hard at Work"
  • Respect: +123
  • Referrals: 1
    • View Profile
Re: Attack script issues.
« Reply #18 on: February 03, 2012, 02:50:50 PM »
0
Hmm.... Maybe I'm Misunderstanding. I thought the Script was something that you set up the types for what you want to attack.

Set %Bad_Guys XX_XX_XX_XX_XX_XX_XX

And then as you run around the script auto attacks/moves/Performs the Tasks necessary to kill the target.
Monkeys and Typewriters!

" Oh I know, We'll make a Boss Encounter that requires 3 keys per player to enter, Then we'll make it not a closed instance so you never know if you are going to pop into a fresh room or a boss that has 1% Health left with 20 dudes smashing its face in, wasting your time and effort"

Offline dxromTopic starter

  • Master of the milestones!
  • Elite
  • *
  • *
  • Posts: 1080
  • Activity:
    0%
  • Reputation Power: 15
  • dxrom is working their way up.dxrom is working their way up.dxrom is working their way up.
  • KEYBOARD COWBOY, GREAT SAMURAI OF THE INTERNET.
  • Respect: +100
  • Referrals: 1
    • View Profile
Re: Attack script issues.
« Reply #19 on: February 03, 2012, 03:12:13 PM »
0
You are correct, it is that kind of script.

The the issue I am having is that when monsters start to die, the script still thinks they are there, and attempts to regard them as such. Even though they are corpses.



 ​_██​_
(ಠ​_ృ)
I do say, ol' Chap! Come play EVE Online! Why here is a 21 Day Free Trial!

Offline manwinc

  • Elite
  • *
  • *
  • Posts: 2556
  • Activity:
    0%
  • Reputation Power: 32
  • manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!
  • Gender: Male
  • "The Devs Hard at Work"
  • Respect: +123
  • Referrals: 1
    • View Profile
Re: Attack script issues.
« Reply #20 on: February 03, 2012, 03:26:51 PM »
0
From Lame 3.0 in the sub AttackMOb


Code: [Select]
sub attackMob
set %target FZ_DN_II_WI_TI_YD_WD_NI_EB_VI_NI_R_XF_VE_IE_OE_HE_LD_BI_RB_UB_GB_LB_FB_CI_QE_AE_DE_FE_AB_QF_XE_YE_X_DF_CD_DI_W_BE_UC_UD_YH_N_FD_HI_UE_SD_K_J_U_HD_PD_EJ_UI_QO_EAB_TO_PO_XI_UZ_KH_KAB_SZ_FD_MB_AC_IZ_XU_DF_DD_NE_VE_MO_TZ_LD_CI_OE_WH_XI_SH_SC_EF_NB_RC_PB_UGB_KHB_T_CHB_BHB_NE_FD_YO_QO_EAB_TO_PO_XI_UZ_KH

;; Oaks:: WH_XI_SH_SC_EF_NB_RC_PB :: Pixies, Shadow Wisps, Kirins, Unicorns
;; Mephitis:: UE_SD_K_J_U_HD_PD_EJ_UI  :: Scorpions, Giant Spiders, Terathan Warriors, Terathan Drones, Dread spiders, Matriarch, Avengers, PEs
;; Niera:: II_WI_TI_YD_WD_NI_EB_VI_NI_R :: Mummies, Skeletal Knights, Wraiths, Spectres
;; Semidar:: W_BE_UC_UD_YH_N_FD_HI :: Imps, Mongbats, gargoyles, harpies, burning gargs, stone gargs
;; Rikktor:: QE_AE_DE_FE_AB_QF_XE_YE_X_DF_CD_DI :: Lizardmen, Snakes, Lava lizards, ophidian warriors, Dragons, Ophidian Avengers
;; Baracoon:: XF_VE_IE_OE_HE_LD_BI_RB_UB_GB_LB_FB_CI ::
;; Pet Balls:: PHB :: Solen Queens
;; Evil Mages:: LC_OC :: Evil Mages
;; Lich Lords:: R_EB :: Lich Lords
;; Hythloth Spawn UGB_KHB_T_CHB_BHB_NE_FD_YO
;; New Deceit _QO_EAB_TO_PO_XI_UZ_KH

finditem %target G_1
if #findCnt > 0
{
if #findCnt > 1 && ( %useLS = #true ) && ( #mana < 25 ) && ( %spellTimer < #scnt2 )
   gosub execMS
if #findCnt < 2 && ( %useLS = #true ) && ( #mana < 25 ) && ( %spellTimer < #scnt2 )
   gosub execLS
if ( %usePrimary = #true ) &&  ( #mana > 25 ) && ( %spellTimer < #scnt2 )
   gosub execPrim
if ( %useSecondary = #true ) && ( #mana > 25 ) && ( %spellTimer < #scnt2 )
   gosub execSec
Call ScanBuffBar
set %ConWep _ConsecrateWeapon_ in %BuffBarIconNames
if ( %castConWep = #true ) && ( %ConWep = #false ) &&  ( #mana > 10 ) && ( %spellTimer < #scnt2 )
   gosub castCon
set %EOO _EnemyOfOne_ in %BuffBarIconNames
if ( %castEOO = #true ) && ( %EOO = #false ) &&  ( #mana > 10 ) && ( %spellTimer < #scnt2 )
   gosub enemyOfOne
}
if #FINDKIND = -1 4
finditem %target
set %attack #findid
set #LTARGETID %attack
event macro 27 0

if #findid <> %attack
{
set %attack #findid
set #LTARGETID %attack
event macro 27 0
}
return

First Problem. #Findkind is for Checking if an object is in a container or not. Don't use it when looking at objects on the Ground already.

Code: [Select]
if #FINDKIND = -1 4
finditem %target
set %attack #findid
set #LTARGETID %attack
event macro 27 0

Change that to This, And then DROP the Part where you check for if #Findid <> %Attack, and add in a small Wait timer in between attacking.

Code: [Select]
if #Findcnt > 0
{
set #ltargetid #Findid
Event macro 27 0
Wait 5
}

That should solve all your problems.

Monkeys and Typewriters!

" Oh I know, We'll make a Boss Encounter that requires 3 keys per player to enter, Then we'll make it not a closed instance so you never know if you are going to pop into a fresh room or a boss that has 1% Health left with 20 dudes smashing its face in, wasting your time and effort"

Offline dxromTopic starter

  • Master of the milestones!
  • Elite
  • *
  • *
  • Posts: 1080
  • Activity:
    0%
  • Reputation Power: 15
  • dxrom is working their way up.dxrom is working their way up.dxrom is working their way up.
  • KEYBOARD COWBOY, GREAT SAMURAI OF THE INTERNET.
  • Respect: +100
  • Referrals: 1
    • View Profile
Re: Attack script issues.
« Reply #21 on: February 03, 2012, 03:37:06 PM »
0
The problem isn't it trying to attack though, it's that it's improperly using the spells/abilities on top of the corpse of a monster.

For example, I have an AI weapon in my hand, There are two monsters, As the script kills one with AIs, it uses Momentum strike (instead of lightning strike) because there are TWO (or more) monsters there. Once the first one is dead, it then switches to the next monster and proceeds to kill it with AIs, however instead of using Lightning Strike, it attempts to Momentum strike because the corpse of the previous one is right next to me, and it is ready that corpse.

Also when all things are dead, and I am looting, it counts the corpses as there still, and casts spells like Consc wep, EOO, etc.



 ​_██​_
(ಠ​_ృ)
I do say, ol' Chap! Come play EVE Online! Why here is a 21 Day Free Trial!

Offline dxromTopic starter

  • Master of the milestones!
  • Elite
  • *
  • *
  • Posts: 1080
  • Activity:
    0%
  • Reputation Power: 15
  • dxrom is working their way up.dxrom is working their way up.dxrom is working their way up.
  • KEYBOARD COWBOY, GREAT SAMURAI OF THE INTERNET.
  • Respect: +100
  • Referrals: 1
    • View Profile
Re: Attack script issues.
« Reply #22 on: February 03, 2012, 07:59:48 PM »
0
Alright... Time for another go at this.. Now that I've got some rum in my system.

I'll post progress :>



 ​_██​_
(ಠ​_ృ)
I do say, ol' Chap! Come play EVE Online! Why here is a 21 Day Free Trial!

Offline manwinc

  • Elite
  • *
  • *
  • Posts: 2556
  • Activity:
    0%
  • Reputation Power: 32
  • manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!
  • Gender: Male
  • "The Devs Hard at Work"
  • Respect: +123
  • Referrals: 1
    • View Profile
Re: Attack script issues.
« Reply #23 on: February 03, 2012, 08:50:53 PM »
0
Tee Hee, I think I know what your problem is, and its probably much more Simple than you Think.

Try putting this at the Top of your Script


Ignoreitem #Charid

I think its locating you as one of the Monsters

XU is a type for a Male Elf. And is in the types you wish to attack :P

Hoping its that Simple....
Monkeys and Typewriters!

" Oh I know, We'll make a Boss Encounter that requires 3 keys per player to enter, Then we'll make it not a closed instance so you never know if you are going to pop into a fresh room or a boss that has 1% Health left with 20 dudes smashing its face in, wasting your time and effort"

Offline dxromTopic starter

  • Master of the milestones!
  • Elite
  • *
  • *
  • Posts: 1080
  • Activity:
    0%
  • Reputation Power: 15
  • dxrom is working their way up.dxrom is working their way up.dxrom is working their way up.
  • KEYBOARD COWBOY, GREAT SAMURAI OF THE INTERNET.
  • Respect: +100
  • Referrals: 1
    • View Profile
Re: Attack script issues.
« Reply #24 on: February 03, 2012, 09:05:00 PM »
0
Tee Hee, I think I know what your problem is, and its probably much more Simple than you Think.

Try putting this at the Top of your Script


Ignoreitem #Charid

I think its locating you as one of the Monsters

XU is a type for a Male Elf. And is in the types you wish to attack :P

Hoping its that Simple....

Negative, I've tried this already unfortunately... Also tried making sure my swampy wasn't the issue...

But I can literally, kill something, Move away from it's corpse and the script wont cast anything (which it should do, since nothing is around) and then run on top of the corpse, and it will act as if the corpse is a mob and do it's thing. >.<

I had something working fairly well, and couldn't get it to attack though, but I didn't save and my laptop died :X

Which made me need to take a breather, rofl.



 ​_██​_
(ಠ​_ృ)
I do say, ol' Chap! Come play EVE Online! Why here is a 21 Day Free Trial!

Offline manwinc

  • Elite
  • *
  • *
  • Posts: 2556
  • Activity:
    0%
  • Reputation Power: 32
  • manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!
  • Gender: Male
  • "The Devs Hard at Work"
  • Respect: +123
  • Referrals: 1
    • View Profile
Re: Attack script issues.
« Reply #25 on: February 03, 2012, 10:08:29 PM »
0
Ouch...

I mean, from the looks of it, what you run is very Similar to the Attack portion of the Army, And I've never noticed an issue with Corpses like that though.... They always Perform the Right Special Based on Number of targets.
Monkeys and Typewriters!

" Oh I know, We'll make a Boss Encounter that requires 3 keys per player to enter, Then we'll make it not a closed instance so you never know if you are going to pop into a fresh room or a boss that has 1% Health left with 20 dudes smashing its face in, wasting your time and effort"

Offline manwinc

  • Elite
  • *
  • *
  • Posts: 2556
  • Activity:
    0%
  • Reputation Power: 32
  • manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!
  • Gender: Male
  • "The Devs Hard at Work"
  • Respect: +123
  • Referrals: 1
    • View Profile
Re: Attack script issues.
« Reply #26 on: February 03, 2012, 10:12:38 PM »
0
I'll give it a whirl here in a few and see if I can "Step" into the Script to see just whats going on.
Monkeys and Typewriters!

" Oh I know, We'll make a Boss Encounter that requires 3 keys per player to enter, Then we'll make it not a closed instance so you never know if you are going to pop into a fresh room or a boss that has 1% Health left with 20 dudes smashing its face in, wasting your time and effort"

Offline dxromTopic starter

  • Master of the milestones!
  • Elite
  • *
  • *
  • Posts: 1080
  • Activity:
    0%
  • Reputation Power: 15
  • dxrom is working their way up.dxrom is working their way up.dxrom is working their way up.
  • KEYBOARD COWBOY, GREAT SAMURAI OF THE INTERNET.
  • Respect: +100
  • Referrals: 1
    • View Profile
Re: Attack script issues.
« Reply #27 on: February 03, 2012, 10:30:28 PM »
0
Yeah... I really like that EUO has those options... but I really dislike the quality of it... Breakpoints would be awesome :>



 ​_██​_
(ಠ​_ృ)
I do say, ol' Chap! Come play EVE Online! Why here is a 21 Day Free Trial!

Offline dxromTopic starter

  • Master of the milestones!
  • Elite
  • *
  • *
  • Posts: 1080
  • Activity:
    0%
  • Reputation Power: 15
  • dxrom is working their way up.dxrom is working their way up.dxrom is working their way up.
  • KEYBOARD COWBOY, GREAT SAMURAI OF THE INTERNET.
  • Respect: +100
  • Referrals: 1
    • View Profile
Re: Attack script issues.
« Reply #28 on: February 05, 2012, 12:30:39 PM »
0
Alright, so I found out the culprit ID of these issues.

The id was XC (Which is the ID for the new ogres in Wrong)

for some reason, some corpses would pickup that SAME ID and the script was tripping over it.

Gonna do some more testing to see if there are more issues like this.



 ​_██​_
(ಠ​_ృ)
I do say, ol' Chap! Come play EVE Online! Why here is a 21 Day Free Trial!

Tags: