Author Topic: ZLF =[ How to proced?  (Read 11432 times)

0 Members and 1 Guest are viewing this topic.

Offline HardY-Topic starter

  • Full Member
  • ***
  • Posts: 237
  • Activity:
    0%
  • Reputation Power: 3
  • HardY- has no influence.
  • Gender: Male
  • Respect: +16
  • Referrals: 3
    • View Profile
ZLF =[ How to proced?
« on: November 27, 2011, 07:28:16 PM »
0
can anyone teach me how i use factbandages on pvp they have a coldown, i want use normal bandage until the timer go out, how i need proced?

Actually on my bandage script i use

finditem ZLF C
if ( #findkind = 0 )
{
set #lobjectid #findid
event macro 17 0
target 1s
event macro 23 0

the problem is, i want make a way to use both bandages (faction and normal) at same time, they have the same id, so its a real problem to me.

I thinked in:

display ok Please target your fact band $
set #targcurs 1
finditem #ltargetid
wait 20
set %factID #ltargetid

display ok Please target your band$
set #targcurs 1
finditem #ltargetid
wait 20
set %bandID #ltargetid

but the point is, how i make a timer, for when i will use normal bands and when i can use faction one again.



Offline Cerveza

  • Hacksimus Maximus
  • Scripthack
  • *
  • Posts: 5857
  • Activity:
    0%
  • Reputation Power: 80
  • Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!
  • Gender: Male
  • So... Hows that Hopey-Changey thing working out?
  • Respect: +403
  • Referrals: 11
    • View Profile
Re: ZLF =[ How to proced?
« Reply #1 on: November 27, 2011, 07:51:21 PM »
0
Property them bandaids.
XXXXXXXXXX________________________________________] 20%
I've forgotten more about this game then most people will ever know.
Thank you for controlling your children. Their manners reflect your love for them.
Give a man a fish and you feed him for a day. Don't teach a man to fish, and you feed yourself. He's a grown man. Fishing's not that hard.

Offline Crome969

  • Elite
  • *
  • *
  • Posts: 2098
  • Activity:
    0%
  • Reputation Power: 25
  • Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.
  • Gender: Male
  • UO Enthusiast
  • Respect: +211
  • Referrals: 10
    • View Profile
    • ScriptSDK
Re: ZLF =[ How to proced?
« Reply #2 on: November 27, 2011, 08:12:15 PM »
0
Property them bandaids.
Create 2 Timer, regular Bandages and faction Bandages. Make a loop who first check if time of Faction Bandages is done or not. if done then check Lifepoints, if Lifepoints are hitted then Scan for ZLF, read the Property to select the right Bandages, target yourself and add the "Delay of Factionbandages" on your Factiontimer .Do the Same with your regular bandages\timer

Offline dxrom

  • 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: ZLF =[ How to proced?
« Reply #3 on: November 27, 2011, 09:58:12 PM »
0
I love faction bandaids... I use them on my mages ALOT. (for that remove curse)



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

Offline HardY-Topic starter

  • Full Member
  • ***
  • Posts: 237
  • Activity:
    0%
  • Reputation Power: 3
  • HardY- has no influence.
  • Gender: Male
  • Respect: +16
  • Referrals: 3
    • View Profile
Re: ZLF =[ How to proced?
« Reply #4 on: November 28, 2011, 07:48:16 AM »
0
ok, i'm doing some changes here, have a way to i use finditem #property ? or Find property?

Offline TrailMyx

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13302
  • Activity:
    0.2%
  • Reputation Power: 154
  • TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!
  • Gender: Male
  • Viper!
  • Respect: +1349
  • Referrals: 33
    • View Profile
    • ScriptUO
Re: ZLF =[ How to proced?
« Reply #5 on: November 28, 2011, 07:56:40 AM »
0
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline HardY-Topic starter

  • Full Member
  • ***
  • Posts: 237
  • Activity:
    0%
  • Reputation Power: 3
  • HardY- has no influence.
  • Gender: Male
  • Respect: +16
  • Referrals: 3
    • View Profile
Re: ZLF =[ How to proced?
« Reply #6 on: November 28, 2011, 08:01:55 AM »
0
Check out the docs on EasyUO:

http://wiki.easyuo.com/index.php?title=Event_Property

Ye i'm reading about and google usage of it, i got the problem of the property of bandage change every usage so i fix that way

event Property #findID
set %factband #findstack , #spc , Enchanted , #spc ,
if %factband in #property
{
set #lobjectid #findid
event macro 17 0
target 1s
event macro 23 0
}


:D

Now i need learn to work with #timer =D, i will search about.
« Last Edit: November 28, 2011, 08:27:23 AM by HardY- »

Offline Crome969

  • Elite
  • *
  • *
  • Posts: 2098
  • Activity:
    0%
  • Reputation Power: 25
  • Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.
  • Gender: Male
  • UO Enthusiast
  • Respect: +211
  • Referrals: 10
    • View Profile
    • ScriptSDK
Re: ZLF =[ How to proced?
« Reply #7 on: November 28, 2011, 08:25:36 AM »
0
Code: [Select]
Sub ScanBandages
Finditem ZLF C_ , #backpackID
if #findkind <> -1
{
for #findindex 1 #findcnt
{
event #property
if #scnt < %Factiontimer && Faction in Property && #scnt < %HealingTimer
{
set %Trigger Faction
set %BandageID #findid
Gosub Execute_Bandage
Break
}
elseif #scnt < %HealingTimer && Faction notin #property
{
set %Trigger Regular
set %BandageID #findid
Gosub Execute_Bandage
Break
}
}
}
Return

Sub Execute_Bandage
if #scnt < %Factiontime && %Trigger  = Faction || #scnt < %HealingTimer && %Trigger  =  Regular
{
set #LtargetKind 1
Set #LobjectID  %BandageID
event macro 17
Target 3s
Event macro 23
set %Healingtimer XXX;Here must come your own Code for Healingdelays
IF %Trigger  =  Faction
{
set %Factiontime #scnt + XXX ;Your Factiondelay
}
Set %Trigger = Default
}
Return
Codelogical could be something like this(Iam sorry no full Code, iam totaly out of Easyuo and didnt have the time to test:%).You Minor prior faction Bandages, and then regular.

Offline HardY-Topic starter

  • Full Member
  • ***
  • Posts: 237
  • Activity:
    0%
  • Reputation Power: 3
  • HardY- has no influence.
  • Gender: Male
  • Respect: +16
  • Referrals: 3
    • View Profile
Re: ZLF =[ How to proced?
« Reply #8 on: November 28, 2011, 08:33:17 AM »
0
Code: [Select]
Sub ScanBandages
Finditem ZLF C_ , #backpackID
if #findkind <> -1
{
for #findindex 1 #findcnt
{
event #property
if #scnt < %Factiontimer && Faction in Property && #scnt < %HealingTimer
{
set %Trigger Faction
set %BandageID #findid
Gosub Execute_Bandage
Break
}
elseif #scnt < %HealingTimer && Faction notin #property
{
set %Trigger Regular
set %BandageID #findid
Gosub Execute_Bandage
Break
}
}
}
Return

Sub Execute_Bandage
if #scnt < %Factiontime && %Trigger  = Faction || #scnt < %HealingTimer && %Trigger  =  Regular
{
set #LtargetKind 1
Set #LobjectID  %BandageID
event macro 17
Target 3s
Event macro 23
set %Healingtimer XXX;Here must come your own Code for Healingdelays
IF %Trigger  =  Faction
{
set %Factiontime #scnt + XXX ;Your Factiondelay
}
Set %Trigger = Default
}
Return
Codelogical could be something like this(Iam sorry no full Code, iam totaly out of Easyuo and didnt have the time to test:%).You Minor prior faction Bandages, and then regular.

You had a good idea, but i think it won't will work well, for example i'm trying use scanjournal, to do the script, because fixed healing time, change when you got cursed, or use pots.

I will use your %HealingTimer idea to the faction bandage one, but i think i will still using the journal scannr for base healing.
« Last Edit: November 28, 2011, 08:39:19 AM by HardY- »

Offline Crome969

  • Elite
  • *
  • *
  • Posts: 2098
  • Activity:
    0%
  • Reputation Power: 25
  • Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.
  • Gender: Male
  • UO Enthusiast
  • Respect: +211
  • Referrals: 10
    • View Profile
    • ScriptSDK
Re: ZLF =[ How to proced?
« Reply #9 on: November 28, 2011, 08:39:18 AM »
0
When using Journalscanning you must rebuild the IDEA instead of a Timer for 2 Items, make 1 timer..
When hitting the Trigger in Journal and hits check if Factiontimer is down then apply Faction,refresh Factiontimer, else use regular. Instead of kicking all the time the Timer of faction or not. Kick the Journal and apply the Question when hits && Journal allow to proof the trigger:D

Offline HardY-Topic starter

  • Full Member
  • ***
  • Posts: 237
  • Activity:
    0%
  • Reputation Power: 3
  • HardY- has no influence.
  • Gender: Male
  • Respect: +16
  • Referrals: 3
    • View Profile
Re: ZLF =[ How to proced?
« Reply #10 on: November 28, 2011, 08:43:36 AM »
0
When using Journalscanning you must rebuild the IDEA instead of a Timer for 2 Items, make 1 timer..
When hitting the Trigger in Journal and hits check if Factiontimer is down then apply Faction,refresh Factiontimer, else use regular. Instead of kicking all the time the Timer of faction or not. Kick the Journal and apply the Question when hits && Journal allow to proof the trigger:D

I will try make some changes here, and later i post result, really thanks for the help.

Offline HardY-Topic starter

  • Full Member
  • ***
  • Posts: 237
  • Activity:
    0%
  • Reputation Power: 3
  • HardY- has no influence.
  • Gender: Male
  • Respect: +16
  • Referrals: 3
    • View Profile
Re: ZLF =[ How to proced?
« Reply #11 on: November 28, 2011, 04:15:34 PM »
0
I finished the script, anyone want test? I'm upgrading my a hardy simple heal 1.0 for 2.0, for allow fact bandage i tested it here on atl, it seen work, i created an YES\NO for use or don't use faction bandies.

Code: [Select]
;=========================================================================;
; Script Name: A HardY Simple Bandage Healer                              ;
; Author: A HardY                                                         ;
; Version: 2.0                                                            ;
; Shard OSI/FS: OSI/FS                                                    ;
; Revision Date: 29-nov-2011                                              ;
; Purpose: Auto Heal with bandages using                                  ;
;     Journal timer                                                       ;                                          ;
;=========================================================================;
;You need The statusbar open or it don't work.
;You only need Bands to work, it will search when you lose hp, become bleed,
;and will heal yourself.
;************************
;==========================================================================
;Set Variables
;==========================================================================
set %started You_begin_applying_the_bandages
set %healed You_finish_applying_the_bandages
set %failed You_apply_the_bandages
set %nulled You_heal_what_little_damage_your
set %nodam That_being_is_not_damaged
set %bleed The_bleeding_wounds_have
set %faction Any_curses_on_you_have_been_lifted
set %warnonlow 0
set %warnamount 10
set %Factiontime #scnt
set %Factionbandage NO ; yes / no
;==========================================================================
; Check for Logged in, Status Bar and DMC
;==========================================================================
checkingame:
if ( #cliLogged = 0 )
{
wait 1
goto checkingame
}

if ( DMC notin #opts )
{
display ok ERROR!$
+This script requires "Don't move cursor" enabled!$
+Enable this option in the EasyUO Tools menu and$
+restart the script.$
halt
}
wait 2s
if ( #MAXHITS = N/A )
{
event macro 8 2
}
;==========================================================================
;Start the script
;==========================================================================
start:
wait 1
if ( #hits = #maxhits && c notin #charstatus && #charghost = NO )
{
goto start
}
;==========================================================================
; Death Support
; If dead, wait to be rezzed, then start over.
;==========================================================================
if ( #charghost = YES )
{
stilldead:
if ( #charghost = NO )
{
  goto start
}
wait 1
goto stilldead
}
;==========================================================================
; Begin the act of bandaging self
; If enabled, warn user if low on bandages
;==========================================================================
finditem ZLF C
if #findkind <> -1
{
for #findindex 1 #findcnt
{
if #scnt > %Factiontime && %Factionbandage = YES
{
event Property #findID
set %factband #findstack , #spc , Enchanted , #spc ,
if %factband in #property
 {
  set #lobjectid #findid
  event macro 17 0
  target 1s
  event macro 23 0
  ; set %Factiontime #scnt + 12
 } ; if %factband in #property
} ;if #scnt > %Factiontime
else
{
event Property #findID
set %factband #findstack , #spc , Clean , #spc ,
if %factband in #property
 {
  set #lobjectid #findid
  event macro 17 0
  target 1s
  event macro 23 0
  } ; if %factband in #property
} ; Else
} ; for #findindex 1 #findcnt
} ; if #findkind <> -1
if ( %warnonlow = 1 && %warnamount >= #findstack )
{
  event ExMsg #lobjectID 3 38 Low on bandaids!
}
wait 1
goto didwestart
}
;==========================================================================
; If no bandages found, wait for more to arrive
; If enabled, warn user of no bandages
;==========================================================================
if ( %warnonlow = 1 )
{
event ExMsg #charID 3 38 Out of Bandages!
}

startlooking:
finditem ZLF C
if ( #findkind = 0 )
{
goto start
}
;==========================================================================
; The everpresent check-for-death routine
if ( #charghost = YES )
{
goto start
}
;==========================================================================
wait 1
goto startlooking
;==========================================================================
; Check the journal to ensure we started healing
; #jIndex provides dynamic 1-way searching
;==========================================================================
didwestart:
wait 1
set %jend #jIndex
for %r %jstart %jend
{
scanjournal %r
if ( %started in #journal && :__ notin #journal )
{
  set %failsafe #SCNT + 13
  set %jstart #jIndex
  goto areyoudoneyet
}
}

;==========================================================================
; The everpresent check-for-death routine
if ( #charghost = YES )
{
goto start
}
;==========================================================================

;If we failed to start healing, start over
goto start

;==========================================================================
; Healing started, start checking if we are done healing.
; Search in both directions
;==========================================================================

areyoudoneyet:
set %now #SCNT
;==========================================================================
; The everpresent check-for-death routine
if ( #charghost = YES )
{
goto start
}
;==========================================================================

wait 1
set %jend #jIndex

for %r %jstart %jend
{
scanJournal %r
if ( %faction in #journal )
{
  set %Factiontime #scnt + 14
  if ( : notin #journal )
  {
  goto start
  }
}
if ( %healed in #journal || %failed in #journal || %nulled in #journal || %nodam in #journal || %bleed in #journal )
{
  if ( : notin #journal )
  {
  goto start
  }
}
}
;if we have been healing for more than 12 seconds, break out of the loop.
;added to guard against against possible looping bug
if ( %now > %failsafe )
{
goto start
}
;If not done, keep checking
goto areyoudoneyet
;==========================================================================
; End of File
;==========================================================================

I know the script is a lot confused atm, is because i just "Upgrade" from my old one, but i will start make it more clean.

I don't know why sometimes (rare cases) it try heal on a loop.
« Last Edit: November 28, 2011, 05:08:04 PM by HardY- »

Offline Laptop Heat

  • Jr. Member
  • **
  • Posts: 10
  • Activity:
    0%
  • Reputation Power: 1
  • Laptop Heat has no influence.
  • Respect: +5
  • Referrals: 0
    • View Profile
Re: ZLF =[ How to proced?
« Reply #12 on: November 28, 2011, 08:39:11 PM »
0
Is there a reason no one has mentioned #FINDCOL ?  This is offhand, but it would look something like this?

Finditem ZLF C_ , #backpackID
if #findkind <> -1
{
 for #findindex 1 #findcnt
 {
  if #FINDCOL = XXXX    ; I don't know the faction color offhand
   gosub FactionBandage
  if #FINDCOL = 0       ; Regular bandage
   gosub RegularBandage
 }

}


With Event Property you can easily move too fast if you have any type of lag and get a "$" (default) value meaning your script  will not see the bandage as a faction bandage.  I don't think it's going to make a huge difference in time, but I would bet #findcol is a little faster since you have to do the finditem anyway.

If you do plan on just using the #Property you might want to write in a holding sub to make sure you give the script enough time to update the variable.  It's been a while since I've written, so if something I've suggested isn't correct please correct me. 

Sub WaitForProperty
set %MaxDelay #Scnt + 2
While #Property = $ && %MaxDelay > #Scnt
wait 1
if #Property = $
 return #False
else
 return #True


Does this make sense?


Offline HardY-Topic starter

  • Full Member
  • ***
  • Posts: 237
  • Activity:
    0%
  • Reputation Power: 3
  • HardY- has no influence.
  • Gender: Male
  • Respect: +16
  • Referrals: 3
    • View Profile
Re: ZLF =[ How to proced?
« Reply #13 on: November 28, 2011, 09:04:28 PM »
0
Is there a reason no one has mentioned #FINDCOL ?  This is offhand, but it would look something like this?

Finditem ZLF C_ , #backpackID
if #findkind <> -1
{
 for #findindex 1 #findcnt
 {
  if #FINDCOL = XXXX    ; I don't know the faction color offhand
   gosub FactionBandage
  if #FINDCOL = 0       ; Regular bandage
   gosub RegularBandage
 }

}


With Event Property you can easily move too fast if you have any type of lag and get a "$" (default) value meaning your script  will not see the bandage as a faction bandage.  I don't think it's going to make a huge difference in time, but I would bet #findcol is a little faster since you have to do the finditem anyway.

If you do plan on just using the #Property you might want to write in a holding sub to make sure you give the script enough time to update the variable.  It's been a while since I've written, so if something I've suggested isn't correct please correct me. 

Sub WaitForProperty
set %MaxDelay #Scnt + 2
While #Property = $ && %MaxDelay > #Scnt
wait 1
if #Property = $
 return #False
else
 return #True


Does this make sense?



Why make 2 If findcol, isn't better for the euox make if and else, so it will use regular bands and enhanted(nofact) ones, but i like the idea of findcol

Offline Crome969

  • Elite
  • *
  • *
  • Posts: 2098
  • Activity:
    0%
  • Reputation Power: 25
  • Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.
  • Gender: Male
  • UO Enthusiast
  • Respect: +211
  • Referrals: 10
    • View Profile
    • ScriptSDK
Re: ZLF =[ How to proced?
« Reply #14 on: November 29, 2011, 02:51:23 AM »
0
Is there a reason no one has mentioned #FINDCOL ?  This is offhand, but it would look something like this?

Finditem ZLF C_ , #backpackID
if #findkind <> -1
{
 for #findindex 1 #findcnt
 {
  if #FINDCOL = XXXX    ; I don't know the faction color offhand
   gosub FactionBandage
  if #FINDCOL = 0       ; Regular bandage
   gosub RegularBandage
 }

}


With Event Property you can easily move too fast if you have any type of lag and get a "$" (default) value meaning your script  will not see the bandage as a faction bandage.  I don't think it's going to make a huge difference in time, but I would bet #findcol is a little faster since you have to do the finditem anyway.

If you do plan on just using the #Property you might want to write in a holding sub to make sure you give the script enough time to update the variable.  It's been a while since I've written, so if something I've suggested isn't correct please correct me. 

Sub WaitForProperty
set %MaxDelay #Scnt + 2
While #Property = $ && %MaxDelay > #Scnt
wait 1
if #Property = $
 return #False
else
 return #True


Does this make sense?



Findcol means you havnt coloured regular bandages, else you may could have a problem;)

Tags: