Author Topic: Power Scroll scan script  (Read 3565 times)

0 Members and 1 Guest are viewing this topic.

Offline TholomewTopic starter

  • Newbie
  • *
  • Posts: 9
  • Activity:
    0%
  • Reputation Power: 0
  • Tholomew has no influence.
  • Respect: 0
  • Referrals: 0
    • View Profile
Power Scroll scan script
« on: January 22, 2009, 05:28:09 AM »
0
Hi,

I want to make a script that looks at all powerscrolls in a bag, I set all prices for what there worth within the script. And the script will total the amounts and display Total.

Here is some code, its just test to show, if this would be the best way to go about it. I know its not proper, its just showing you the basic flow.

Code: [Select]
finditem XXXX
if #property = 120 Swordsmanship
 {
  set amount + 0.5
  some ignore code
  return
 }
 if #property = 120 Macing
 {
  set %amount + 1
  some ignore code
  return
 }
 if #property = 120 Magery
 {
  set %amount + 12
  some ignore code
  return
 }
 if #property = 120 Ninjitsu
 {
  set %amount + 1
  some ignore code
  return
 }
 if #property = 120 Healing
 {
  set %amount + 0.2
  some ignore code
  return
 }
 
 Totals all the amounts and Displays

So like this id need to do that to every 120 powerscroll/stat scroll and a couple 15's Dont care rest.

Anyway any thoughts would be good. Thanks!

Offline _C2_

  • AFK FtW
  • Global Moderator
  • *
  • *
  • Posts: 4077
  • Activity:
    0%
  • Reputation Power: 48
  • _C2_ has great potential!_C2_ has great potential!_C2_ has great potential!_C2_ has great potential!_C2_ has great potential!_C2_ has great potential!_C2_ has great potential!_C2_ has great potential!_C2_ has great potential!
  • RIP Pen Trick
  • Respect: +254
  • Referrals: 4
    • View Profile
Re: Power Scroll scan script
« Reply #1 on: January 22, 2009, 07:41:43 AM »
0
I'll post what i use as a scroll broker.  I have all the prices below and then combine all the same priced scrolls on the same line.  There are easier ways than what i did but it is very accurate and does multiple bags.

You can use it as a reference or just use it.  I am sure there are ways to shorten the code but wasn't trying to go super short, just super accurate...hehe.  when i get home i will attach it
« Last Edit: January 22, 2009, 07:43:18 AM by _C2_ »

Offline TholomewTopic starter

  • Newbie
  • *
  • Posts: 9
  • Activity:
    0%
  • Reputation Power: 0
  • Tholomew has no influence.
  • Respect: 0
  • Referrals: 0
    • View Profile
Re: Power Scroll scan script
« Reply #2 on: January 22, 2009, 02:14:36 PM »
0
Oh great! Cheers

Offline TrailMyx

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13302
  • Activity:
    0.2%
  • Reputation Power: 154
  • TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!
  • Gender: Male
  • Viper!
  • Respect: +1349
  • Referrals: 33
    • View Profile
    • ScriptUO
Re: Power Scroll scan script
« Reply #3 on: January 22, 2009, 02:17:57 PM »
0
I see you are using decimals in your examples.  Remember that EasyUO is an integer-only based interpreter.  ;)
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline _C2_

  • AFK FtW
  • Global Moderator
  • *
  • *
  • Posts: 4077
  • Activity:
    0%
  • Reputation Power: 48
  • _C2_ has great potential!_C2_ has great potential!_C2_ has great potential!_C2_ has great potential!_C2_ has great potential!_C2_ has great potential!_C2_ has great potential!_C2_ has great potential!_C2_ has great potential!
  • RIP Pen Trick
  • Respect: +254
  • Referrals: 4
    • View Profile
Re: Power Scroll scan script
« Reply #4 on: January 22, 2009, 07:07:22 PM »
0
yeah so here it is.  i basically event prop scrolls and look for the key word combos and add all the same priced ones into the same line with || statements.

There is a price list at the bottom that covers a wide range for me and everything that I am paying the same for is added all at once as it evals scrolls for that line.

Not the best code but works perfectly.

oh yeah - this was never designed for public so i would like to credit rana70 and i think for the commas advice in the final total.

mode:
-sets up values automatically
-asks you to target bag and opens it.  only adds scrolls up inside the targeted bag.  loose stuff in pack or bank won't  mess it up.
-asks if u want to calc another bag.
-if no adds commas (thx rana) and posts in display.  if yes adds on another bag to total and displays.  can do unlimited bags!

There are 1 attachment(s) in this post. You must register and post an acceptable introduction to download
scroll calc 1.0.txt
« Last Edit: January 22, 2009, 07:10:36 PM by _C2_ »

Offline TholomewTopic starter

  • Newbie
  • *
  • Posts: 9
  • Activity:
    0%
  • Reputation Power: 0
  • Tholomew has no influence.
  • Respect: 0
  • Referrals: 0
    • View Profile
Re: Power Scroll scan script
« Reply #5 on: January 22, 2009, 08:29:31 PM »
0
Ah great! Thanks ill let you know how i get on.

Offline TholomewTopic starter

  • Newbie
  • *
  • Posts: 9
  • Activity:
    0%
  • Reputation Power: 0
  • Tholomew has no influence.
  • Respect: 0
  • Referrals: 0
    • View Profile
Re: Power Scroll scan script
« Reply #6 on: January 22, 2009, 10:53:46 PM »
0
Nice working, I just made it so everything called a price individually because my buy prices will change too frequent.

And added some msg instead of display haha like Calculating... at start and then Order Total: %totalamount

also made a version to skip setting up bags incase they dump them in trade window:X

Thanks a lot

Offline _C2_

  • AFK FtW
  • Global Moderator
  • *
  • *
  • Posts: 4077
  • Activity:
    0%
  • Reputation Power: 48
  • _C2_ has great potential!_C2_ has great potential!_C2_ has great potential!_C2_ has great potential!_C2_ has great potential!_C2_ has great potential!_C2_ has great potential!_C2_ has great potential!_C2_ has great potential!
  • RIP Pen Trick
  • Respect: +254
  • Referrals: 4
    • View Profile
Re: Power Scroll scan script
« Reply #7 on: January 23, 2009, 05:02:07 AM »
0
NP- glad it gave u something to fuss with!   ;)

Tags: