背景:
阅读新闻

挂动物知识和兽医

[日期:2006-08-18] 来源:EUO PLS  作者: [字体: ]

需求:

1、船、无限航道。

2、宠物一只,我用的是马。

3、绷带若干,鉴于技能低的时候消耗量大,自己多刷些带着。

4、有攻击魔法技能和足够的药材或者省药装。

操作:

1、将马带到船上,不要骑着。

2、运行脚本,第一次运行选择马,然后即可以开始提升动物知识和兽医。

改动:

1、把原来的施放魔法箭改成了小闪电,这样马会失血较多,从而利于绷带。

2、把原来的检测技能提升之后自动停船改成自动向前走,因为无限航道嘛。

脚本:




;====================================================================
;Configuration Section
;====================================================================
; There are only a few things you need to change, if any. I suggest trying as is with the cow first.
;
set %initcow IG_NG  ;If you don't wanna use a cow let the script learn the animal type!
;set %initcow YG ; a bull
;
; Others to try if you have high eval/magery and your Magic Arrow kills the cow alot.
;  DG - Walrus, about the same as a cow, hits you for about 6-10 HP
;  M - snow leopard, 3x more HP, hits you for about 10-14 HP
;  AH - Great Hart, 3x more HP, hits about 6-12 HP
;
set %lrcsuit #true ;If you got a suit and want to wear it set this to #true, but do you really need to use this?
;  You only need Sulfuric Ash. Probably less then 1000. Not worth wearing a suit.
set %menuposx 540 ;You can adjust these two numbers to fit your
set %menuposy 440 ;setup and position of your windows.
;
set %healtimer 40  ;Adjusted for pub 19, increase this if heals take longer (10 = 1 sec)
;
set %slowconnection #false ; set to #true if you have a slow connection (modem, etc)
;
; If you want to use a fireball spell instead of a magic arrow and do more damage set to #true
set %usefireball #false
; If you're on a slow connection and miss the gainspot set this to 1 (or more)
; to backup that many spaces after a skill gain. 
set %backupaftergain 0
;=====================================================SF===============
;End Configuration Section - Changing anything below this line voids your warranty
;====================================================================
gosub getGlobalVar 105 UserDefinedAnimalTypes #charid userAnimalTypes NOLOCK
if #result
{
set %initcow IG_NG_ , %userAnimalTypes
}
gosub FindAnimal
if %usefireball
{
set %regs KUF
set %spell 17
}
else
{
set %regs SZF
set %spell 29
}
set %version 1.8a
set %debug #false
chooseskill anil
set %scriptstart #scnt
set %castarrow #true
set %backupdone #false
set %boatongain #false
set %maxhits  #maxHits  - ( #maxHits / 10 )
set %forcepause #maxHits / 2
set %LoreSkillStart #skill
set %boaty #charposy
set %cow %initcow
set %retries 0
set %petaids 0
set %petaidssuccess 0
set %tarrows 0
set #menubutton N/A
set *20 ok    ;for RK's HealthWatch script, tells if poisoned, hurt, ok
set *21 free
gosub StatusBarUp
if %slowconnection
{
set %wait1 20
set %wait2 20
set %wait3 20
set %wait4 30
}
else
{
set %wait1 5
set %wait2 10
set %wait3 15
set %wait4 20
}
set %peacewait 20
chooseskill vete
if #skilllock <> locked
{
Display YesNo Your Vet skill is not locked. This script works$
+best if vet is locked. Do you want to continue?$
$Press Yes to ignore this warning, No to halt script.$$
if #dispres = No
{
  sound
  halt
}
}
wait %wait1
chooseskill anil
if #skilllock <> up
{
Display Ok Your Animal Lore skill is not marked up.$
+It's kind of hard to gain otherwise! Please correct$
+and restart script.$$
  sound
  halt
}
gosub InitMenu
gosub CheckRequirements 9

;
; THE MAIN LOOP
;
mainloop:
gosub CheckForPause
gosub toggleWarMode #false
  gosub MagicArrow
gosub toggleWarMode #false
  gosub HealCow
gosub RKHealthwatchCheck
goto mainloop
halt
;
;

sub CheckRequirements
;purpose - Make sure we have everything needed to run this script
; 1 = cow, 2 = aids, 3 = regs, 9 = all
;
if %1 = 1 || %1 = 9
{
set %cnt 0
findcow:
set *21 busy
finditem %cow
IF #findkind = -1
{
  if %cnt <> 3
  {
  set %cnt %cnt + 1
  Event Macro 3 0 all follow me
  wait %wait4
  goto findcow
  }
  else
  {
  if %cow = %initcow
  {
    set #menubutton doPause
    menu font color btnface
    menu Font BGColor red
    menu text scriptpause 50 66 Dude, where's your pet?
    gosub CheckForPause
    menu delete scriptpause
    menu font bgcolor BLACK
    menu font color red
    menu font style n
    set %cnt 0
    goto findcow
  }
  else
  {
    set #menubutton doPause
    menu font color btnface
    menu Font BGColor red
    menu text scriptpause 50 66 Dude you killed your pet!
    gosub CheckForPause
    menu delete scriptpause
    menu font bgcolor BLACK
    menu font color red
    menu font style n
    set %cow %initcow
    set %cnt 0
    goto findcow
  }
    }
}
if %cow = %initcow
  set %cow #FINDID

}
set *21 free

set %bagcheck #true
findaids:
if %1 = 2 || %1 = 9
{
finditem ZLF C
if #findkind = -1
{
  if %bagcheck
  {
  Event Macro 8 7
  wait %wait4
  set %bagcheck #false
  goto findaids
  }
  set #menubutton doPause
  menu font color btnface
  menu Font BGColor red
  menu text scriptpause 25 66 You need more bandaids! Visible?
  gosub CheckForPause
  menu delete scriptpause
  menu font bgcolor BLACK
  menu font color red
  menu font style n
  set %bagcheck #true
  goto findaids
}
set %aids #FINDID
}

set %bagcheck #true
findregs:
if ( %1 = 3 || %1 = 9 ) && ! %lrcsuit
{

finditem %regs C
if #findkind = -1
{
  if %bagcheck
  {
  Event Macro 8 7
  wait %wait4
  set %bagcheck #false
  goto findregs
  }
  set #menubutton doPause
  menu font color btnface
  menu Font BGColor red
  menu text scriptpause 25 66 You need more regs! Visible?
  gosub CheckForPause
  menu delete scriptpause
  menu font bgcolor BLACK
  menu font color red
  menu font style n
  set %bagcheck #true
  goto findregs
}

}
return

sub HealCow
;purpose - heal your pet and get your gains here.
gosub CheckRequirements 1
tryagain:
set %boaty #charposy
gosub CheckRequirements 2
gosub CheckHealth
gosub CheckForPause
gosub GuardMe
gosub FollowMe
set #lobjectid %aids
deletejournal
set #ltargetid %cow
set #ltargetkind 1
set *21 pause
Event Macro 17 0
target 5s
Event Macro 22 0
wait %wait2
set *21 free
if not_damaged in #sysmsg
{
  set %castarrow #true
  deletejournal
  return
}
if too_far_away in #sysmsg || cannot_see_that in #sysmsg
{
  Event Macro 3 0 all follow me
  wait %wait3 %wait2
  Event Macro 3 0 all stay
  wait %wait1 %wait2
  goto tryagain
}
set %petaids %petaids + 1
gosub CheckForGain
if little_damage in #sysmsg || finish_apply in #sysmsg
{
  set %castarrow #true
  set %petaidssuccess %petaidssuccess + 1
  deletejournal
  gosub UpdateMenuStats 1
  return
}
gosub UpdateMenuStats 1
if barely_help in #sysmsg
{
  goto tryagain
}
if did_not_stay in #sysmsg
{
  Event Macro 3 0 all follow me
  wait %wait3
  Event Macro 3 0 all stay
  wait %wait1 %wait2
  goto tryagain
}
return

sub GuardMe
;purpose - make sure the status bar is green
finditem %cow
if #findrep <> 2 && #findrep <> 3
{
  Event Macro 3 0 all guard me
  wait %wait2 %wait2
}
return

sub FollowMe
;purpose - call the pet if it gets out of range
finditem %cow
if #finddist > 2
{
  Event Macro 3 0 all follow me
  wait %wait4 %wait4
  Event Macro 3 0 all stay
  wait %wait1 %wait2
}
return



sub MagicArrow
;purpose - damage the pet so you have something to heal
if ! %castarrow
  return
