ScriptUO

Official ScriptUO EasyUO Scripts => Scripting Chat => Topic started by: Crisis on September 15, 2013, 09:08:02 AM

Title: Question on grabbing amounts
Post by: Crisis on September 15, 2013, 09:08:02 AM
I am working on an inscription script and am wondering on the best way to grab an amount of regs based on the amount of something that I am making. My menu has the combo box where a spell can be chosen and there is an edit box where you can edit how many of the scroll to make. I have never coded anything that multiplies the amount of regs needed by the amount that is being made so not sure how to code it.

Here is an example of the Clumsy Scroll
Code: [Select]
sub Item1ma  ; Clumsy Scroll
    set %mana 4
    set %regs %bm , _ , %ns
    set %current QXL
    set %clumsy QXL
    set %makestr Clumsy
    set %XClick1 27    ; First Circle
    set %YClick1 90
    set %XClick2 230   ; Clumsy
    set %YClick2 70
    set %numclick 2
return

Any suggestions?
Title: Re: Question on grabbing amounts
Post by: dxrom on September 15, 2013, 11:29:15 AM
Why  not just have it pull out 500 or 1000 of the reg required and use it until it doesn't have the base amount of required reg? Then restock.
Title: Re: Question on grabbing amounts
Post by: Crisis on September 15, 2013, 12:32:39 PM
That's how I have it set up now, just thinking it mat be faster to pull out exact amounts.
Title: Re: Question on grabbing amounts
Post by: dxrom on September 15, 2013, 12:48:33 PM
Perhaps. it'd take a bit more coding however. You need to code the base amounts in and multiply that.

sub ItemToMake
set ( %resource 5 * %numerOfItems )
set ( %resource2 6 * %numberOfItems )
return