Signup Now
Results 1 to 6 of 6

Thread: Bank Transfer

  1. #1
    Free User
    Join Date
    Jun 2014
    Posts
    67
    Reputation
    10
    Rep Power
    20

    Bank Transfer

    Hello guys,

    I need a simple persistent script which will transfer money from my bank account to another one every hour.

    I'm a newbie in scripting, so maybe I gonna explain You how should it work and You gonna just translate it into lua language, its pretty simple for someone who know it a bit.

    So how this script should work;

    1. Every one hour check if NPC chat is open then;
    if not, then;
    open the NPC chat, then;
    (or) if opened, then;
    2. Say "Hi", "Balance", then;
    if account balance <XXX gps, then;
    say "Bye"; then;
    Close NPC chat;
    (or) if account balance >XXX gps, then;
    say "Transfer", "YYY gps - standard XXX gps some", "<character name>", then;
    say "Bye"; then;
    Close NPC chat;


    So for example, if standard some of gps is 1000 gps, it would looks like this:

    1. Every one hour check if NPC chat is open then;
    if not, then;
    open the NPC chat, then;
    (or) if opened, then;
    2. Say "Hi", "Balance", then;
    if account balance 800 (<1000) gps, then;
    say "Bye"; then;
    Close NPC chat;
    (or) if account balance 1200 (>1000) gps, then;
    say "Transfer", "200 (1200-1000=200)", "<Banana Eater>", then;
    say "Bye"; then;
    Close NPC chat;


    Hope You will help me! Thank You very much friends!

  2. #2
    Free User Diaxy's Avatar
    Join Date
    Jul 2014
    Posts
    1,091
    Reputation
    94
    Rep Power
    22
    Add this part to your bank action.

    init start
    local AmountToSave = 1000 -- in gold
    local nick = "Tomurka" -- character to transfer gold
    init end

    npcsay("balance")
    if $balance > AmountToSave then
    npcsay("transfer "..$balance-AmountToSave.." to "..nick)
    wait(500,1000)
    npctalk("yes")
    wait(500,1000)
    npcsay("balance")
    end

  3. #3
    Free User
    Join Date
    Jun 2014
    Posts
    67
    Reputation
    10
    Rep Power
    20
    Thanks buddy, just tell me if I wanna that script will be repeated every 30 minutes i can put on script:


    auto ()


    But what's the value for 30 minutes? 180000?

  4. #4
    Free User Diaxy's Avatar
    Join Date
    Jul 2014
    Posts
    1,091
    Reputation
    94
    Rep Power
    22
    Quote Originally Posted by madma View Post
    Thanks buddy, just tell me if I wanna that script will be repeated every 30 minutes i can put on script:


    auto ()


    But what's the value for 30 minutes? 180000?
    Are you going to use script just to transfer money, or you gonna exp too?

  5. #5
    Free User
    Join Date
    Jun 2014
    Posts
    67
    Reputation
    10
    Rep Power
    20
    Just for transfer money buddy, as persistant script, there is no need to set location cause I put my character always on bank in thais, so if he say "hi" he will automatically speak with the npc behind him

  6. #6
    Moderator Dehan's Avatar
    Join Date
    Dec 2013
    Posts
    1,404
    Reputation
    315
    Rep Power
    26
    Quote Originally Posted by madma View Post
    Just for transfer money buddy, as persistant script, there is no need to set location cause I put my character always on bank in thais, so if he say "hi" he will automatically speak with the npc behind him
    you can use
    auto(30*60*1000)

    1000 = 1 second, 60 = 60 seconds = 1 minute, 30 = 30 minutes
    so the math result will be exactly 30 minutes.

    Level Latest Scripts by Dehan
    250+
    [EK & ED & MS & RP] [Navigation] Prison -1
    200+
    [EK & ED & MS] [Navigation] Asura Palace
    200+
    [EK & ED] [Navigation] Lower Roshamuul Softcore

 

 

Posting Permissions

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