Author Topic: Spirit Speak 0.1 for Public Testing  (Read 3218 times)

0 Members and 1 Guest are viewing this topic.

Offline VicVegaTopic starter

  • Jr. Member
  • **
  • Posts: 71
  • Activity:
    0%
  • Reputation Power: 0
  • VicVega has no influence.
  • Respect: +8
  • Referrals: 0
    • View Profile
Spirit Speak 0.1 for Public Testing
« on: May 18, 2009, 07:59:16 AM »
0
Code: [Select]
=================================================================
; Script Name: Spirit Speak
; Author: VicVega
; Version: 0.2
; Shard OSI / FS: UO Legends
; Revision Date: 20/5/2009
; Purpose: Trains Spirit Speak to GM
; Globals: None
;=================================================================
; Instructions: Just press play
;************************ Setup **********************************
gosub setup
;*********************** Main Loop *******************************
repeat
  gosub checkskill
  while #mana >= %minManaToCast
    gosub useSpiritSpeakSkill
  gosub meditate
  while #mana < #maxMana
    gosub checkMeditateStatus
until #charGhost = yes
;************************* Subs **********************************
sub setup
  chooseskill spir real
  set %startingskill #skill
  str len %startingskill
  str ins %startingskill #dot #strRes
  set %startingskill #strres
  set %minManaToCast 10
  set %successMessage You_channel_your_own_spiritual
  set %successMessageTrance you_enter_a_meditative
  set %successMessagePeace you_are_at_peace
  set %failMessage You_fail_your_attempt
  set %failWait you_must_wait
  set %failFocus cannot_Focus
return

sub checkskill
  if #skill = #skillcap
    halt
  set %currentskill #skill
  str len %currentskill
  str ins %currentskill #dot #strRes
  set %currentskill #strres
  setuotitle SS %startingskill | CS %currentskill
return

sub useSpiritSpeakSkill
  event macro 13 32
  gosub scan %successMessage %failMessage %failWait
  wait 6s
  gosub checkskill
return

sub meditate
  event macro 13 46
  gosub scan %failFocus %failWait %successMessageTrance %successMessagePeace
  set %scanResult #result
return

sub checkMeditateStatus
  if %scanResult = %failWait
  {
    wait 1s
    event macro 13 46
    gosub scan %failFocus %failWait %successMessageTrance %successMessagePeace
    set %scanResult #result
  }
  if %scanResult = %failFocus
  {
    wait 10s
    event macro 13 46
    gosub scan %failFocus %failWait %successMessageTrance %successMessagePeace
    set %scanResult #result
  }
return

sub scan
  set %maxTimeOutScan 15
  set %timeout #scnt + %maxTimeOutScan
  set %jrnl #jindex
  scanjournal %jrnl

  while #scnt < %timeout
  {
    if %jrnl < #jindex
    {
      set %jrnl %jrnl + 1
      scanjournal %jrnl
    }
    for %journalCounter 1 %0
    {
      if % . %journalCounter in #journal
        return % . %journalCounter
    }
  }
return
« Last Edit: May 20, 2009, 09:18:12 AM by VicVega »
To learn, read.
To know, write.
To master, teach.

Offline VicVegaTopic starter

  • Jr. Member
  • **
  • Posts: 71
  • Activity:
    0%
  • Reputation Power: 0
  • VicVega has no influence.
  • Respect: +8
  • Referrals: 0
    • View Profile
Re: Spirit Speak 0.1 for Public Testing
« Reply #1 on: May 20, 2009, 07:24:07 AM »
0
Added some minor changes, if in a few days nobody find problems I will add it to the "submit your script section".
To learn, read.
To know, write.
To master, teach.

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: Spirit Speak 0.1 for Public Testing
« Reply #2 on: May 20, 2009, 07:31:38 AM »
0
Well organized, seems very solid.

Nice work.
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 Khameleon

  • Script Tester - Team Leader
  • Elite
  • *
  • *
  • Posts: 2574
  • Activity:
    0%
  • Reputation Power: 30
  • Khameleon is a rising star!Khameleon is a rising star!Khameleon is a rising star!Khameleon is a rising star!Khameleon is a rising star!Khameleon is a rising star!
  • Gender: Male
  • Respect: +238
  • Referrals: 0
    • View Profile
Re: Spirit Speak 0.1 for Public Testing
« Reply #3 on: May 20, 2009, 05:28:47 PM »
0
Vic, your Avatar makes me laugh!

Offline VicVegaTopic starter

  • Jr. Member
  • **
  • Posts: 71
  • Activity:
    0%
  • Reputation Power: 0
  • VicVega has no influence.
  • Respect: +8
  • Referrals: 0
    • View Profile
Re: Spirit Speak 0.1 for Public Testing
« Reply #4 on: May 21, 2009, 12:17:42 AM »
0
He is a funny monster indeed.  :P
To learn, read.
To know, write.
To master, teach.

Tags: