Author Topic: Rare Serpent Egg "Medusa"  (Read 5720 times)

0 Members and 1 Guest are viewing this topic.

Offline The GhostTopic starter

  • Elite
  • *
  • *
  • Posts: 1917
  • Activity:
    0%
  • Reputation Power: 25
  • The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.
  • Respect: +245
  • Referrals: 0
    • View Profile
Rare Serpent Egg "Medusa"
« on: November 06, 2011, 08:23:35 PM »
0
I have been working on a script to help me collect egg for Medusa.  for some reason,  my " event SysMessage Target your Hold " work find and other time it just get stuck in a loop.  I wrote this to remove s few clicking.  The only think I required to target is the Nest hold.  Can you guy have a look at this Plx and provide any feedback.

Code: [Select]


set %nest PBN
set %flute RGP   ; Charmer Flute
set %snakes QE_JD_FB
; *********************************
start:
event SysMessage Target your Hold
  set #targcurs 1
  while #targcurs = 1
   wait
  set %nest #ltargetid


    if #findkind = -1
    goto start


; **************************************
flute:
finditem RGP C_ , #Backpackid
set #lobjectID #findID
set #ltargetkind 1
  wait 5
  event macro 17
  wait 5
; ***********************************
repeat
finditem %snakes G_8
if #findkind = -1
until #charghost = yes
{
    wait 1s
    set %snake #findid
    wait 1s
    set #ltargetid #findid
    set #ltargetkind 1
    event macro 22
}
ignoreitem %snakes

;halt

; *************************************
; repeat
; finditem %nest G_4
; if #findkind <> -1
; until #charghost = yes
{
    wait 1s
    set %nest #findid
    set #ltargetid #findid
    set #ltargetkind 2
    event macro 22
    wait 10
}
{
       scanjournal %i
       if You_don't_seem_to_be_able_to_persuade_that_to_move. in #journal || Someone_else_is_already_taming_this. in #journal || The_animal_walks_where_it_was_instructed_to.
       {
          goto flute
           }
}
goto start

  
« Last Edit: November 06, 2011, 08:51:32 PM by The Ghost »

Offline rana70

  • Elite
  • *
  • *
  • Posts: 294
  • Activity:
    0%
  • Reputation Power: 5
  • rana70 has no influence.
  • Gender: Male
  • Respect: +37
  • Referrals: 2
    • View Profile
    • MyScripts
Re: Rare Serpent Egg "Medusa"
« Reply #1 on: November 06, 2011, 09:10:44 PM »
0
Code: [Select]
; *********************************
start:
event SysMessage Target your Hold
  set #targcurs 1
  while #targcurs = 1
   wait
  set %nest #ltargetid


    if #findkind = -1
    goto start


; **************************************

; *********************************
start:
event SysMessage Target your Hold
  set #targcurs 1
  Target 5s
  while #targcurs = 1
   wait
  set %nest #ltargetid

 FindItem #lTargetID G_2 ; Look for the clicked Nest on the ground 2 Tiles around the Paperdoll
    if #FinCnt = 0 ; #findkind = -1   <- To use any result, like FindKind or FindCnt, you have to FindItem something before, otherwise you end up working with "old" results from any FindItem action you have done before !?
     goto start


; **************************************
« Last Edit: November 06, 2011, 10:27:13 PM by rana70 »

Offline camotbik

  • Sr. Member
  • *
  • Posts: 349
  • Activity:
    0%
  • Reputation Power: 3
  • camotbik has no influence.
  • Gender: Male
  • Hello! I'm a UO addict.
  • Respect: +38
  • Referrals: 0
    • View Profile
Re: Rare Serpent Egg "Medusa"
« Reply #2 on: November 08, 2011, 03:22:56 AM »
0
Just a quickie? Why would you want to target the nest, as the 10% of nests hidden in the mountains(are out of sight)? So you collect the eggs bit slower.. Anyway, lets look at what you got.

Code: [Select]
set %nest PBN
set %flute RGP   ; Charmer Flute
set %snakes QE_JD_FB
; *********************************
start:
event SysMessage Target your Hold
  set #targcurs 1
  while #targcurs = 1
   wait
  set %nest #ltargetid


    if #findkind = -1 ;< -------- as rana70 said, there is no finditem before this code, so it's useless
    goto start


; **************************************
flute:
finditem RGP C_ , #Backpackid
; we are missing if statement check
; if #findcnt > 0
; {
set #lobjectID #findID
set #ltargetkind 1
  wait 5
  event macro 17
  wait 5
; }  
; ***********************************
repeat
finditem %snakes G_8
if #findkind = -1 ; if #findkind = - 1 <----we are doing what? There are no statement lines, it would just stuck in a repeat until #chargost = no looop..
until #charghost = yes
{
    wait 1s
    set %snake #findid
    wait 1s
    set #ltargetid #findid
    set #ltargetkind 1
    event macro 22
}
ignoreitem %snakes ;  <---- do you really want to ignore %snakes(types of snakes), not %snake(current found snake)?

;halt

; *************************************
; repeat
; finditem %nest G_4
; if #findkind <> -1
; until #charghost = yes
{ ; <---- as we dont have a staement here, we are just wasting our lines with the brackets.
    wait 1s
    set %nest #findid
    set #ltargetid #findid
    set #ltargetkind 2
    event macro 22
    wait 10
} ;  <---- the same here.
{
       scanjournal %i ;  <---- you dont even have a i% setup anywhere..
       if You_don't_seem_to_be_able_to_persuade_that_to_move. in #journal || Someone_else_is_already_taming_this. in #journal || The_animal_walks_where_it_was_instructed_to.
       {
          goto flute
           }
}
goto start

Please take a look at these topics.
http://wiki.easyuo.com/index.php?title=Sub
http://wiki.easyuo.com/index.php?title=Repeat..until
http://wiki.easyuo.com/index.php?title=JIndex
http://www.scriptuo.com/index.php?topic=8759.0
http://www.scriptuo.com/index.php?topic=978.0

« Last Edit: November 08, 2011, 03:25:56 AM by camotbik »
What you witness -- is whatver..
uogamers hybrid.

Offline HardY-

  • Full Member
  • ***
  • Posts: 237
  • Activity:
    0%
  • Reputation Power: 3
  • HardY- has no influence.
  • Gender: Male
  • Respect: +16
  • Referrals: 3
    • View Profile
Re: Rare Serpent Egg "Medusa"
« Reply #3 on: November 08, 2011, 08:54:26 AM »
0
why use the snake charm, just click on the nest and put your hand isnt faster?

Offline The GhostTopic starter

  • Elite
  • *
  • *
  • Posts: 1917
  • Activity:
    0%
  • Reputation Power: 25
  • The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.
  • Respect: +245
  • Referrals: 0
    • View Profile
Re: Rare Serpent Egg "Medusa"
« Reply #4 on: November 08, 2011, 01:12:11 PM »
0
Don't seen to be faster , last time I try have on egg in 1 Hrs and friend got 6 with the flute,  

I when back to basic and thx camotbik  for pointing the mistake  and taking ur time to explain them, made me understand a bit more.  I will  expand  from this build and see what I can do,  Still have to traget manually but it 80% better then I was.  

Code: [Select]
;
set %nest PBN
set %flute RGP   ; Charmer Flute facing east
set %snakes QE_JD_FB
; *********************************
start:
gosub charming
goto start
; **************************************
sub charming
wait 10
Finditem %flute C_ , #BACKPACKID
Set #lobjectid #findid
event macro 17
; ***********************************
;set %snake #findid
finditem %snakes G_10
set #ltargetid #findid
set #ltargetkind 1
set %snake #findid
target
event macro 22
wait 8s
ignoreitem %snake
return


Been using this version for the last 2hrs andwork it fine.  Need to tweak the ignoreitem a bit that about it.
Code: [Select]
;
set %nest PBN
set %flute RGP   ; Charmer Flute
set %snakes QE_JD_FB
; *********************************
start:
gosub charming
goto start
; **************************************
sub charming
for %1 %journalindex #jindex
{
   scanjournal %i
       if The_charm_seems_to_wear_off. in #Journal
       {
        gosub ignore
        }
}
wait 10
Finditem %flute C_ , #BACKPACKID
Set #lobjectid #findid
event macro 17
; ***********************************
finditem %snakes G_10
set #ltargetid #findid
set #ltargetkind 1
set %snake #findid
target
event macro 22
wait 8s
ignoreitem %snake
return

sub ignore
deletejournal
ignoreitem reset
return
« Last Edit: November 08, 2011, 05:28:17 PM by The Ghost »

Offline camotbik

  • Sr. Member
  • *
  • Posts: 349
  • Activity:
    0%
  • Reputation Power: 3
  • camotbik has no influence.
  • Gender: Male
  • Hello! I'm a UO addict.
  • Respect: +38
  • Referrals: 0
    • View Profile
Re: Rare Serpent Egg "Medusa"
« Reply #5 on: December 06, 2011, 02:15:58 PM »
0
You are still not using brackets on finditems, that can mess up your whole script!! I have wrote a tutorial, take a look here - http://www.scriptuo.com/index.php?topic=8759.0
What you witness -- is whatver..
uogamers hybrid.

Tags: