Author Topic: Monger Quest, Small Create property reading  (Read 8902 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
Monger Quest, Small Create property reading
« on: October 05, 2011, 06:58:47 PM »
0
No sure if you guy are able to help me.  I'm working on a script to be able to read the small create form the Monger quest and can't figure out.  Can anyone point me  in the right direction, because it not easy to do it by hand, lot of info to remember. 

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: Monger Quest, Small Create property reading
« Reply #1 on: October 06, 2011, 05:56:23 PM »
0
I would look into TM's Split String SUB I've used it on this particular script myself works great....

www.scriptuo.com/index.php?topic=1101.0;highlight=tm_splitstring
« Last Edit: October 06, 2011, 05:58:07 PM by Khameleon »

Offline NObama

  • Everything I need to know, I learned from Miffy's Item Finder.
  • Elite
  • *
  • *
  • Posts: 3454
  • Activity:
    0%
  • Reputation Power: 43
  • NObama is a force to reckon with.NObama is a force to reckon with.NObama is a force to reckon with.NObama is a force to reckon with.NObama is a force to reckon with.NObama is a force to reckon with.NObama is a force to reckon with.NObama is a force to reckon with.
  • Respect: +161
  • Referrals: 2
    • View Profile
Re: Monger Quest, Small Create property reading
« Reply #2 on: October 06, 2011, 07:26:15 PM »
0
If you just want to know what's required by a particular crate, event property is what you'll need.  http://wiki.easyuo.com/index.php?title=Event_Property

If you want to parse the crate information for use in a helper-type script...It is initially complex, until you understand how to use #property and str commands.  I learned how to use them on this very problem.  Recommend you spend some time on the documentation over at EUO:  http://wiki.easyuo.com/index.php?title=Str_%28command%29

There is a fabulous tutorial that explains how to do the math.

There are a couple of steps you need to do to accomplish what you seek:

1) Strip out all string information until you're left with just the fish type and quantity.  Here's a bit to get you started.  It won't make sense until you've read the tutorial over at EUO I linked above.

Code: [Select]
set %string #property
str Pos %string $
str del %string 1 #strres
set %string #strres
str Pos %string $
str del %string 1 #strres
set %string #strres
str Pos %string Deliver
set #strres #strres - 1
str Left %string #strres
set %string #strres
set %stringkey %string

2) Once you've done that, you'll then need to load all the fish types and numbers for a particular crate into memory.  I recommend TM's Array handling functions.

3) Presumably, you'll also want to read the property string to determine where to deliver it.

4) At some point, you'll run afoul of blank spaces.  Familiarize yourself with TM's Add Underscore routine to overcome the problem.

Fair warning:  It's a couple hundred lines of code to create something that will understand how many crates you have, which and how many fish belong in each and where to deliver them.



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: Monger Quest, Small Create property reading
« Reply #3 on: October 06, 2011, 10:06:58 PM »
0
Thx for the input,  I have use the Event #property  and  find out that can only read on create at the time.   The string of lie are long so far, 54 fish/crab ID and sub routine and the quantity as well.  It will get better when I have all 20 Qty.    I will keep writing few lines of code every day until I'm done. 

Offline Crome969

  • Elite
  • *
  • *
  • Posts: 2098
  • Activity:
    0%
  • Reputation Power: 25
  • Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.
  • Gender: Male
  • UO Enthusiast
  • Respect: +211
  • Referrals: 10
    • View Profile
    • ScriptSDK
Re: Monger Quest, Small Create property reading
« Reply #4 on: October 06, 2011, 11:35:19 PM »
0
Thx for the input,  I have use the Event #property  and  find out that can only read on create at the time.   The string of lie are long so far, 54 fish/crab ID and sub routine and the quantity as well.  It will get better when I have all 20 Qty.    I will keep writing few lines of code every day until I'm done. 
Each Line of Property is splitted with $ in the Property. When the Crate always only have the same amount of lines  you could do a Static count of $ then switch to the number of it. After that Scan from there some tiles before

Example:
Quote
A Bag of Sending $ Weight: 1 Stone $ Charges: 9$
I calculate the Lenght and know if Lenght = 48 then its a number with 1 Digit, if 49 then with 2, if 50 then with 3
then i using
Quote
str len #property
set %length #strres
set %jumper %length - 1
str pos #property 47 %jumper
display #strres
Untested but should work;) He goes then from 47 to 47 and return 1 Digit. with 2 Digites he take 47-48, at 3 Digits 47-49, if Osi would support even more you could add it up to infinite

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: Monger Quest, Small Create property reading
« Reply #5 on: October 16, 2011, 11:01:39 PM »
0
 After long hour I figure out how to get the Property of the crate and grab the list.  Where I have small problem is the Deepsea fish have 3  fish with Red.  Red Grouper, Red Drum, Red Snook.

 I have try to use  
Quote
if Red in #property && Grouper in #property
and
                          
Quote
if Red in #property || Grouper in #property

both type grab all three fish type. Any suggestion on how to only grab the right one.  

THx
« Last Edit: October 16, 2011, 11:07:14 PM by The Ghost »

Offline Crome969

  • Elite
  • *
  • *
  • Posts: 2098
  • Activity:
    0%
  • Reputation Power: 25
  • Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.
  • Gender: Male
  • UO Enthusiast
  • Respect: +211
  • Referrals: 10
    • View Profile
    • ScriptSDK
Re: Monger Quest, Small Create property reading
« Reply #6 on: October 17, 2011, 02:18:47 AM »
0
After long hour I figure out how to get the Property of the crate and grab the list.  Where I have small problem is the Deepsea fish have 3  fish with Red.  Red Grouper, Red Drum, Red Snook.

 I have try to use  
Quote
if Red in #property && Grouper in #property
and
                          
Quote
if Red in #property || Grouper in #property

both type grab all three fish type. Any suggestion on how to only grab the right one.  

THx

You are using an "or" Statement in second part of your "Example Code".
Following will happen:
Test Property(its a fake!)
Quote
A Red Grouper $ Weight: 1 Stone $
Quote
Your statement 1:
if ( Red in  #property) => Returns True
&& (and)
(Grouper #in Property) => Returns True.

If Both is in your Current Property do your Code

Second Statement:
Quote
if ( Red in  #property) => Returns True
|| (or)
(Grouper #in Property) => Returns True.

When one of these Statements Returns true then do your Code.
Result:
Unless you dont Filter more he will find with both methods any Items wich Contains
Quote
Red
and
Quote
Grouper
. When only Contains one of these the he will find it only with the Second Statement.


Crome

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: Monger Quest, Small Create property reading
« Reply #7 on: October 17, 2011, 03:35:00 AM »
0
After long hour I figure out how to get the Property of the crate and grab the list.  Where I have small problem is the Deepsea fish have 3  fish with Red.  Red Grouper, Red Drum, Red Snook.

 I have try to use  
Quote
if Red in #property && Grouper in #property
and
                          
Quote
if Red in #property || Grouper in #property

both type grab all three fish type. Any suggestion on how to only grab the right one.  

THx

Code: [Select]
 if Red in #property && Grouper notin #property ; if only red in property
  ...
  if Grouper in #property && Red notin #property ; if only Grouper in property
  ...
  if Red , #spc , Grouper in #property ; if Red Grouper in property
And few other examples
Code: [Select]
if Pike in #property && Dungeon notin #property && Tormented notin #property
 ....
if Lobster in #property && Blood notin #property && Crusty notin #property && Dread notin #property && Fred notin #property && Hummer notin #property && Rock notin #property && Shovel-Nose notin #property && Spiney notin #property && Void notin #property
....
if Crab in #property && Apple notin #property && Blue notin #property && Dungeness notin #property && King notin #property && Rock notin #property && Snow notin #property && Tunnel notin #property && Void notin #property
....
« Last Edit: October 17, 2011, 03:37:21 AM by camotbik »
What you witness -- is whatver..
uogamers hybrid.

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: Monger Quest, Small Create property reading
« Reply #8 on: October 17, 2011, 01:58:46 PM »
0
Thx camotbik,  nice info,    Now that I have all the ID and fish list, if pick up all the same group ( shore/sea/dungeon or Crab) if anyone is present.  

Here my #property:  
Quote
Small Crate$Weight: 1 Stone$Rock Lobster: 0/20$Shovel-Nose Lobster: 0/20$Mahi-Mahi: 0/20$Bluefish: 0/20$Red Drum: 0/20$Deliver To Britain$NO-TRADE$Contents: 0/125 Items, 0/1200 Stones$
.  

so using this code it should pick the one that are listed in my #property but it drags all the deep sea  fish, ignore the shore and Dungeon fish.   All my fishand crab are in the same chest. Not sure what I did wrong here.  
finditem is the ID of my stack.  
  
Code: [Select]
if Amberjack in #property                ; Amberjack
set %chest %container1
finditem IWKZOPD C_ , %chest
exevent drag #findid 20
exevent dropc %packie
wait %waittime
if Black , #spc , Seabass in #property          ; Black_Seabass
set %chest %container1
finditem PZJZOPD C_ , %chest
exevent drag #findid 20
exevent dropc %packie
wait %waittime
if Blue , #spc , Grouper in #property              ; Blue_Grouper
set %chest %container1
finditem PMWYOPD C_ , %chest
exevent drag #findid 20
exevent dropc %packie
wait %waittime
if Red , #spc , Drum in #property      ; Red Drum
set %chest %container1
finditem HQLZOPD C_ , %chest
exevent drag #findid 20
exevent dropc %packie
wait %waittime
if Red , #spc , Grouper in #property    ; Red Grouper
set %chest %container1
finditem BNRZOPD C_ , %chest
exevent drag #findid 20
exevent dropc %packie
wait %waittime
if Red , #spc , Snook in #property     ; Red Snook
set %chest %container1
finditem MIFZOPD C_ , %chest
exevent drag #findid 20
exevent dropc %packie
wait %waittime

Edit
ok I find a way to make it work but  I'm sure it not the best way.   Make the script long and slow.
Code: [Select]
if Amberjack notin #property
goto DS1
if Amberjack in #property                ; Amberjack
set %chest %container1
finditem IWKZOPD C_ , %chest
exevent drag #findid 20
exevent dropc %packie
wait %waittime
DS1:
if Black , #spc , Seabass notin #property
goto DS2
if Black , #spc , Seabass in #property     ; Black_Seabass
set %chest %container1
finditem PZJZOPD C_ , %chest
exevent drag #findid 20
exevent dropc %packie
wait %waittime
« Last Edit: October 17, 2011, 09:52:21 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: Monger Quest, Small Create property reading
« Reply #9 on: October 18, 2011, 01:27:03 AM »
0
well for the first of all, you are missing brackets!!! That is why you are executing all the lines i.e. taking all the items.

In this example you can see, how lines are only executed if statement is checked.

Code: [Select]
if greeen , #spc , stinky , #spc , brass in #property
{   ; open statment if green stinky brass in property
  finditem %greenstinkybrass C_ , %fish_container
  if #findcnt > 0
  { ; open statment if green stinky brass found
    exevent drag #findid %ammount
    exevent dropc #backpackid
    wait 20
  } ; close statment if green stinky brass found
  else ; open statement if green stinky brass not found
  {
    display Green stinky brass not found!
    stop
  } ; close statement if green stinky brass not found
} ; close statment if green stinky brass in property

so the slight changes, should help you with your problem.
Code: [Select]
if Amberjack in #property                ; Amberjack
{
  set %chest %container1
  finditem IWKZOPD C_ , %chest
  exevent drag #findid 20
  exevent dropc %packie
  wait %waittime
}
if Black , #spc , Seabass in #property          ; Black_Seabass
{
  set %chest %container1
  finditem PZJZOPD C_ , %chest
  exevent drag #findid 20
  exevent dropc %packie
  wait %waittime
}
if Blue , #spc , Grouper in #property              ; Blue_Grouper
{
  set %chest %container1
  finditem PMWYOPD C_ , %chest
  exevent drag #findid 20
  exevent dropc %packie
  wait %waittime
}
if Red , #spc , Drum in #property      ; Red Drum
{
  set %chest %container1
  finditem HQLZOPD C_ , %chest
  exevent drag #findid 20
  exevent dropc %packie
  wait %waittime
}
if Red , #spc , Grouper in #property    ; Red Grouper
{
  set %chest %container1
  finditem BNRZOPD C_ , %chest
  exevent drag #findid 20
  exevent dropc %packie
  wait %waittime
}
if Red , #spc , Snook in #property     ; Red Snook
{
  set %chest %container1
  finditem MIFZOPD C_ , %chest
  exevent drag #findid 20
  exevent dropc %packie
  wait %waittime
}
« Last Edit: October 18, 2011, 01:35:43 AM by camotbik »
What you witness -- is whatver..
uogamers hybrid.

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: Monger Quest, Small Create property reading
« Reply #10 on: October 18, 2011, 10:11:39 AM »
0
I made the changes you said and it work, thx lot,  that remove a few line of codes.  Really appreciate they  input you give me.

Edit:   silly me, my packhorse dead and forget to change his ID.
« Last Edit: October 18, 2011, 06:10:49 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: Monger Quest, Small Create property reading
« Reply #11 on: October 18, 2011, 10:28:15 AM »
0
I made the changes you said and it work, thx lot,  that remove a few line of codes.  Really appreciate they  input you give me.

Make sure you read this tutorial - http://www.scriptuo.com/index.php?topic=8759.0
What you witness -- is whatver..
uogamers hybrid.

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: Monger Quest, Small Create property reading
« Reply #12 on: October 18, 2011, 04:19:05 PM »
0
After running quest for 4 hrs.  I took a break,  return to do quest and now I can't drag any fish  that are in my $ property list.  This is weird,  happen yesterday too.  I sore  that EA changing detail that make my script not functioning properly.

Offline Endless Night

  • Global Moderator
  • *
  • *
  • Posts: 5467
  • Activity:
    0%
  • Reputation Power: 62
  • Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!
  • Respect: +393
  • Referrals: 1
    • View Profile
Re: Monger Quest, Small Create property reading
« Reply #13 on: October 18, 2011, 04:25:14 PM »
0
After running quest for 4 hrs.  I took a break,  return to do quest and now I can't drag any fish  that are in my $ property list.  This is weird,  happen yesterday too.  I sore  that EA changing detail that make my script not functioning properly.

That i very much doubt...  you probably have not covered every scenario.
Outlaw Josey Wales - "Manwink, A Long Gone Scripty, and Endless are always teasing us with their private sections lol. What there realy saying is scripters rule and users drool."
Briza - "Your a living breathing vortex of usefulness."

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: Monger Quest, Small Create property reading
« Reply #14 on: October 18, 2011, 05:35:22 PM »
0
it scan all the property,  I run it with F7 to ensure that it look at all the right line and it find,  the ID still all correct,  not sure what change in the last 4hrs that I run it.  

Edit

Find the problem,  My pet die and forget to reset his ID.   Operator Error :) 
« Last Edit: October 18, 2011, 08:47:27 PM by The Ghost »

Tags: