ScriptUO

Official ScriptUO EasyUO Scripts => Scripting Chat => Topic started by: warrenotto on September 03, 2013, 07:54:48 PM

Title: Need help with my first script ever
Post by: warrenotto on September 03, 2013, 07:54:48 PM
Super simple script i made to cast consecrate weapon every 10 seconds so i can loop it separate from my razor targeting macro.

anyways basically what i want it to do is cast consecrate weapon on a loop with a hotkey to turn it on and off. heres what i pulled together so far. just cant figure out how to make it loop:

onHotKey 0
   gosub hotkey

sub hotkey
{
event macro 15 203
wait 150
return sub hotkey


Title: Re: Need help with my first script ever
Post by: dxrom on September 04, 2013, 05:23:05 AM
Code: [Select]
set %1 0
set %spellTimer #scnt

repeat
onHotKey 0
  gosub Toggle
if ( ( %1 = 1 ) && %spellTimer < #scnt )
   gosub CWep
  
while #charghost = yes
   wait 10
until #CLICNT = 0

sub Toggle
if %1 = 0
{
   set %1 1
   event sysMessage Casting Enabled!
}
else
{
   set %1 0
   event sysMessage Casting Disabled!
}
return

sub CWep
    event macro 15 203
    set %spelltimer #scnt + 10
    wait 5
return

Should suffice, nothing too fancy. Should be a good grounding to learn from :>
Title: Re: Need help with my first script ever
Post by: warrenotto on September 04, 2013, 09:10:58 AM
Thanks Bud. ill study it a bit tonight and give it a go.

shits kinda fun when you get something to work.  :D

you shoulda seen how excited i got when i hit play on event macro 15 203 and my character responded. lol.

Title: Re: Need help with my first script ever
Post by: The Ghost on September 07, 2013, 08:51:45 AM
Thx dxrom     

 Been trying to get something similar to work.  Without future adieu: good work is reward by more work.
Title: Re: Need help with my first script ever
Post by: dxrom on September 07, 2013, 01:46:00 PM
No problem :>