gosub CheckRequirements 3
gosub ToggleWarMode #true
set #ltargetid %cow
set #ltargetkind 1
if #finddist > 8
{
  Event Macro 3 0 all follow me
  wait %wait1 %wait2
  Event Macro 3 0 all follow me
  wait %wait1 %wait2
  Event Macro 3 0 all stay
  wait %wait1 %wait2
}
set *21 pause
Event Macro 15 %spell
target 5s
wait 3
Event Macro 22 0
Event Macro 3 0 all stop
wait %wait4
Event Macro 3 0 all follow me
wait %wait3
Event Macro 3 0 all stop
wait %wait2
Event Macro 3 0 all follow me
wait %wait3
gosub toggleWarMode #false
wait %wait1
Event Macro 3 0 all stop
wait %wait1
Event Macro 3 0 all follow me
wait %wait3
set *21 free
set %tarrows %tarrows + 1
gosub UpdateMenuStats 2
set %castarrow #false
gosub CheckRequirements 1
gosub RKHealthwatchCheck
return

sub CheckForGain
;purpose - check for gains and stop the boat on the gain spot.
if %boatongain
set %retries %retries + 1
set %currentskill #skill
set %scnt2 #scnt2 + %healtimer
CheckGain:
if #skill > %currentskill
{
  if ! %boatongain
  {
  Event Macro 3 0 forward
  set %boatongain #true
  wait 1s
  gosub backupaftergain
  }
  set %retries 0
  gosub UpdateMenuStats 3
  set %currentskill #skill
  goto CheckGain
}
if %scnt2 < #scnt2
{
  if %retries = 10
  {
  set %retries 0
  set %boaty #charposy
  Event Macro 3 0 slow forward
  wait 1s
  set %boatongain #false
  set %backupdone #false
  }
  return
}
goto CheckGain
return            ; not really needed but it bugs me not to see one

sub CheckHealth
;purpose - check our health and tell the pet to stop it or use RKHealthwatch
gosub StatusBarUp
if #hits < %maxhits
{
  Event Macro 3 0 all stop
  wait %wait1
  gosub ToggleWarMode #false
  if #hits < %forcepause
  {
  set #menubutton doPause
  menu font color btnface
  menu Font BGColor red
  menu text scriptpause 30 66 Script paused for health reasons!
  gosub CheckForPause
  menu font bgcolor BLACK
  menu font color red
  menu font style n
  menu delete scriptpause
  }
}
gosub RKHealthwatchCheck
return

SUB RKHealthwatchCheck
;purpose - pause CEOAnimalLore so RK's Healthwatch can save your butt
;
PauseMe:
if *20 = ok
return
wait 5
gotoPauseMe
return

sub ToggleWarMode
;purpose - try and keep us outta war mode so we don't kill our pet
if %1 && G in #charstatus
return
if ! %1 && G notin #charstatus
return
set *21 pause
Event Macro 6 0 
wait 5
set *21 free
return

sub InitMenu
;purpose - draw the inital menu window and put it up
;***main window setup***
menu clear
menu window size 240 150
menu window title CEO Animal Lore Version %version
menu window color black


;***set font color***
menu font bgcolor BLACK
menu font color red
menu font size 9
menu font style bu

;***display Titles***
menu text railtitle 40 0 CEOAnimalLore Statistics
menu font size 8
menu font style n
menu text txt  100 15  success/attempts
menu font size 9
menu text stattxt 58 30 Heals , #spc , :
menu text stattxt 25 45 Magic Arrow , #spc , :

;***skillgain section***
menu font style bu
menu font size 9
menu text sktxt 55 85 (tenths) skill  gains    rate/hr
menu font style n
menu text sktxt 10 100 Animal Lore

gosub UpdateMenuStats 9
menu font bgcolor teal
menu font color black
menu button doPause 70 120 100 20 Press to Pause
menu font bgcolor black
menu font color red
set #menubutton N/A
menu show %menuposx %menuposy
if ! %debug
  menu hideeuo
wait 20
menu show %menuposx %menuposy
return

