Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - razeial

Pages: [1] 2
1
Script Debug / New issue. Need help
« on: September 12, 2014, 08:14:08 AM »
So im writing a pot chugging script. The issue im having is when my character is holding a two handed weapon, the script will not disarm. However, when i step through the script line-by-line, the disarm works. I dont know where the error is.

Code: [Select]
  sub ConsumeItem
    while h in #charstatus || #LLIFTEDKIND = 1
    {
      wait 0
    }
    Finditem %1 C_ , #backpackid
    retry:
    if %1 = ZLF
    {
      event macro 58 0
      goto skip
    }
    gosub TM_AdvJournalSync Apple
    set #lobjectid #findid
    event macro 17 0
    if %1 = CBS
    {
      gosub TM_AdvJournalScan Apple VALID not_strong_enough
      wait 10
      if #result = #TRUE
      {
        goto retry
      }
    }
    if %1 = NUF
    {
     gosub TM_AdvJournalScan Apple VALID free_hand
     wait 10
     if #result = #TRUE && %Disarm = #true
     {
      gosub Disarm
      goto retry
     }
     if %disarm = #false
     {
      event ExMsg #charid 0 2498 Can't use cure pot with two handed weapon!
     }
    if %Disarmed = #true
    {
     set %Disarmed #false
     event macro 37 0
     wait 10
    }
skip:
    wait 10
  return
Code: [Select]
  sub Disarm
  finditem %weapon C_ , #charid
  set %CurWep #findid
  exevent drag %CurWep
  wait 10
  exevent dropc #backpackid
  wait 10
  return

2
Script Debug / Script jumps around randomly
« on: September 11, 2014, 05:03:53 PM »
Hey all, I havent posted here in a long time as I've been on a hiatus. Recently I've been working on a personal script that'll chug pots/tbox/confidence/evasion/aids for me. I've been writing it off and on for a week and have it pretty much done.

My problem is, it doesnt seem to work as intended. When i step through the script line by line, sometimes it'll jump to random points in the script. I feel like it has a lot to with the call ScanBuffBar.txt but im uncertain. Can anyone take a look at see if you see something that I'm over looking? Thanks


3
Script development tools / Raz's Time Getter Sub
« on: August 27, 2012, 06:39:24 PM »
Hey all. I wrote this up to teach myself how to play with separating and combining strings. I'm sure there are subs out there that do this already, but figured I'd share this anyways.

Code: [Select]
;XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
; Script Name: Raz's Time Getter Sub
; Author: Razeial
; Version: 1.0
; Purpose: Gives a value of time in the format of 00:00 AM/PM
;
;Instructions: Place this sub in your script. The variable %time is used for the return value.
;XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
SUB GetTime
set %time #time
if #time < 130000
{
  if #time >= 120000 && #time < 130000
  {
     str left %time 4
     set %time #strres
     str left %time 2
     set %time1 #strres
     str right %time 2
     set %time2 #strres
     set %time %time1 , : , %time2 , #spc , PM
  }
  if #time >= 000000 && #time < 010000
  {
     str right %time 4
     set %time1 #strres
     str left %time1 2
     set %time2 #strres
     set %time 12 , : , %time2 , #spc , AM
     display %time
  }
  if #time < 100000 && #time >= 010000
  {
     str left %time 4
     set %time #strres
     str mid %time 2 3 4
     set %time #strres
     str left %time 1
     set %time1 #strres
     str right %time 2
     set %time2 #strres
     set %time %time1 , : , %time2 , #spc , AM
  }
 if #time < 120000 && #time >= 100000
 {
     str left %time 4
     set %time #strRes
     str left %time 2
     set %time1 #strres
     str right %time 2
     set %time2 #strres
     set %time %time1 , : , %time2 , #spc , AM
 }
}
if #time > 130000
{
  if #time > 195959
  {
    str left %time 4
    set %time #strRes
    str left %time 2
    set %time1 #strres - 12
    str right %time 2
    set %time2 #strres
    set %time %time1 , : , %time2 , #spc , PM
  }
 if #time < 095959 && #time > 120000
  {
    set %time #time - 120000
    str left %time 3
    set %time #strres
    display %time
    str left %time 1
    set %time1 #strres
    str right %time 2
    set %time2 #strres
    set %time %time1 , : , %time2 , #spc , PM
  }
}
return

4
Submit your Script / Raz's (almost) Auto-Snake Charmer
« on: August 26, 2012, 09:58:10 PM »
Here is a simple script for getting Medusa keys a little easier. As many know by now, there seems to be an issue targeting the snake nests, so this script relies on you to do so, but does everything else by itself, except move your character. :) Enjoy

Code: [Select]
;XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
; Script Name: Raz's (almost) Auto Snake Charmer
; Author: Razeial
; Version: 1.0
; Client Tested with: 7.0.27.5
; EUO version tested with: 1.5 v218
; Shard OSI / FS: EA/OSI
; Revision Date: 8/29/2012
; Public Release: 8/26/2012
; Global Variables Used: none
; Purpose: Automates the process for obtaining Keys for the Medusa Peerless
; Instructions: Press Play. You will have to manually target the snake nest as there is an
;               issue with EUO not being able to target them.
;XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
;======================================================
; Setup
;======================================================
if %setup <> #true
{
set %snake QE_JD
set %hole PBN
set %flute RGP_PGP
set #sysmsgcol 32
set %setup #true
}
;======================================================
; Mainloop
;======================================================
mainloop:
finditem %snake G_8
if #findcnt < 1
   goto mainloop
set %targsnake #findid
wait 10
finditem %hole G_8
if #findcnt < 1
   goto mainloop
gosub FindFlute
gosub TargSnake
gosub TargHole
if #result = #false
   goto mainloop
wait 10s
goto mainloop
return
;======================================================
; Sub TargHole
;======================================================
Sub TargHole
if #targcurs = 1
{
 event SysMessage Target the hole
 repeat
 wait 0
 until #targcurs <> 1
)
else
    return #false
return
;======================================================
; Sub TargSnake
;======================================================
Sub TargSnake
set #lobjectid %useflute
set %js #jindex
event macro 17 0
target
set #ltargetid %targsnake
set #ltargetkind 1
event macro 22 0
set %je #jindex
wait 10
for %cantPersuade %js %je
{
 scanjournal %cantPersuade
 if you_dont't_seem in #journal
    gosub TargSnake
 if
}
target
return
;======================================================
; Sub FindFlute
;======================================================
SUB FindFlute
finditem %flute C_ , #backpackid
event Property #findid
if charmer in #property
   set %useflute #findid
else
   {
    ignoreitem #findid
    gosub FindFlute
   }
if #findcnt < 1
   {
    display You have no flutes! Halting!
    halt
   }
return

5
Script Debug / Trouble targeting a ground item
« on: August 24, 2012, 11:13:29 AM »
Hey guys, I wrote this script to make it a bit easier to get keys for Medusa. Everything works perfectly except when it goes to target the snake nest on the ground. I either get a message that target cannot be seen, or it targets a random tile. I cannot get the script to actually target the nest. I've tried to set the #ltargetkind to 1, 2, and 3 to no avail. Anyone have any suggestions?
Code: [Select]
;XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
; Script Name: Raz's Auto-Snake Charmer
; Author: Razeial
; Version: 1.0
; Purpose: Makes getting keys for Medusa easy!
;
;Instructions: Press Play
;
;XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
;======================================================
; Setup
;======================================================
if %setup <> #true
{
set %snake QE_JD
set %hole PBN
set %flute RGP_PGP
set %maxDist 8
set %setup #true
}
;======================================================
; Mainloop
;======================================================
mainloop:
finditem %snake G_8
if #findcnt < 1
   goto mainloop
set %targsnake #findid
wait 10
for %i 0 %maxDist
{
 finditem %hole G_ , %i
 if #findkind <> -1
 {
    event Property #findid
 }
 if nest in #property
 {
    set %targholeid #findid
    break
 }
}
wait 10
gosub FindFlute
gosub TargSnake
gosub TargHole
if #result = #false
   goto mainloop
wait 10s
goto mainloop
return
;======================================================
; Sub TargHole
;======================================================
Sub TargHole
if #targcurs = 1
{
 set %ltargetkind 2
 set #ltargetid %targholeid
 wait 10
 event macro 22 0
)
else
    return #false
return
;======================================================
; Sub TargSnake
;======================================================
Sub TargSnake
set #lobjectid %useflute
set %js #jindex
event macro 17 0
target
set #ltargetid %targsnake
set #ltargetkind 1
event macro 22 0
set %je #jindex
wait 10
for %cantPersuade %js %je
{
 scanjournal %cantPersuade
 if you_dont't_seem in #journal
    gosub TargSnake
 if
}
target
return
;======================================================
; Sub FindFlute
;======================================================
SUB FindFlute
finditem %flute C_ , #backpackid
event Property #findid
if charmer in #property
   set %useflute #findid
else
   {
    ignoreitem #findid
    gosub FindFlute
   }
if #findcnt < 1
   {
    display You have no flutes! Halting!
    halt
   }
return

6
Script Debug / Quick response help needed!
« on: August 20, 2012, 10:40:34 PM »
Hey all. I'm trying to write a script that will buy a particular item from a player vendor but only if it meets a few requirements such as price or charges left. I can't seem to figure out how to make those last two work. I tried maybe using the information in #property but it wont work.

Right now I'm testing this with a barbed kit and this is the code i've come up with

Code: [Select]
mainloop:
finditem %Rkit c_ , %bag
if #findkind = -1
   {
    goto mainloop
   }

if #findcnt => 1
{
 event Property #findid
 if #findcol = 2129
     if Barbed_Runic_Sewing_Kit in #property
         if Uses_Remaining: , #spc , >= 15 in #property
             if Price:_ , #spc , >= %price in #property
                {
                 msg Vendor buy$
                 target 2s
                 set #ltargetid #findid
                 event macro 22 0
                 wait 5
                 click 239 336
                 wait 5
                }
RETURN

Im stuck. Can anyone lend a hand!

7
Character skill advancement / Raz's Disco Trainer
« on: August 13, 2012, 12:18:37 AM »
Quote
;XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX;
; Script Name: Raz's Disco Trainer                                                          ;
; Author: Razeial                                                                           ;
; Version: 1.51                                                                              ;
; Purpose: Trains discordance on animals                                                    ;
; Instructions: Get a bunch of animals and release them where you'd like to train.          ;
;               Make sure you have instruments in your pack!                                ;
;               Script is det by default to stop training at 90 skill                       ;
;               This script assumes you'll be using a 40LMC suit and full FC/FCR            ;
; Credits: Paladin for his ScriptTimer Sub                                                  ;
;XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX;

v1.0 8-13-2012
-Release

v1.5 8-14-2012
-Added the ability to train using Spell Song from 90 to 120.
-Ability to actively meditate


v1.51 8-15-2012
-Minor Tweaks, now checks for log in status

This script will train discordance using two methods. The first can train Discordance up to 120 from 30 simply by discording animals (which you will need to add in the %animal variable). The second method will use Spell Song to train to 120 from 90. It will also ask you if you would like to use Meditation for Spell Song training. YOU MUST have done the Spell Song quest in order to use this method.

8
Character skill advancement / Raz's Chivalry Trainer
« on: August 13, 2012, 12:14:20 AM »
Code: [Select]
;XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX;
; Script Name: Raz's Chivalry Trainer                                                       ;
; Author: Razeial                                                                           ;
; Version: 1.0                                                                              ;
; Purpose: Trains Chivalry                                                                  ;
; Instructions: Adjust where you'd like the script to stop training                         ;                                        ;
; Credits: Paladin for his ScriptTimer Sub
;XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX;

Just a simple script i recently wrote to train Chivalry.

9
Script Debug / Need pathfinding help!
« on: August 08, 2012, 01:31:53 PM »
Removed by request

10
Submit your Script / Raz's Magery Justice Gainer
« on: August 03, 2012, 01:06:19 AM »
I know there are a few justice gainers out there already, some that do multiple skills, but none of them fit my needs, so I wrote this. This script works with magery only. The Auto-Res script was written by Genesis.

Code: [Select]
;XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX;
; Script Name: Raz's Magery Justice Gainer                                                  ;
; Author: Razeial                                                                           ;
; Version: 1.0                                                                              ;
; Purpose: Trains Justice on a mage                                                         ;
; Instructions: Press Play!                                                                 ;
;XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX;
;===========================================================================================;
; SET UP
;===========================================================================================;
set %setup #false
set %PosX #charposx - 1
set %PosY #charposy + 2
;===========================================================================================;
; DO NOT EDIT BELOW THIS LINE                                                               ;
;===========================================================================================;
start:
if %setup = #false
   continue
else
   goto mainloop
menu hideeuo
menu hide
event macro 8 1
event macro 8 2
event macro 8 3
display Target your red.
set #targcurs 1
while #targcurs = 1
      {
       wait 0
      }
set %red #lTargetID
;
mainloop:
finditem %red G_8
if #findcnt < 1
   {
    sound
    display Hey dummy! Where is your red?? Get a red and resume the script!
    pause
    goto mainloop
   }
repeat
if #mana < 23
   {
    repeat
    wait 0
    #enemyhits
    until #mana > 23

   }
set %setup #true
set %jstart #jindex
event macro 15 36
target 5s
event macro 22 0
wait 2s
set %jend #jindex
gosub CheckFizzle1
until #enemyhits = N/A || #enemyhits = < 0
wait 1s
gosub res
wait 420s
goto mainloop
;===================================================================;
;SUB RES                                                            ;
;===================================================================;
SUB res
#enemyhits
wait 5
if #enemyhits <> N/A || #enemyhits >= 0
   goto mainloop
if #mana < 24
   {
    repeat
    wait 0
    until #mana >= 24
   }
set #findid %red
finditem %red
event pathfind #findx #findy #charposz
wait 1s
set %jstart2 #jindex
event macro 15 58
target 5s
event macro 22 0
wait 10
set %jend2 #jindex
wait 10
gosub NoMana
wait 10
gosub CheckFizzle2
wait 10
gosub CheckDead
wait 10
gosub NoGain
wait 10
move %PosX %PosY 0 4s
wait 10
return
;===================================================================;
;SUB NoMana                                                         ;
;===================================================================;
SUB NoMana
scanjournal %NoMana
for %NoMana %jstart2 %jend2
{
 if Insufficient_mana in #journal
    {
      deletejournal
      gosub res
    }
return
;===================================================================;
;SUB NoGain                                                         ;
;===================================================================;
SUB NoGain
for %NoGain %jstart %jend
{
 scanjournal %NoGain
 if You_cannot_gain in #journal
 {
  sound
  display You have reached your maximum level of Justice!
  halt
 }
}
return
;===================================================================;
;SUB CheckFizzle1                                                   ;
;===================================================================;
SUB CheckFizzle1
for %CheckFizzle1 %jstart %jend
{
 scanjournal %CheckFizzle1
 if the_spell_fizzles in #journal
 {
  goto mainloop
 }
}
return
;===================================================================;
;SUB CheckFizzle2                                                   ;
;===================================================================;
SUB CheckFizzle2
for %CheckFizzle2 %jstart2 %jend2
{
 scanjournal %CheckFizzle2
 if the_spell_fizzles in #journal
 {
  gosub res
 }
}
return
;===================================================================;
;SUB CheckDeath                                                 ;
;===================================================================;
SUB CheckDeath
for %CheckDeath %jstart2 %jend2
{
 scanjournal %CheckDeath
 if not_dead in #journal
 {
  goto mainloop
 }
}
return

To use, simply load the auto-res script on to your red, and my script on the character you wish to gain justice, then press play.

If people end up liking this and using it, I may (by request) add other skills to the script. Please rate it!

11
Script Debug / Need help fixing a bug in my script!
« on: July 30, 2012, 08:51:36 PM »
Hey all. I wrote this script and posted it a few weeks ago, but a bug was reported to me that I can't seem to find a work around for. What's happening is if the lightning strike is not successfully delivered (as happens when either the weapon skill or bushido skill is at low level) , the script wont retoggle lightning strike until the lightning strike is successful. Can anyone please help me out??

Code: [Select]
;XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
; Script Name: Raz's Full-Auto Bushido Trainer
; Author: Razeial
; Version: 1.1
; Purpose: Will train bushido to 120 using Lightning Strike on a horse
; (or llama, ostard, etc..}. It will also scan your paperdoll to see if you still have a
; weapon in your hand (ie your previous weapon breaks) and will automatically pull another
; weapon from your backpack and rearm it.
;
; Credits: TrailMyx for his Journal Scanner sub
;
; A VERY special thanks to JustAnotherFace (JAF). Without him, this script would not have
; come together. He took quite a bit of time to review the script, help me edit it, teach
; me along the way, and made more efficient suggestions!
;
;Instructions: The script is set up so that you must have a HORSE to train on.
;              If you want to train on a cat, dog, llama, etc, you need to change the %mount
;              with the corresponding itemtype. If you aren't using Mace Fighting, then you
;              need to change the %weapon to the proper itemtype of whatever weapon you'll be
;              using to train with. You will also need a good deal of that particular weapon
;              in your backpack. I suggest 30 or 40 at a time. You can either craft them or
;              buy them from a blacksmith shop. I also recommend wearing a high Mana Ren and
;              Lower Mana Cost suit (wouldn't hurt to have Mana Inc on it also).
;XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
;===========================================================================================
; SET UP
;===========================================================================================
set %weapon YSF_QOH_ ; ID's the types of weapons - Mace ---- Modify this to whatever weapon type
;                                                      you'll be using to train with
set %ShortDelay 10
set %mount SF_OF_; ID's the types of mounts/animals - Horse ---- Modify this to whatever animal
;                                                     type you'll be using to train with
;============================================================================================
;DO NOT EDIT BELOW THIS LINE
;============================================================================================
;
;
; Start Program
gosub showEUOMEnu1
set #menubutton N/a
MenuLoop:
if #MenuButton = cmdExit
{
  menu hide
  halt
}
if #MenuButton = cmdOK
{
    menu hide
    goto start
}
goto menuloop
start:
menu hideEUO
menu hide
if %setup <> #true
{
continue
}
finditem %mount G_ , 5
wait 10
if #findcnt < 1
{
   sound
   wait 5
   Display You do not have an animal to train with dummy! Go get one!
   halt
}
event macro 6 0
event macro 3 0 All follow me
event macro 3 0 All kill
target
event macro 23 0
;
mainloop:
repeat
gosub TM_AdvJournalSync lightning 100
finditem %weapon C_ , #charid
wait 1
if #findcnt < 1
   gosub rearmwep
wait 5
if %spellsetup <> #true
   gosub ChooseBushidoSpell
wait 5
gosub TrainBushido
until #skill = 1200
if #skillcap = #skill
   {
    sound
    wait 5
    Display CONGRADULATIONS! You've reached your skill cap! Now go kick some ass! :D
    halt
   }
;===================================================================
; REARM WEAPON SUB
;===================================================================
SUB RearmWep
    finditem %weapon C_ , #backpackid
      if #FINDcnt < 1
      {
         sound
         wait 5
         Display You are out of weapons! Go get some more and restart the script!
         halt
      }
    set #RHANDID #findid ; Modify this based on one or two handed weapon
    wait %ShortDelay
    event macro 24 2 ; This is for arming a right handed weapon, if you want to arm a left handed weapon its 24 1
   wait 1s
return
;====================================================================
; BUSHIDO SUBS
;====================================================================
SUB ChooseBushidoSpell
chooseskill bush
if #skill < 500
   {
   display Your Bushido skill is not high enough dummy! Go buy it up to 50!
   halt
   }
if #skill > 500
   {
    set %special 149 ; Lightning Strike
    return
   }
set %spellsetup #true
set %setup #true
return
;
SUB TrainBushido
gosub WaitForMana
Event Macro 15 %special ; Uses Lightning Strike
repeat
gosub TM_AdvJournalScan lightning VALID You_attack_with_lightning_precision
until #RESULT = #TRUE
event macro 8 7 ; This opens your backpack to prevent logging out
;
SUB WaitForMana
if #mana < 6 ; Modify this if you dont have 40% LMC and need more than 6 mana to cast Lightning Strike
  {
   repeat
   wait 0
   until #mana > 6   ; Modify this if you dont have 40% LMC and need more than 6 mana to cast Lightning Strike
  }
return
;=================================================================
; Script Name: TrailMyx's Advanced Journal Scanner
; Author: TrailMyx
; Version: 1.2
; Shard OSI / FS: OSI / FS?
; Revision Date: 10/20/2007
; Purpose:
;   Use these subs to quickly find text in your #journal entries.  These subs
; use #jindex for flawless journal scanning and is much more reliable than using
; standard indexing of #journal and #SYSMSG.
;
;   Now it is possible to manage separate journals based on unrelated text.  It's now possible
; to monitor spellcasting, bandaging, stealing, or anything else without a TM_AdvJournalSync
; potentially removing text needed for another UO funciton.
;
;   New is the ability to either gosub or call these functions without the need to change the
; header!  When calling, a limit of 10 arguments is allowed, but more can be added by editing the
; call interface section.
;
;  Examples:
;     gosub TM_AdvJournalSync speech 100 ; sync "speech" journal space, set #LPC to 100 from default of 1000
;     gosub TM_AdvJournalScan speech VALID Find_this_text and_find_this_too ; will not advance copy of #jindex
;     gosub TM_AdvJournalScan heal VALID_ADVANCE you_heal_what that_patient_is_not ; advances pointer after scan
;     gosub TM_AdvJournalScan spellcast NONE fizzle ; no spam checking and doesn't advance #jindex copy automatically
;
;  Subs included:
;     TM_AdvJournalGetTrigger - retrieve the triggering string (#FALSE for no trigger)
;     TM_AdvJournalSync - Must call this in initialzation
;     TM_AdvJournalScan - see header for details....
;
;  Release history:
;    v1.0 - Initial release.
;    v1.1 - debug code added, fixed small possibility to miss an incoming journal entry
;
;  Requirements:
;    Nothing special
;
;  Credit:
;    If you use these subs, please leave credit for me somewhere in your script header.
;=================================================================
;------------------------  Call interface  -----------------------
;=================================================================

;-------------------------------------------------------------------------------
sub TM_AdvJournalGetTrigger
  namespace push
  namespace local TM_AdvJS_ , %1
  set #RESULT !trigger
  namespace pop
  set !TM_FunctionCalled #TRUE
return #RESULT
;-------------------------------------------------------------------------------
; %1 - Journal Name
; %2 - #LPC setting (optional)
; Brings !_jindex up to the most recent #journal entry
sub TM_AdvJournalSync
  namespace push
  namespace local TM_AdvJS_ , %1
  set !_jindex #jindex + 1
  if %0 > 1
    set !lpc_set %2
  namespace pop
  set !TM_FunctionCalled #TRUE
return
;-------------------------------------------------------------------------------
; %1 - Journal Name
; %2 - NONE, ADVANCE , ( _VALID ) - advances jindex pointer, anything else
; %3, %4, %5, etc strings to match
; returns #TRUE for match, #FALSE for no match
;  Will not advance !_jindex pointer to allow for scanning journal history for more than one search.
;  Also searches for : , #SPC in journal entry to be sure someone isn't spamming the text
;  About %2 arguments:
;    NONE: defaults to basic journal scan (no SPAM checking, no #jindex pointer copy advancing)
;    ADVANCE: no spam checking, advances #jindex copy
;    VALID: invokes SPAM filtering, no advance of #jindex copy
;    VALID_ADVANCE, VALIDADVANCE, ADVANCE_VALID, etc.: invokes SPAM filtering, advances of #jindex copy
sub TM_AdvJournalScan
  namespace push
  namespace local TM_AdvJS_ , %1
  set !args %2
  set !temp_lpc #LPC
  if !lpc_set = N/A
    set #LPC 1000
  else
    set #LPC !lpc_set
  set !num_args %0
  set !first_arg 3
  set !sampled_jindex #JINDEX
  if !_jindex = N/A
    set !_jindex !sampled_jindex
  if !charname = N/A
  {
    set !charname #CHARNAME
AdvJournalScan_loop1:
    str pos !charname #SPC
    if #STRRES <> 0
    {
      set !val #STRRES - 1
      str left !charname !val
      set !left #STRRES
      set !val !val + 1
      str del !charname 1 !val
      set !charname !left , _ , #STRRES
      goto AdvJournalScan_loop1
    }
  }
  set !index !first_arg
  repeat
    set !temp_jindex !_jindex
    set !text % . !index
    while !temp_jindex <= !sampled_jindex
    {
      scanjournal !temp_jindex
      str pos #JOURNAL !charname 1
      set !namepos #STRRES
      str count #JOURNAL !charname
      set !namecnt #STRRES
      str pos #JOURNAL :_ 1
      set !smcpos #STRRES
      str pos #JOURNAL !text 1
      set !textpos #STRRES
      if !textpos < !smcpos && !smcpos <> 0 || !smcpos = 1 || :_ notin #JOURNAL || VALID notin !args
        set !pass #TRUE
      else
        set !pass #FALSE
      if ( !text in #journal && ( ( !namepos = 1 && !namecnt <= 1 ) || !pass ) )
      {
        set !temp_jindex !temp_jindex + 1
        if ADVANCE in !args
          set !_jindex !temp_jindex
        set !trigger !text
        set #LPC !temp_lpc
        namespace pop
        set !TM_FunctionCalled #TRUE
        return #TRUE
      }
      set !temp_jindex !temp_jindex + 1
    }
    set !index !index + 1
  until !index - !first_arg > !num_args - !first_arg
  set %10 !sampled_jindex - !_jindex
  set %10 %1 , _ , %10 ; for debugging purposes
  set #LPC !temp_lpc
  set TM_AdvJournalGetTrigger #FALSE
  namespace pop
  set !TM_FunctionCalled #TRUE
return #FALSE

;--------- EasyUO Menu Designer Code Begin ---------
sub showEUOMenu1
 menu Clear
  menu Window Title Raz's Full-Auto Bushido Trainer
  menu Window Color black
  menu Window Size 300 250
  menu Font Transparent #true
  menu Font Align Left
  menu Font Name MS Sans Serif
  menu Font Size 8
  menu Font Style b
  menu Font Color Yellow
  menu Font Transparent #true
  menu Font Align Center
  menu Text EUOLabel0 36 6    **************IMPORTANT**************
  menu Text EUOLabel1 36 20 --You will need an animal to train with.
  menu Text EUOLabel8 36 33 --You will need a bunch of weps in your pack
  menu Text EUOLabel2 36 47 --You should also use a MR/LMC suit.
  menu Text EUOLabel3 36 60 --Read the instructions in the script header
  menu Text EUOLabel4 36 76   before you begin!
  menu Text EUOLabel5 36 90 --IF YOU DONT THIS SCRIPT MAY NOT
  menu Text EUOLabel6 36 105  WORK FOR YOU!!!!
  menu Text EUOLabel7 36 160 Press OK to begin
  menu Font Color Black
  menu Button cmdOK 160 190 65 30 &OK
  menu Button cmdExit 60 190 65 30 E&xit
  menu Show 421 270
return
;--------- EasyUO Menu Designer Code End ---------

12
Submit your Script / Raz's Champ Spawn Corpse Cutter
« on: July 29, 2012, 06:44:03 PM »
Hey everyone. Had a request by a friend to write this up so I figured I'd share it. Give it a try and let me know what you think!!

Code: [Select]
;XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX;
; Title: Raz's Champ Spawn Corpse Cutter                                                   ;
; Author: Razeial                                                                          ;
; Version 1.0                                                                              ;
; Purpose: Automatically cuts corpses using a Butcher's War Cleaver.                       ;
;          When overweight, it will use a bag of sending to send the leather               ;
;          to your bank.                                                                   ;
;                                                                                          ;
; Credits: The SendLeather Sub was pulled from Necro|FS's Gold Collector Script.           ;
;          and modified by me to fit this script. All Credits for that Sub go to him.      ;
;          Necro|FS, If you do not wish for this sub to be used in this script, let me     ;
;          know and I will remove it.                                                      ;
;                                                                                          ;
; Notes: Right now this script is set up to cut corpses for leather from monsters found    ;
;        the Rat Spawn, Dragon Spawn, and Oaks spawn. To add more, simply add the names    ;
;        of the corpses you'd like to cut leather from in the IF line in BOTH the mainloop ;
;        and the sub Cut where all the other names are found.                              ;
;XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX;

13
Ok guys, this my very first script, and I'm actually quite proud of it, so judge lightly.

What does this script do differently than other bushido trainers? Well, it constantly scans your paperdoll to see if you're holding a weapon. If it breaks, it will automatically pull another weapon of the same type from your backpack and equip it for you. I couldn't find a script out there to do what I wanted it to, and with bushido being such a slow gainer, i decided i'd read a few tutorials and I came up with this(with help from a guild mate)!
Code: [Select]
;XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
; Script Name: Raz's Full-Auto Bushido Trainer
; Author: Razeial
; Version: 2.2
; Client Tested with: 7.0.27.7
; EUO version tested with: 1.5 v218
; Shard OSI / FS: EA/OSI
; Revision Date: 9/5/2012
; Public Release: 7/19/2012
; Global Variables Used: none
; Purpose: Will train bushido to 120 using Lightning Strike on a horse
;          (or llama, ostard, etc..}. It will also scan your paperdoll to see if you still have a
;          weapon in your hand (ie your previous weapon breaks) and will automatically pull another
;          weapon from your backpack and rearm it.
; Credits: Dxrom for allowing me to use his Pixel saving SUB and for pointing me in the right
;          direction! Paladin for his ScriptTimer Sub
;          A VERY special thanks to JustAnotherFace (JAF). Without him, this script would not have
;          come together. He took quite a bit of time to review the script, help me edit it, teach
;          me along the way, and made more efficient suggestions!
;Instructions: The script is set up so that you must have a HORSE to train on.
;              If you want to train on a cat, dog, llama, etc, you need to change the %mount
;              with the corresponding itemtype. If you aren't using Mace Fighting, then you
;              need to change the %weapon to the proper itemtype of whatever weapon you'll be
;              using to train with. You will also need a good deal of that particular weapon
;              in your backpack. I suggest 30 or 40 at a time. You can either craft them or
;              buy them from a blacksmith shop. I also recommend wearing a high Mana Ren and
;              Lower Mana Cost suit (wouldn't hurt to have Mana Inc on it also).
;
;              You need to be unguilded, in a Trammel-type Facet, with a tamed horse
;              (or other animal).
;XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Changelog:

Version 1.0--7/19/12
Release!

Version 1.1--7/19/12
A few minor tweaks

Version 1.2--7/31/2012
Fixed a bug at low levels caused by failing to deliver lightning strike.
Redesigned the way lightning strike is toggled thanks to dxrom

Version 2.0--8/13/2012
Redesigned the Menu

Version 2.1 --8/30/2012
A few minor tweaks
Version 2.2 --9/5/2012
Fixed some script errors

What you must do for this script to work: You must modify the %weapon and %mount itemtypes to suit your needs. You will also need a bunch of the same weapon in your pack.

14
Script Debug / Need some advice w/ this script!
« on: July 18, 2012, 04:31:36 PM »
Ok guys, I'm using Guadah's Multiskill trainer to train up Bushido. What I also want is a script to scan my journal for a weapon break, and then rearm the last type of weapon so will this script do that while guadah's script runs?

Code: [Select]
set %weapontype YSF

scanjournal 1
if weapon_has_been_destroyed in #journal
{
gosub RearmWep
}
goto Mainloop


Sub RearmWep
SET  #lobjecttype %weapontype
FINDITEM %weapontype C_ , %backpackid
      IF #FINDKIND = -1
      {
      HALT
      }
   SET #RHANDID #findid
   WAIT %ShortDelay
   event macro 24 2
   WAIT 1s
return

15
New member introductions / Old player saying hello
« on: June 30, 2012, 02:17:20 PM »
Hello all! Long time UO player here from Sonoma. Been playing for 12 years now. Came here based on the word of a friend. I am not a scripter, but I am trying to learn about scripting and can kind of figure out enough to modify little things in scripts i find to suit my needs. Would love to get some more insight on how to write scripts and put them to the test! Looking forward to learning a few things here!

Pages: [1] 2