ScriptUO
Official ScriptUO EasyUO Scripts => Script Debug => Topic started by: The Ghost on May 11, 2014, 08:27:32 AM
-
Hello
I try to post under the original forum but since it be inactive I will here as well.
(http://www.scriptuo.com/index.php?topic=7538.150)
Required some assistance with a small addition. While some of my guild mate are hunting with Pet, so I decided to add a #FindRep . I no lounger attack guild mate pet, but the attack monster part doesn't work as well anymore. it since to ignore a few from time to time. I can do Riktor ok but Baracoon won't work. I have try multiple version and this was the best working build. Dis I miss something or my logic isn't there. THx the help.
set %monster AV_EN_JD_VGB_CB_IS_HS_AB_GJ_CD_DF_AE_AAB_DN_HBB_UAB_TAB_XO_ZO_SO_NO_VC_DB_Q_ED_UM_IAB_CAB_AAB_OI_JZ_XZ_QGB_BD_KQB_CJ_FZ_DN_II_WI_TI_YD_WD_NI_EB_VI_R_XF_VE_IE_OE_HE_LD_BI_RB_UB_GB_LB_FB_CI_QE_AE_DE_FE_AB_QF_XE_YE_X_DI_GJ_W_BE_UC_UD_YH_N_HI_UE_SD_K_J_U_HD_PD_EJ_UI_QO_EAB_TO_PO_XI_UZ_KH_KAB_SZ_FD_MB_AC_IZ_DD_NE_VE_MO_TZ_LD_OE_WH_XI_SH_SC_EF_NB_RC_PB_KHB_UGB_T_CHB_BHB_NE_FD_YO_OTB
set %friend 2 ; What #Findreps to spare.
sub attackMob
set %target %monster
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 ( %useLS = #true ) && ( #mana > 25 ) && ( %spellTimer < #scnt2 )
gosub execLS
if #findCnt = 2 && ( %useMS = #true ) && ( #mana > 25 ) && ( %spellTimer < #scnt2 )
gosub execMS
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 #FindRep notin %friend ; Only attack if it is not a "bad one".
{
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
}
}
else ; If it a bad one then i ignore it for further run
{
ignoreitem #FindRep
}
}
return
-
Take a deeper look.
if #FINDKIND = -1 4
finditem %target
set %attack #findid
set #LTARGETID %attack
event macro 27 0
-
set %target %monster
finditem %target G_1
You have a redundancy here. Just do Finditem %Monster G_1
Here is where your issue is
else ; If it a bad one then i ignore it for further run
{
ignoreitem #FindRep <- You are Ingoring the Rep, you need to ignore the #Findid
}
Also Do away with
if #FINDKIND = -1 4
finditem %target
set %attack #findid
set #LTARGETID %attack
event macro 27 0
It works, but its ugly :P ahahahahaha
if #Findkind = -1 ; if #Findcnt > 0 looks much prettier than #Findkind = -1, but To each their own.
{
;finditem %target <- Commented this line out because it is also redundant, you have already found the monster in question
set %attack #findid
set #LTARGETID %attack
event macro 27 0
}
-
Thx, forget to remove that set Target after I move the list to the top.
Did some deep search and found some answer and come up with this
since to work for now, still required to perform more testing.
sub attackMob
finditem %monster G_1
if #findCnt > 0
{
if #findrep = 1 || #findrep = 2
ignoreitem #Findid
{
if #findCnt > 1 && ( %useLS = #true ) && ( #mana < 25 ) && ( %spellTimer < #scnt2 )
gosub execMS
bla bla
return