Jump to content

bWolfie

Members
  • Content Count

    848
  • Joined

  • Last visited

  • Days Won

    34

Posts posted by bWolfie


  1. variable_one[getarraysize(variable_one)] = value_one_point_one
    variable_two[getarraysize(variable_two)] = value_two_point_one
    variable_three[getarraysize(variable_three)] = value_three_point_one
    

     

    I think you need these the other way around? E.g.

     

    JobLevel = .@joblevel;
    

     

    Would make your JobLevel = whatever .@joblevel is.

    So when saving

     

    variable_one[getarraysize(variable_one)] = value_one_point_one

    v1[3] would mean whatever the third index of variable one is, is now equal to value point 1.


  2. Not sure if there's a better way, but one way you could do it is using attachrid.

     

    I didn't test, kinda working on logic. The way it works is:

    1. Fetch party ID.

    2. Check if party member is online. If yes, continue. If no, loop again to next array and check.

    3. attachrid of the online AID, collect their BaseLevel and put it in an array (.@blvl[]).

    4. detachrid; display name + base level

     

     

    -    script    Party Member Base Level    FAKE_NPC,{
    
        getpartymember(getcharid(CHAR_ID_PARTY));
    
        for (.@i = 0; .@i < $@partymembercount; ++.@i)
        {
            if (isloggedin($@partymemberaid[.@i]))
            {
                attachrid($@partymemberaid[.@i]);
                .@blvl[.@i] = BaseLevel;
                detachrid;
                dispbottom("" + $@partymembername$[.@i] + ": Level " + .@blvl[.@i] + "");
            }
        }
    
        end;
    
    }
    

  3. It's not a botcheck...I just call it that for simplicity. For example, if you have a problem with Hunter/Sniper bots, you can quickly check through your list of maps then head to the player if you think necessary. It may not sound like much, but Game Masters use it on my server and it is incredibly useful for helping their searches.


  4. File Name: @botcheck

    File Submitter: True Zeal

    File Submitted: 30 Apr 2017

    File Category: Utility

     

    File Name: @botcheck

    File Submitter: True Zeal

    File Submitted: 30 Apr 2017

    File Cateogry: Utility

     

    Description

    A useful command for your Game Masters to help monitor problem "bot" maps.

    Runs

    the @whomap2 command on a list of specified maps. This allows you to

    check classes as well as names, which could be useful for quickly

    ignoring a character.

     

    Requires configuration for maps you wish to have it run a check on.

     

    Example Configuration:

        //--- Sets the list of maps to run @whomap2 on    setarray(.map$[0],        "amatsu",    // Note: Every entry excluding the last one must have a comma!        "prontera",        "odin_tem03"        // Note: Last entry must never have a comma!    );

     

    Download

    You can "download" this file from its Pastebin location.

    Pastebin: https://pastebin.com/yYuFdLHm

     

    Click here to download this file


  5. I have a script command which fetches a character's name from the .@atcmd_parameters$[] and displays them in a message.

    How do I get them to display in one line?

     

    Currently I can only get them to display if I print it one line at a time (using message())

     

     

    -    script    Print Names    FAKE_NPC,{
        end;
    
    OnCommand:
        // If user inputs no parameters (i.e. character name)
        if (!.@atcmd_numparameters)
        {
            message(strcharinfo(PC_NAME), "Usage: @printname <name of player to print>");
            message(strcharinfo(PC_NAME), "@printname failed.");
            end;
        }
    
        .@size = getarraysize(.@atcmd_parameters$);
        for (.@i = 0; .@i < .@size; ++.@i)
        {
            .@player$[.@i] = .@atcmd_parameters$[.@i];
            message(strcharinfo(PC_NAME), "" + .@player$[.@i] + "");
        }
    
        end;
    
    OnInit:
        bindatcmd("printname", "Print Names::OnCommand", 10 ,96 , true);
        end;
        
    }
    

     

    If I typed @printname John Smith, it would appear like this:

     

    John

    Smith

     

    However, I would like it to be on the same line.

     

    John Smith

     

    Thank you for any help.


  6.  

    As you might imagine, Smoke is always involved in big, cool projects. I would like to congratulate you and thank you on behalf of the whole community.
     
    However, I do not see so many great utilities in this ... I do not know if it is due to the difficulty of understanding the language, or because the text has not been clarified, but I have not really seen it. (Please do not get me wrong, I'm just curious)
     
    Is this system official?
    Is there any utility besides not having to create custom cards to give players bonuses?
     
    I'm sorry I looked ignorant, but I'm just curious.

     

    i guess it is a different way of displaying flavor text and equipment bonuses


  7.  

    Yes i understand all that. I want to make it so the NPC takes a record of their IP and block usage of that npc afterwards.

     

    I did some searching and found a guild pack script to use in what I'm after. From this thread: https://rathena.org/board/topic/94294-guild-pack-npc-giver-help-please/

     

    1. First script needs label to call in callsub:

     

    S_Check_IP:
        return query_sql("SELECT 1 FROM `guildpack` join login on login.`last_ip` = `guildpack`.`last_ip` where login.account_id = "+ getcharid(CHAR_ID_ACCOUNT), .@tmp);
    

     

    2. Then define IP:

     

    .@myip$ = getcharip();

     

    3. Return true through callsub if IP exists in table:

     

        if (callsub(S_Check_IP))
        {
            mes .@name$;
            mes("^616D7EIt seems I have already recorded your IP Address: ^ff0000" + .@myip$ + "^000000.");
            close;
        }
    

     

    4. If does not exist, enter new entry to previously created table:

     

    query_sql("INSERT INTO `guildpack` VALUES (NULL," + getcharid(CHAR_ID_ACCOUNT) + ",'" + escape_sql(strcharinfo(PC_NAME)) + "','" + .@myip$ + "')");

     

    All in all it looks something like this: https://pastebin.com/Lk8MHMBg

     

    This can be used for get_unique_id() too if you have gepard shield.

     

    My intention was to use this in a Lottery script, so people could only purchase one ticket per week.

    After each lottery draw, the table would be truncated so everybody can buy tickets again.

     

    To put in any script, would I just need to change the storage table, 'guildpack'? Give me an example, please.

     

    Yeah. In mine, I changed guildpack to lottery


  8. you can add donpcevent and set it up on your own liking.

     

    Yup, basically this. You can use an arrangement of donpcevent() commands to activate events for your set times.

     

    Example:

     

     
    -     script     event 1     FAKE_NPC,{
     
    OnAtCommand:
    OnEventOne:
    announce "Event 1 started.", bc_all;
    initnpctimer;
    end;
     
    OnTimer10000:
    announce "Event 1 ended." bc_all;
    end;
     
    OnTimer15000:
    donpcevent("event 2::OnEventTwo");
    stopnpctimer;
    end;
     
    OnInit:
    bindatcmd("event1","event 1::OnAtCommand");
    end;
     
    }
     
    -     script     event 2     FAKE_NPC,{
     
    OnEventTwo:
    announce "Event 2 started.", bc_all;
    initnpctimer;
    end;
     
    OnTimer10000:
    announce "Event 2 ended.", bc_all;
    end;
     
    OnTimer15000:
    donpcevent("event 1::OnEventTwo");
    stopnpctimer;
    end;
     
    }
    

     

    You can start the loop by typing @event1, then it would loop the announcements every 10/15 seconds.


  9. Yes i understand all that. I want to make it so the NPC takes a record of their IP and block usage of that npc afterwards.

     

    I did some searching and found a guild pack script to use in what I'm after. From this thread: https://rathena.org/board/topic/94294-guild-pack-npc-giver-help-please/

     

    1. First script needs label to call in callsub:

     

    S_Check_IP:
        return query_sql("SELECT 1 FROM `guildpack` join login on login.`last_ip` = `guildpack`.`last_ip` where login.account_id = "+ getcharid(CHAR_ID_ACCOUNT), .@tmp);
    

     

    2. Then define IP:

     

    .@myip$ = getcharip();

     

    3. Return true through callsub if IP exists in table:

     

        if (callsub(S_Check_IP))
        {
            mes .@name$;
            mes("^616D7EIt seems I have already recorded your IP Address: ^ff0000" + .@myip$ + "^000000.");
            close;
        }
    

     

    4. If does not exist, enter new entry to previously created table:

     

    query_sql("INSERT INTO `guildpack` VALUES (NULL," + getcharid(CHAR_ID_ACCOUNT) + ",'" + escape_sql(strcharinfo(PC_NAME)) + "','" + .@myip$ + "')");

     

    All in all it looks something like this: https://pastebin.com/Lk8MHMBg

     

    This can be used for get_unique_id() too if you have gepard shield.

     

    My intention was to use this in a Lottery script, so people could only purchase one ticket per week.

    After each lottery draw, the table would be truncated so everybody can buy tickets again.


  10. Hello!

     

    I'm guessing this has been done time and time again, but my search skills are newbie at best.

    I have this particular NPC which I only want to be allowed to use once per IP, and then restricted from then on.

     

    E.g.

    Player A buys Jellopy from NPC on Account 1.

    Player A logs out, logs into Account 2.

    Player A is denied buying Jellopy from NPC on Account 2.

     

    It would be as if the NPC took a record of the IP, and then once that IP was in the system, anyone carrying the IP could not buy the jellopy again.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.