Jump to content

Elijah23

Members
  • Posts

    292
  • Joined

  • Last visited

  • Days Won

    5

Posts posted by Elijah23

  1. Hello everyone, just wanted to know on how to do this in game.. :)

    Don't know if this belongs here or in the scripting section, sorry if I'm wrong..

    I have an npc which looks for the guild id of a specific guild which will be an input in the npc..

    I have use this sql query and its working:

    query_sql "SELECT `guild_id` FROM `guild` WHERE `name` = '"+@guild_name$+"'",@type_id;

    The problem is, I want the name to be exact.

    For example,

    I was looking for the guild id of test, and I have input in the npc test123. It would still be able to get the ID of test guild but instead I want the npc to input it as not existing since there is really a no guild name of test123 and it should be test only.

    Another example again for guild test,

    If I input tes only, It would still be able to get the ID of test guild but instead I want the npc to input it as not existing since there is really a no guild name of tes and it should be test.

    So what I am aiming is a sql query with an exact match of the input..

    I have searched in google how to do this and find this:

    add % before and after the string and use LIKE

    Example:

    query_sql "SELECT `guild_id` FROM `guild` WHERE `name` LIKE ' %guild_name% ' "

    But I can't integrate it with the script:

    query_sql "SELECT `guild_id` FROM `guild` WHERE `name` LIKE ' "+%@guild_name$%+"' ",@type_id;

    or

    query_sql "SELECT `guild_id` FROM `guild` WHERE `name` LIKE '%"+@guild_name$+"%' ",@type_id;

    Doesn't work for me.. xD

    So if anyone knows how to do what I wanted to do, please share it to me.. xD

    Advance thanks!.. :)

  2. wow this update is really awesome, :)

    can i have another request?

    a diff for adding custom status icons in game (if its possible)

    thanks!

    This is already possible by the lua files

    So how to do it?.. :) thanks.. :)

  3. maybe you have enabled renewal drop..

    /// renewal drop rate algorithms
    /// (disable by commenting the line)
    ///
    /// leave this line to enable renewal item drop rate algorithms
    /// while enabled a special modified based on the difference between the player and monster level is applied
    /// based on the http://irowiki.org/wiki/Drop_System#Level_Factor table
    #define RENEWAL_DROP
    

    you can find that line in src/config/renewal.h,

    just put // before it and recompile then try it again.. :)

  4. Change getmapmob with mobcount.. :)

    It's the counterpart script of getmapmob in rathena.. :)

    ---------------------------------------
    *mobcount("<map name>","<event label>")
    This function will count all the monsters on the specified map that have a given
    event label and return the number or 0 if it can't find any. Naturally, only
    monsters spawned with 'monster' and 'areamonster' script commands can have non-empty
    event label.
    If you pass this function an empty string for the event label, it will return
    the total count of monster without event label, including permanently spawning monsters.
    With the dynamic mobs system enabled, where mobs are not kept
    in memory for maps with no actual people playing on them, this will return a 0
    for any such map.
    If the event label is given as "all", all monsters will be counted, regardless of
    having any event label attached.
    If the map name is given as "this", the map the invoking character is on will
    be used. If the map is not found, or the invoker is not a character while the map
    is "this", it will return -1.
    ---------------------------------------
    

×
×
  • Create New...