Jump to content

DeadlySilence

Members
  • Posts

    181
  • Joined

  • Last visited

  • Days Won

    2

Posts posted by DeadlySilence

  1. You should show your script so we can look at possible error sources.

    The error itself seems to be very obvious: you use a non-existing variable for somehing.

  2. You could try to put this part

    setarray @donateitems[0],21849,21850,21851,21852,21267,21268,21269,21270,21271,21272,21273,21274,21275,21276,21277,21278,1316,1588,1932,1987,1833,1700,13435,1500,1600,13080,13079;
    

    under a OnInit: label like this.

    OnInit:
    setarray @donateitems[0],21849,21850,21851,21852,21267,21268,21269,21270,21271,21272,21273,21274,21275,21276,21277,21278,1316,1588,1932,1987,1833,1700,13435,1500,1600,13080,13079;
    end;
    

    I haven't tested it, but it might work.

  3. Did the map server show any error?

     

    //edit: You had a quotation mark at the end of the I_Pink label, and a comma was missing there, too. Replace line 29 with this.

    menu "Green Bloomy Wing",I_Green,"Yellow Bloomy Wings",I_Yellow,"White Bloomy Wings",I_White,"Dark Bloomy Wings",I_Dark,"Saikos Bloomy Wings",I_Saikos,"Metallish Bloomy Wings",I_Metallish,"Blue Bloomy Wings",I_Blue,"Purple Bloomy Wings",I_Purple,"Pink Bloomy Wings",I_Pink,"Pure White Bloomy Wings",I_Pure,"Lemon Bloomy Wings",I_Lemon,"Solar Bloomy Wings",I_Solar,"Return to Menu",H_top;
    
  4. Update: I have fixed the problem with spaces in names and added shortcuts for the longer commands.

    The new commands are @bn, @info, @deposit, @withdrawl, @transaction, @password.

     

    Usage:

    @bn: same as @bank

    @info : will display information about the bank and your account

    @deposit <amount> : deposits given amount

    @withdraw <amount> : withdraws given amount

    @transaction <username/id> <amount> : transfers given amount to give username's/id's account

    @password [<new password>] : changes current bank password to new password, new password is optional and the password will be reset if no new password was given

     

    End of update log.

     


     

    @Stolao: That's a good idea. I'll have a look at this this weekend, maybe. I think it will require a source modification, unless every merchant NPC gets updated manually to support the bank, though. :P

  5. You have to add it to every getarg in every compare.

     

    For example the lines 13 and 14:

     

    
    // line 13
    for(set .e,0; !compare(getarg(.e+1),"Zeny"); set .e,.e+2) {}
    
    =>
    
    for(set .e,0; !compare(getarg(.e+1) + "","Zeny"); set .e,.e+2) {}
    
    
    
    // line 14
    npcshopadditem "EV_VSET",getarg(.e+2),getarg(.e)*compare(getarg(.e+1),"SZeny");
    
    =>
    
    npcshopadditem "EV_VSET",getarg(.e+2),getarg(.e)*compare(getarg(.e+1) + "","SZeny");
    
    
    
  6. As the debug messages say: the compare function expects a string, but you gave it a number. To convert a number to string, just use this:

    .@yourNumberVar + ""
    

     

    By adding an empty string to it (""), it will be intrepreted as a string.

  7. Currently I'm working on some optimization and a @bank command with which every function can be used without talking to the NPC. (As of last night, this feature is almost done, only logs are still in progress. It's likely that I will finish this tonight.)

     

    A loan system sounds good, but how could the payback be forced to prevent a player from loaning 1,000,000,000 Zeny without paying them back?



    I finally found some time to finish version 2.0. It now contains a fully functional @bank command with which every bank action can be done from afar.

    Thanks to Anakid for this suggestion.

    • Upvote 1
  8. status->cri += 10 + (status->luk*10/3); //(every 1 luk = +0.3 critical)
    

    Means you gain 10/3 crit for every point of luck. Let's assume you have 9 luck, sou you'd gain 3 crit.

    If you derease the crit per luck:

    status->cri += 10 + (status->luk*10/5);
    

    Means you get 1 crit every 5 luck, which equals in 1.8 additional crit with our assumed 9 luck.

     

    You have to use basic math to change it to a value you'd find more satifying.

     

    //edit: Basically, the last number in this calculation determines how many points of luck you need for 1 crit.

  9. 
    

    prontera,155,150,0 script Test 123,{

    // end the script in case someone talks to the NPC

    end;

    OnInit:

    // set the chat's name's characters

    setarray .chars$, "V", "E", "N", "D", "I", "N", "G";

    // infinity loop, yay

    while (1) {

    // loop through all the characters

    for (.@i = 0; .@i < getarraysize(.chars$); .@i += 1) {

    // reset name on first run or after a complete run

    if (0 == .@i) {

    .@chatName$ = "";

    }

    .@chatName$ = .@chatName$ + .chars$[.@i];

    waitingroom(.@chatName$, 0);

    sleep(1000);

    delwaitingroom;

    }

    }

    }

  10. File Name: Advanced Bank with nearly unlimited maximum balance
    File Submitter: DeadlySilence
    File Submitted: 06 Jun 2013
    File Category: Utilities
    Content Author: DeadlySilence

    This is my bank NPC which I made since I couldn't find any bank that can store huge amounts of Zeny.

    Special Credits: Thanks to Anakid for the great idea to implement an @bank command.

    The NPC supports the following features:

    • Deposit
    • Withdraw
    • Transfer Zeny to other player's bank accounts (by name or account id)
    • Password protection
    • Transaction log (deposits, withdrawals, incoming and outgoing transfers)
    • daily interest (every morning at 6 o'clock server time, default: 5%, can be changed)
    • maximum amount per process is only determined by the server's input_max_value and the script's .maxInput
    • vast amounts of Zeny can be stored (the MySQL column is BigInt, so you can store up to 18,446,744,073,709,551,615 Zeny, that's more than 18,000,000,000 deposits of 1,000,000,000 Zeny)
    • other features are planned and I take feature requests, if I think they make sense (you can ask directly in the thread, but I prefer private messages or emails [address provided in both scripts])

    The @bank command supports the following features:

    • the same as the NPC, but more versatile
    • higher limits (as it is not connected to the input_max_value, default value per process is 1,000,000,000 Zeny)
    • shortcuts for @bank <function> commands: @info, @deposit, @withdrawl, @transaction, @password

     

    The @bankadmin (exclusively for admins) command supports the following features:

    • @bankadmin <option> returns the current value of an option
    • @bankadmin <option> <value> sets the value of an option
    • Valid options are name, maxinput, maxzeny, interest, whereas name must be a string and the other three have to be integers. The name can also be written with a colour code (like "@bankadmin set name "^F68712Banker^000000"" [please note the the ^000000 after the NPC's name to make the text after the name black again])

     

    You need to read the README.txt file to get the database creation commands and some basic information on how to install the script.

    Changelog:


    • 1.0: initial Release
    • 2.0: added caching for passwords and atcommand-menu
    • 2.1: fixed problem with spaces in usernames and added shortcuts (@bn, @info, @deposit, @withdrawl, @transaction, @password), also fixed a typo inside the commons.txt file
    • 2.2: added admin command @bankadmin where the administrators can set the NPC's variables directly (set name, maxInput, maxZeny, interest without reloading scripts)
    • 2.3 fixed some bugs with @bankadmin

     

    Downloads:

    As of version 2.2 I will provide complete packets as both, a tar.gz file for linux users as well as a zip file for windows users (even though you can extract zip under linux and tar.gz under windows...).

    banker_2_3.tar.gz

    banker_2_3.zip

    • Upvote 8
×
×
  • Create New...