Results 1 to 4 of 4

Thread: Safe withdraw

  1. #1
    zami84's Avatar
    Join Date
    May 2012
    Posts
    316
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    1 Post(s)
    Reputation
    48
    Rep Power
    5

    Safe withdraw

    Hello. I use this action to withdraw cash.
    I think it is much safer than exact calculation (any one of you sitting in front of a PC with a calculator and withdraw exactly ex. 13250gp?)

    1st part:
    Lua Code:
    local ManaMoney = positive(MPmax - itemcount(MPtype)) * MPprice
    local HpMoney = positive(HPmax - itemcount(HPtype)) * HPprice
    local WornSofts = itemcount(6530) * 10000 + 1000
     
    local All = ManaMoney + WornSofts + HpMoney
     
     
     
    if All <= 10000 then setsettings("Settings\\Actions\\List\\ChashAmount\  \Script", 10000)
        elseif All > 10000 and All <= 20000 then  setsettings("Settings\\Actions\\List\\ChashAmount\  \Script", 20000)
            elseif All > 20000 and All <= 30000 then  setsettings("Settings\\Actions\\List\\ChashAmount\  \Script", 30000)
            elseif All > 30000 and All <= 40000 then  setsettings("Settings\\Actions\\List\\ChashAmount\  \Script", 40000)
            elseif All > 40000 and All <= 50000 then  setsettings("Settings\\Actions\\List\\ChashAmount\  \Script", 50000)
            elseif All > 50000 and All <= 60000 then  setsettings("Settings\\Actions\\List\\ChashAmount\  \Script", 60000)
            elseif All > 60000 and All <= 70000 then  setsettings("Settings\\Actions\\List\\ChashAmount\  \Script", 70000)
            elseif All > 70000 and All <= 80000 then  setsettings("Settings\\Actions\\List\\ChashAmount\  \Script", 80000)
            elseif All > 80000 and All <= 90000 then  setsettings("Settings\\Actions\\List\\ChashAmount\  \Script", 90000)
            elseif All > 90000 and All <= 100000 then  setsettings("Settings\\Actions\\List\\ChashAmount\  \Script", 100000)
            elseif All > 100000 and All <= 110000 then  setsettings("Settings\\Actions\\List\\ChashAmount\  \Script", 110000)
            elseif All > 110000 and All <= 120000 then  setsettings("Settings\\Actions\\List\\ChashAmount\  \Script", 120000)
            elseif All > 120000 and All <= 130000 then  setsettings("Settings\\Actions\\List\\ChashAmount\  \Script", 130000)
            elseif All > 130000 and All <= 140000 then  setsettings("Settings\\Actions\\List\\ChashAmount\  \Script", 140000)
            elseif All > 140000 and All <= 150000 then  setsettings("Settings\\Actions\\List\\ChashAmount\  \Script", 150000)
    end
     
     
    depositall()
    if All > 0 then
        npcsay("withdraw "..getsettings("Settings\\Actions\\List\\ChashAmou  nt\\Script")) wait(1000,1500)
    npcsay("yes") wait(1000,1500)
    npcsay("balance") wait(1000,1500)
    end


    and 2nd part:



    Does anyone have an idea how to do it "shorten"?

  2. #2

    Join Date
    Jul 2012
    Posts
    362
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    45
    Rep Power
    5
    Great, thanks
    I hope there will be automatical version of that script with options to make space between each step like 5k or 2k.


  3. #3
    iBot User Noxuos's Avatar
    Join Date
    Mar 2012
    Location
    iBot Forums
    Posts
    852
    Mentioned
    6 Post(s)
    Tagged
    1 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    167
    Rep Power
    7
    really nice idea!! good job ^^
    123456789123456789

    Script Voc Video Of Script 100% AFK
    [300+]Zao Walls Main Floor And Floor Up Ava SD and Spell Version ED|MS Video On TibiaCast/YouTube
    [200+]Deeplings Stage 1 West Side ED|MS|RP|EK Video On TibiaCast/YouTube
    [150+]Yalahar Bog Raiders Optional Nightmare And Destroyer Elite Knight Video On TibiaCast/YouTube
    •Noxuos Scripts Screen Shot Project Click Here! •Sell 340 RP Open-PVP: Transferable: Pm With Offers Noxuos Scripts Character Shop Click Here

    •New Poll Which voc do you want to see more scripts of? Check out my thread to vote •Sell 264 ED PvP: Transferable: 80 voucher days! •Accepting Tibia Cash On All New Scripts



  4. #4
    Normal User K_ingen's Avatar
    Join Date
    May 2012
    Location
    Sweden
    Posts
    95
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    11
    Rep Power
    5
    Perhaps you should just get the amount of money you need and then add a random amount, a percent to that.

    example:

    Code:
    local ManaMoney = positive(MPmax - itemcount(MPtype)) * MPprice
    local HpMoney = positive(HPmax - itemcount(HPtype)) * HPprice
    local WornSofts = itemcount(6530) * 10000 + 1000
     
    local All = ManaMoney + WornSofts + HpMoney
    local Random_Number = random(35,45)
    local Total = All + (All*(10/Random_Number))
    
    depositall()
    if Total > 0 then
        npcsay("withdraw "..Total)
        wait(1000,1500)
        npcsay("yes")
        wait(1000,1500)
        npcsay("balance")
        wait(1000,1500)
    end
    Random_Number = random(35,45)
    So it will add a percentage which in this occation is a good option imo...


    Edit:
    a test;
    Lets say you're going to withdraw 25600 gold coins and the random number is 39
    then it will be 25600 + (25600*(10/39)) = 32164 gp.
    The problem is that it will not be a nice rounded number but this action:
    withdrawint(int value, int optional integer) [int]: Returns a rounded value.
    seems useable in this action though I have never used it and I do not know how it functions.
    Last edited by K_ingen; 12-10-2013 at 12:11 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
  •