Results 1 to 6 of 6

Thread: Transfer cash

  1. #1
    Normal User Bartesh's Avatar
    Join Date
    Jul 2012
    Posts
    121
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    11
    Rep Power
    5

    Question Transfer cash

    Hello!

    I want to do action which transfer cash automatically from my moneymaker's to my other char.
    For example
    say ('hi')
    npcsay ('balance')
    npcsay ('transfer {balance-1000}')

    But i don't know how to do this, how write action with my full balance - 1000 gp.

    Anyone could help me? Thanks in advance!

  2. #2
    iBot User pink_panther's Avatar
    Join Date
    May 2012
    Location
    Australia
    Posts
    4,075
    Mentioned
    49 Post(s)
    Tagged
    1 Thread(s)
    Quoted
    178 Post(s)
    Reputation
    309
    Rep Power
    10
    You almost had it....

    PHP Code:
    local amountToSave 10000
    local transferTo 
    "Your Mother"

    npcsay("Hi")
    wait(300,600)
    npcsay("Deposit all")
    wait(300,600)
    npcsay("Yes")
    wait(300,600)
    npcsay("Balance")
    wait(1300,1600)
    npcsay("Transfer "..balance-amountToSave.." to "..transferTo)
    wait(300,600)
    npcsay("Yes")
    wait(1300,1600
    "balance" is a built in variable, but you need to ask for your balance first.
    Last edited by pink_panther; 07-19-2012 at 07:01 PM.

  3. #3
    iBot User
    Join Date
    Jun 2012
    Posts
    20
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    5
    PHP Code:
    local amountToSave 10000
    local transferTo 
    "Your Mother"

    npcsay("Hi")
    wait(300,600)
    npcsay("Deposit all")
    wait(300,600)
    npcsay("Yes")
    wait(300,600)
    npcsay("Balance")
    wait(1300,1600)
    if 
    balance amountToSave then
    npcsay
    ("Transfer "..balance-amountToSave.." to "..transferTo)
    wait(300,600)
    npcsay("Yes")
    wait(1300,1600)  
    end 
    maybe should add this too so it doesnt try to transfer negative amount of money

  4. #4
    Normal User Bartesh's Avatar
    Join Date
    Jul 2012
    Posts
    121
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    11
    Rep Power
    5
    Thanks a lot!

  5. #5
    Normal User
    Join Date
    Jul 2012
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    5
    This dont work it says "transfer -1 to ....." first time, but the second time it works. How to fix this? :/

  6. #6
    Premium User Norkk's Avatar
    Join Date
    Jan 2013
    Location
    BH - MG - Brazil
    Posts
    1,167
    Mentioned
    78 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    207 Post(s)
    Reputation
    135
    Rep Power
    7
    It probably happens, because on first time, bot do not know how many gold you got on your bank account, maybe saying balance before everything will make it work.
    Quote Originally Posted by ohman92 View Post
    This dont work it says "transfer -1 to ....." first time, but the second time it works. How to fix this? :/
    My Scripts - Norkk Free Scripts
    New Project - Norkk Project

    EK 208 sold to @yhuel

Tags for this Thread

Posting Permissions

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