Official ScriptUO EasyUO Scripts > Scripting Chat

Power Scroll scan script

(1/2) > >>

Tholomew:
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: ---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
--- End code ---

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!

_C2_:
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

Tholomew:
Oh great! Cheers

TrailMyx:
I see you are using decimals in your examples.  Remember that EasyUO is an integer-only based interpreter.  ;)

_C2_:
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!

Navigation

[0] Message Index

[#] Next page

Go to full version