Jack's Ninjutsu *Upated*

Discussion about the technical aspects of scripting. Ask about all issues involving your freelance projects here.
Locked
HappyMeal
Passer by
Posts: 4
Joined: Sun Feb 21, 2010 6:45 pm

Jack's Ninjutsu *Upated*

Post by HappyMeal »

I got this script from some other post... I think that the post from was Jack but I am not sure, either way I updated it to to check your current skill level and pick the correct skill to start casting. I did that because I am a really lazy person and dont like to switch scripts while I am sleeping.. :nod:

Code: Select all

    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ; Script for training ninjutsu
    ;
    ; The skills and levels for training are taken from UOEX wiki skill guides section.
    ; Choose a skill, start the script and it will run until you stop it.
    ;
    ;(1) 30 - 40    Animal Form (Rat)
    ;(2) 40 - 50    Animal Form (Dog)
    ;(3) 50 - 75    Mirror Images
    ;(4) 75 - 85    Focus Attack
    ;(5) 85 - 120   Death Strike
    ;
    ; 4 and 5 are used in melee combat (you need a melee weapon)
    ; I'm sorry for the way skills 4 and 5 are implemented, they work
    ; to some extent though.
    ;
    ;   -Jack Penny
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    
    chooseSkill Ninj
    if #skill >= 300 && #skill =< 400
    {
    gosub RatForm
    }
    if #skill >= 400 && #skill <= 500
    {
    gosub DogForm
    }
    if #skill >= 500 && #skill <= 750
    {
    gosub MirrorImage
    }
    if #skill >= 750 && #skill <= 850
    {
    gosub FocusAttack
    }
    if #skill >= 850 && #skill <= 1200
    {
    gosub DeathStrike
    }
    halt

    ;----------------------------------------------
    sub RatForm
    {
    RatLoop:
    gosub wait_mana 10
    event macro 15 247
    gosub wait_for_generic_gump
    set %x #contposx + 220
    set %y #contposy + 220
    click %x %y
    wait 2
    set %x #contposx + 40
    set %y #contposy + 280
    click %x %y
    wait 40
    event macro 15 247
    wait 30
    goto RatLoop
    }
    ;-------------------------------------------------
    sub DogForm
    {
    DogLoop:
    gosub wait_mana 10
    event macro 15 247
    gosub wait_for_generic_gump
    set %x #contposx + 20
    set %y #contposy + 220
    click %x %y
    wait 2
    set %x #contposx + 40
    set %y #contposy + 280
    click %x %y
    wait 30
    event macro 15 247
    wait 30
    goto DogLoop
    }
    ;--------------------------------------------------
    sub MirrorImage
    {
    MirrorLoop:
    gosub wait_mana 10
    while #followers = #maxfol
    {
      wait 10
    }
    event macro 15 252
    wait 20
    goto MirrorLoop
    }
    ;--------------------------------------------------
    sub FocusAttack
    {
    FocusLoop:
    gosub wait_mana 20
    event macro 15 245
    wait 20
    goto FocusLoop:
    }
    ;--------------------------------------------------
    sub DeathStrike
    {
    DeathStrikeLoop:
    gosub wait_mana 20
    event macro 15 246
    wait 20
    goto DeathStrikeLoop
    }
    ;--------------------------------------------------
    sub wait_for_generic_gump
    {
    wait_gump_loop:
    if #contname <> generic_gump
    {
      wait 3
      goto wait_gump_loop
    }
    return
    }
    ;--------------------------------------------------
    sub wait_mana
    {
    set %minmana %1
    while %minmana > #mana
    {
      wait 10
    }
    return
    }
    ;---------------------------------------------------

Kimitsu
Expert Scribe
Posts: 34
Joined: Wed Jan 06, 2010 5:43 am

Re: Jack's Ninjutsu *Upated*

Post by Kimitsu »

yep it's definitly jack's script because it uses buggy gump waiting. Remember, kids, never wait for #contname = generic_gump! use #contsize!
Penny
Legendary Scribe
Posts: 210
Joined: Thu Oct 01, 2009 12:05 pm

Re: Jack's Ninjutsu *Upated*

Post by Penny »

Thanks Happy :)

It was just a quicky script for someone who needed it :)
Failure is not an option, it's a standard.
Side
Elder Scribe
Posts: 110
Joined: Thu Dec 16, 2010 10:54 am

Re: Jack's Ninjutsu *Upated*

Post by Side »

This script seems to cast ~10-15 times then just goes dead. Any suggestions?

Edit: it also seems to stop after a successful casting of rat form, heh.
User avatar
Mad Martigan
Novice Scribe
Posts: 9
Joined: Tue May 17, 2011 11:20 am
Location: Italy

Re: Jack's Ninjutsu *Upated*

Post by Mad Martigan »

replace line 59 with "wait 50" or more depending on your FC
Check out My Yumi vendor catalogue thread

( Y U NO BUY A YUMI? )
Locked