Results 1 to 1 of 1

Thread: I need your help: moving supply from depot

  1. #1
    iBot User
    Join Date
    Sep 2012
    Posts
    239
    Mentioned
    10 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    46 Post(s)
    Reputation
    23
    Rep Power
    5

    I need your help: working with 3 arrays.

    I have two bps:
    SupplyBP
    DepotBP

    And the total ( == ) supply amount that I want to have in the SupplyBP are:
    MPname = "mana potion"
    MPamount = 100
    AMMOname = "power bolt"
    AMMOamount = 50

    In other words, we'll have 3 arrays here:

    PHP Code:
    Array1 = {MPnameAMMOname//items names
    Array2 = {MPamountAMMOamount//desired items amount to have in SupplyBP ( == )
    Array3 = {xxxx//itemcount(Array1, DepotBP) 
    A loop checking for all items and comparing values so that if there's unequal ( ~= ) Array2 in the SupplyBP, do nothing until DepotBP has zero amount of anything (Array3) to offer, then open the next DepotBP.

    PS: this action is NOT for moving anything, it will merely check if DepotBP has anything to offer to the SupplyBP:
    PHP Code:
    while itemcount(array1SupplyBP) ~= Array2 and itemcount(Array1DepotBP) > do
    //do nothing
    else
    openitem(DepotBPDepotBP)
    end 
    Last edited by john86; 04-27-2013 at 11:07 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •