Author Topic: AddCraftedItems  (Read 2488 times)

0 Members and 1 Guest are viewing this topic.

Offline CrisisTopic starter

  • Global Moderator
  • *
  • *
  • Posts: 3014
  • Activity:
    4%
  • Reputation Power: 41
  • Crisis is a force to reckon with.Crisis is a force to reckon with.Crisis is a force to reckon with.Crisis is a force to reckon with.Crisis is a force to reckon with.Crisis is a force to reckon with.Crisis is a force to reckon with.Crisis is a force to reckon with.
  • Gender: Male
  • Scripting well enough to break things!
  • Respect: +206
  • Referrals: 2
    • View Profile
AddCraftedItems
« on: July 06, 2017, 03:41:41 PM »
0
I am trying to finish a long past due major inscription script. I adjusted it so that it totals the crafted items instead of the attempts but I have run into a snag. When crafting a large number of scrolls, it moves a number of scrolls out of the backpack due to weight. The problem arises that it does not keep the count, but it starts over. Here is the code:

Code: [Select]
Sub AddCraftedItems
   finditem %Mage_Scrolls C_ , #backpackid
   set %crafted ( #findstack + %stackmoved )
   Menu Font Size 10
   Menu Font Color Black
   menu set Crafted %crafted
Return

It is not continuing to count the scrolls moved. So when I set it up to make 200 recalls, I had over 400 when I tabbed back to the screen and it was still crafting away.

Offline The Ghost

  • 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: AddCraftedItems
« Reply #1 on: July 06, 2017, 03:48:10 PM »
0
If you need some inspiration you can always look at  TG Crafting Factory.
http://www.scriptuo.com/index.php?topic=13169.0


Here the 2 main sub that kept my count. 
Code: [Select]
;;======================= TG_Clear Field =============================
 ; gosub TG_ClearPack (Item) (Container)
sub TG_ClearField
; %1 Item to move
; %2 Container to move too
Namespace Push
   Namespace Local TGCF
  finditem %1 G_2
  if #findcnt < 1 2
    NameSpace Pop
    return
  for #findindex 1 #findcnt
  {
    set %count %count + #findstack
    gosub DisplayCount
    exevent drag #findid #findstack
    exevent dropc %2
    wait 20
  }
  Namespace Pop
return
 ;=========================================================

Code: [Select]
; =================  Display Counter =============================
sub DisplayCount
  menu Font Name MS Sans Serif
  menu Font Size 8
  menu Font Style
  set %text %count , #SPC , %made
  menu delete EUOLabel4
  menu Text EUOLabel4 168 128 %text
return
; ---------------------------------------------------

Tags: