Jump to content

Luciar

Members
  • Posts

    177
  • Joined

  • Last visited

  • Days Won

    2

Posts posted by Luciar

  1. I have made a few changes, find my revisions here: [paste=27uxm2jof4qp]
     
    Changes:

    1) The use of the file extension ".gat" is not needed in the map name for rAthena and was removed.
    2) $@npcname_mpq$ is a temporary global variable. You only need to use a temporary scope variable (prefix .@)
    3) The use of menu is not incorrect, but I updated to use select, you can view here: Select

    4) Removed .@amount == 100 from the logic statement below. This way players will be able to offer any number of berries they may have. (specifically allows for a donation of exactly 100 berries):

     if ( .@amount == 100 || countitem(607) < .@amount )

    5) Updated

    delitem 607 ,100;

    to remove the actual number of berries, not always 100. It will remove the integer division of the amount by 100 (e.g. 350 / 100 = 3). The player will retain the remainder of that division (i.e. 50).

     

    I don't have a test server but my revisions should work correctly. Let me know if it doesn't!

  2. if ((.@map$ != prontera || .@x < 202 - 8 || .@x < 202 + 8 || .@y < 167 - 8 || .@y < 167 + 8))

    Your operators are all "less than." and you need quotes around the string "prontera"

    if ((.@map$ != "prontera" || .@x < 194 || .@x > 210 || .@y < 159 || .@y > 175))

    Instead? (I have removed unnecessary calculations from your logic)

  3. Change:

    addtimer 1000, strnpcinfo(3)+"OnKillable"; // Will check after a second

    to

     addtimer 1000, strnpcinfo(3)+"::OnKillable"; // Will check after a second

    And

    else addtimercount 1000, strnpcinfo(3)+"OnKillable"; // Will check again after a second

     

    to

    else addtimercount 1000, strnpcinfo(3)+"::OnKillable"; // Will check again after a second
  4. Found a few mistakes, here's the updated version: [paste=cd1ad6jfqw4]

     

    The coordinates you set up are basically a box (x1 -> x2 by y1 -> y2) and monsters will spawn anywhere within that area.

     

    The reward NPC will only give a player a reward if he or she kills at least one monster.

    • Upvote 1
  5. • They get the rewards from the rewarding NPC after the invasion finishes. So when they kill the monsters nothing special has to happen.

     

    To clarify, shouldn't the NPC only reward those who participated in the invasion? 

     

    Here is a initial version. I do not have a test server, but I believe it is error free. Let me know if it doesn't work!

     

    [paste=8qvazgg2e5b]

     

    You will need to configure the area spawn under the Config section. Also you will need to place the reward NPC to your liking.

     

    The invasion will automatically start at the times you provided. However, these times will be based on your server time. Make sure your server is set to GMT + 3 to have the event start at the correct time

    • Upvote 1
  6. How would you like players to qualify for a reward? Simply kill a mob from the invasion? How many mobs of each kind do you want at once? Should they be condensed to a specific area of the towns or all over?

     

    Get back to me and I'll look into writing this.

  7. Going to need a lot more information. What do you want the quest to require? Will the player have to kill monsters, hunt items, etc? If so which and how many? Any other requirements (such as minimum level or job to complete)?

  8. You are missing the tables required for SQL logging. Be sure to execute sql-files/logs.sql on your server (same way you loaded main.sql).

     

    Check your map_athena.conf as well, ensure you configured the server IP there.

     

     

    Edit: Also this is not a support thread. See http://rathena.org/board/forum-2/announcement-1-this-section-is-not-a-support-section/

  9. This script isn't complete. It calls a function "rent_entrada" that is not defined in the paste you have posted above.

     

    From what you have posted, the script only informs the user of the rent at line 6. Please post the rest of the script, if you have it.

  10. *npctalk "<message>";
     
    This command will display a message to the surrounding area as if the NPC object 
    running it was a player talking - that is, above their head and in the chat 
    window. The display name of the NPC will get appended in front of the message to 
    complete the effect.
     
        // This will make everyone in the area see the NPC greet the character
        // who just invoked it.
        npctalk "Hello "+strcharinfo(0)+", how are you?";
     
    You can use this to have the NPC speak in chat. Apply it to the script where you want it.
     
    OnWhisperGlobal is a label used to receive arguments via the PM system. It isn't for what you're trying to do.
  11. Did you make an account on your MySQL server with the username and password both equal to "ragnarok"?

     

    If not you need to do that, though I wouldn't use the default info unless this is strictly offline!

  12. if ( strcharinfo(3) != "guild_vs3" || "pvp_n_6-5" || "pvp_y_2-2" || "prtg_cas01" || "aldeg_cas03" || "payg_cas03" || "payg_cas03" || @pvpl_kills || @pvpl_deaths ) end; 
    Change to:
    
    

    if ( strcharinfo(3) != "guild_vs3" || strcharinfo(3) != "pvp_n_6-5" || strcharinfo(3) != "pvp_y_2-2" || strcharinfo(3) != "prtg_cas01" || strcharinfo(3) != "aldeg_cas03" || strcharinfo(3) != "payg_cas03" || strcharinfo(3) != "payg_cas03" || @pvpl_kills || @pvpl_deaths ) end;

    • Upvote 1
  13. Make sure you have set the SQL server password, not just the server intercommunication password.

     

    File: conf/inter_athena.conf

     

     

    // Global SQL settings
    // overriden by local settings when the hostname is defined there
    // (currently only the login-server reads/obeys these settings)
    sql.db_hostname: 127.0.0.1
    sql.db_port: 3306
    sql.db_username: ragnarok
    sql.db_password: ragnarok
    sql.db_database: ragnarok
    sql.codepage:
     
    // MySQL Character SQL server
    char_server_ip: 127.0.0.1
    char_server_port: 3306
    char_server_id: ragnarok
    char_server_pw: ragnarok
    char_server_db: ragnarok
     
    // MySQL Map SQL Server
    map_server_ip: 127.0.0.1
    map_server_port: 3306
    map_server_id: ragnarok
    map_server_pw: ragnarok
    map_server_db: ragnarok
     
    // MySQL Log SQL Database
    log_db_ip: 127.0.0.1
    log_db_port: 3306
    log_db_id: ragnarok
    log_db_pw: ragnarok
    log_db_db: ragnarok
    log_codepage:
    log_login_db: loginlog
    
    If this doesn't work, make sure you've configured your MySQL server to accept connections locally
  14. This is not a script modification, but a source mod.

     

    Anyways, open src/common/mapindex.h

    Find 

     

    #define MAP_JAIL "sec_pri"

     

    and change it to

     

    #define MAP_JAIL "que_moon"

     

    You'll also need to ensure that que_moon is configured with the correct mapflags to ensure players remain jailed on that map. (Look at the mapflags set on sec_pri and copy them over)

     

    Edit: Aww Anakid beat me xP

  15. did you try to change the switch into menu yet ?

    What? Switches and menus are very much not interchangeable. Switches can be used to produce menus with switch(select()) but that isn't the purpose of the switch in my script.

     

    Change switch into

    .inst = (instance_create("Test Instance",.@partyid)) ;

    and then use if else

     

    The problem isn't with switch, as described in my original post. The first group to create an instance does so successfully.

  16. Hi all, I'm trying to create a very basic custom instance to better understand how to use the system. So far I have been able to create an instance and warp the party to the instanced map successfully. However, once one party has started an instance, all other parties get stuck in "Standby" (the instance window pops up saying "[Test Instance] in Standby... Your Standby Priority: 0".
     
    When I try to interact with the NPC with the party leader of one of these standby instances, my NPC throws "An unknown error occured." (default/-1 result of the switch(instance_create) function)
     
    Here is the script. It loads without error:
     

    prontera,157,172,4    script    Instance Guy    123,{
        
        .@name$ = "[^0000FFInstance Guy^000000]";
        .@partyid = getcharid(1);
        
        if(getpartyleader(.@partyid,2) == getcharid(0)) {
            
            if(instance_check_party(.@partyid,1,148,150)) {
            //Party Is OK - 1 member, min lvl 148, max 150
                mes .@name$;
                if(!instance_id(1)) {
                    mes "Would you like to create an instance for your party?";
                    if(select("Yes") != 1) {
                        close;    
                    }
                }
                switch(instance_create("Test Instance",.@partyid)) {
                    case -3:
                        mes "I'm sorry, all instances are currently full, please try again later. We appologize for the inconvienence.";
                        close;
                
                    case -2:
                        mes "There seems to be an issue with your party. Are you in one?";
                        close;
                    
                    case -4:
                        .@instid = instance_id(1);
                        mes "Your party is currently attached to instance ID#: ^FF0000"+.@instid+"^000000.";
                        break;
     
                    case 0:
                    case 1:
                        .@instid = instance_id(1);
                        if(instance_attachmap("1@gl_k",.@instid) == "") {
                            instance_destroy .@instid;
                            mes "Instanced failed to attach to map. Instance has been destroyed.";
                            close;
                        }
                        instance_set_timeout 1200000,60000,.@instid;
                        instance_init .@instid;
                        mes "Instance ID#: ^FF0000"+.@instid+"^000000 created for party ^0000FF"+strcharinfo(1)+"^000000.";
                        break;
                
                    case -1:
                    default:
                        mes "An unknown error occured.";
                        close;
                }
                
                switch(select("Warp me to the instance!")) {
                    case 1:
                        instance_warpall "1@gl_k",123,123,.@instid;
                    default:
                        close;
                }
            } else {
            //Party NOT OK
                mes .@name$;
                mes "I'm sorry, you don't meet the requirements of this instance.";
                close;
            }
        } else {
            mes .@name$;
            mes "I can only start an instance for a leader of a party.";
            close;
        }
     
    }

    Also, if I choose not to be warped to the instance, close the NPC dialogue and talk to the NPC again, it throws the same error (shouldn't it throw -4?) (all of this with the leader of the first instance created)

     

    I realize this might not be a scripting error since there are no warnings from the server, but I have reviewed all instancing documentation (wiki, script_commands.txt, and other related forum posts) and can't figure it out D:

×
×
  • Create New...