sub UpdateMenuStats
;purpose - update the menu stats
; 1=petaids, 2=magicarrows, 3=statgain, 9=all
if %1 = 1 || %1 = 9
{
  menu delete shealtxt
  menu text shealtxt 115 30 %petaidssuccess / %petaids
}
if %1 = 2 || %1 = 9
{
  menu delete smagictxt
  menu text smagictxt 115 45 %tarrows
}
if %1 = 3 || %1 = 9
{
  menu delete loretxt
  set %anilgain #skill - %LoreSkillStart
  set %rate %anilgain * 3600 / ( #SCNT - %scriptstart  )
  menu text loretxt 84 100 #skill ---- %anilgain ---- %rate
}
return

sub StatusBarUp
;purpose - make sure the status bar is up on the char
IF #charname = N/A
{
  Event Macro 8 2
  wait %wait1
}
return

sub CheckForPause
;purpose - pause CEOAnimalLore
if #menubutton = N/A
return
doPause:
set *21 free ; Make sure RK HealthWatch can save you sitting on a boat doing nothing
IF #menubutton = doPause
{
  Event Macro 3 0 all stop
  wait 5
  Event Macro 3 0 forward
  wait 5
  set #menubutton N/A
  menu delete doPause
  menu font bgcolor teal
  menu font color black
  menu button doResume 70 120 110 20 Press to Resume
  menu font bgcolor black
  menu font color red
  goto doPause
}
IF #menubutton = doResume
{
  set #menubutton N/A
  menu delete doResume
  menu font bgcolor teal
  menu font color black
  menu button doPause 70 120 100 20 Press to Pause
  menu font bgcolor black
  menu font color red
  if ! %boatongain
  Event Macro 3 0 slow forward
  wait 5
  return
}
wait 2s
goto doPause
return            ; not really needed but it bugs me not to see one

sub FindAnimal
FA1:
finditem %initcow G_5
if #findkind <> -1
return
display YesNo Could not find a Cow, would you like to have the script learn a new animal type?$$
+Note: Animal must be within 5 paces for animal verification.
if #dispres = NO
{
display OK Script Halting, no animal to train with. Modify % , initcow or rerun script$
+and select "YES" to have the script learn the animal type you want to train.
halt
}
display ok Press OK and then target your animal.
set #ltargetid n/a
event macro 13 2
target 5s
FA2:
wait 5
if #targcurs = 1
goto FA2
wait 5
contpos -75 -75
set %tempid #ltargetid
finditem %tempid
if #findkind = -1
goto FA1
event property #findid
wait 5
display YesNO Type: #findtype $Name: #property $(Note: Name info will be blank if not client 4.x.x)$$Is this correct?$
if #dispres = NO
goto FA1
if %useranimaltypes = N/A
set %userAnimalTypes #findtype
else
set %userAnimalTypes %userAnimalTypes  , _ , #findtype
gosub putGlobalVar 105 UserDefinedAnimalTypes #charid userAnimalTypes
set %initcow IG_NG_ , %userAnimalTypes
return

sub backupaftergain
if %backupdone || %backupaftergain = 0
return
for %backupcount 1 %backupaftergain
{
Event Macro 3 0 one back
wait 1s
}
set %backupdone #true
return
;========End of CEOAnimalLore=====
;==================================
; Script Name:  CEO's * variable management subs (pseudo filesystem)
; Author: CEO
; Version: 1.0
; Client Tested with: 4.0.1b
; EUO version tested with: 1_41_103
; Shard OSI / FS: OSI
; Revision Date: 040219
; Public Release: 040219
; Globals Used: User specified (2 total)
; Purpose: Allows you to use a * variable as a pseudo-filesystem
;=======================================
; CEO's global variable management subs:
;      getGlobalVar  . putGlobalVar  . delGlobalVar
;=======================================
Sub getGlobalVar
;ver 1.0 posted 19Feb04 by CEO
;purpose: Allows you to store multiple variables in one global variable unique to
;            each player and script. getGlobaVar retrieves a value from a global variable.
;@returns: #result = #false if variable not found, #true if found
;            % . %3 contains variable value
;%1 is the global/persistant variable to use ( %1 + 1 is used for locking)
;%2 is the script identifer or pseudo filename
;%3 is #charid or pseudo filename
;%4 is the variable to search for and return in %. %3 
;%5 is for lock control. By default getGlobalVar uses a lock to return a value. In some cases you may want to
;      retrieve a variable (mostly for speed) without needing a lock as long as you are aware of
      any potentional conflicts, that very rarely may occur. Set this param to NOLOCK to access
      global storage without a lock.
;sample usage:
;              gosub getGlobalVar 50 MyScript #charid backpackid
; Using global var *50 finds the variable labeled MyScript#charidbackpackid and returns it in %backpackid
;
;              gosub getGlobalVar 50 MyScript #charid clothstat NOLOCK
; Using global var *50 find the variable labeled MyScript#charidclothstat and returns it in %clothstat without using a lock
; Warning: do not use *1000. * %1 + 1 is used for locking and there is no *1001!
nameSpace push
nameSpace local #systime , _ , %2 , _ , %3 , _ , %4 , _ , GET
set !lpc #lpc
set #lpc 1000
set !lock %1 + 1
if ( %0 = 5 ) && ( %5 = NOLOCK )
  goto getGlobalVar_skiplock
set !lockcount 0
getGlobalVar_waitforlock:
if * . !lock <> N/A && * . !lock <> #nsname
{
  wait 1 4
  set !lockcount !lockcount + 1
  if !lockcount < 10
      goto getGlobalVar_waitforlock
  if * . !lock <> N/A
  {
      set !currentlock * . !lock
      if !currentlock = N/A
        goto getGlobalVar_waitforlock
      str pos !currentlock _
      set !strres #strres - 1
      str left !currentlock !strres
      set !systime #systime - #strres
      if !systime < 10000 ; if over 10 seconds assume a broken lock and take it
      {
        set !lockcount 0
        goto getGlobalVar_waitforlock
      }
  }
}
set * . !lock #nsname
wait 3 2
if  * . !lock <> #nsname
{
  set !lockcount 0
  goto getGlobalVar_waitforlock
}
getGlobalVar_skiplock:
set !global * . %1
set !varName %2 , ^ , %3 , ^ , %4 , |
str pos !global !varName
set #result #strres <> 0
if #result
{
  set !varNamePos #strres
  str len !varName
  set !delString !varNamePos + #strres - 1
  str del !global 1 !delString
  set !global #strres
  str pos !global |
  set !varNamePos #strres - 1
  str left !global !varNamePos
  set % . %4 #strres
}
if ( %0 < 5 || %5 <> NOLOCK ) && * . !lock = #nsname
  set * . !lock N/A
set #lpc !lpc
nameSpace Clear
nameSpace Pop
return #result

Sub putGlobalVar
;ver 1.0 posted 19Feb04 by CEO
;purpose: Allows you to store multiple variables in one global variable unique to
;            each player and script. putGlobaVar stores a value into a global variable.

;@returns: #result = #false if variable not found, #true if found
;            % . %3 contains variable
;%1 is the global/persistant variable to use
;%2 is the script identifer or pseudo filename
;%3 #charid or other identifier
;%4 is the variable name of the variable to save into the* variable identified in %1
;sample usage:
;              gosub putGlovalVar 50 MyScript #chardid backpackid
; Using global var *50 stores/updates the variable labeled MyScript#charidbackpackid  with %backpackid
; Warning: do not use *1000. * %1 + 1 is used for locking and there is no *1001!
nameSpace push
nameSpace local #systime , _ , %2 , _ , %3 , _ , %4 , _  , PUT
set !lpc #lpc
set #lpc 1000
set !lock %1 + 1
set !lockcount 0
putGlobalVar_waitforlock:
if * . !lock <> N/A && * . !lock <> #nsname
{
  wait 1 4
  set !lockcount !lockcount + 1
  if !lockcount < 10
      goto putGlobalVar_waitforlock
  if * . !lock <> N/A
  {
      set !currentlock * . !lock
      if !currentlock = N/A
        goto putGlobalVar_waitforlock
      str pos !currentlock _
      set !strres #strres - 1
      str left !currentlock !strres
      set !systime #systime - #strres
      if !systime < 10000 ; if over 10 seconds assume a hung lock and take it
      {
        set !lockcount 0
        goto putGlobalVar_waitforlock
      }
  }
}
set * . !lock #nsname
wait 4
set !global * . %1
set !varName %2 , ^ , %3 , ^ , %4 , |
str pos !global !varName
if #strres = 0
{
  if  * . !lock <> #nsname
  {
      set !lockcount 0
      goto putGlobalVar_waitforlock
  }
  if  |CEO*FILESYSTEM| notin !global
      set !global |CEO*FILESYSTEM|
  set * . %1 !global , !varName , % . %4 , |
  set * . !lock N/A
  set #lpc !lpc
  nameSpace clear
  nameSpace pop
  return #true
}
set !varNamePos #strres
str len !varName
set !splitString !varNamePos + #strres - 1
str left !global !splitstring
set !globalPart1 #strres
str del !global 1 !splitString
set !global #strres
str len !global
set !globalLen #strres
str pos !global |
set !splitString !globalLen - #strres + 1
str right !global !splitstring
set !global #strres
if  * . !lock <> #nsname
{
  set !lockcount 0
  goto putGlobalVar_waitforlock
}
set * . %1 !globalPart1 , % . %4 , !global
set * . !lock N/A
set #lpc !lpc
nameSpace clear
nameSpace pop
return #true

收藏 推荐 打印 | 录入:admin | 阅读:
相关新闻