Jump to content

GmOcean

Community Contributors
  • Content Count

    371
  • Joined

  • Last visited

  • Days Won

    8

Reputation Activity

  1. Upvote
    GmOcean got a reaction from MrSky in How to check all items?   
    Like this?
    prontera,154,180,4 script Item Checker 123,{if( !countitem(501) ){ mes "You don't have a Red Potion.";} else { mes "You have a Red Potion, I can tell.";}close;}
  2. Upvote
    GmOcean got a reaction from NewNewbie in Scripting Tutorials & Guides   
    Scripting Tutorials and Guides
    I'm going to attempt to help everyone here with their scripts while not being directly involved in helping you with them xD.
    This will also help future/current scripters get some fresh info and maybe inspire innovative ideas towards scripting.
    So that we can prove that us " Scripters " are the superior ragnarok emulation race! Take that Source Code writers!! Jk lol, we need you too .

    What I'm going to do, is write detailed tutorials on how to write a few scripts. Starting from the basics to more advanced scripts.
    This way everyone can follow along. And hopefully this will help everyone understand how to write a few scripts and even troubleshoot their own scripts.
     
    Also please read: Scripting Standards.
    It will help you understand how to read some of the syntax and way people script things.
    // A list of <sprite id>s can be found here: Sprite_IDs Credits: Ai4rei
    Scripting Tutorials & Guides
    In this section you will learn how to write scripts ranging from Complete Begginer Level Scripts ( Me and Some of you ) -> Expert Level Scripts ( Think, Developer Status O.o; )
    - Beginner Scripts -
    Scripts for complete beginners and novice scripters.
     
     
    - Intermediate Scripts -
    Scripts for intermediate level scripters. If you completed my beginner script series, then you are ready for this section.
     
     
    - Advanced Scripts -
    Scripts for advanced level scripters. If you completed my intermediate script series and have made a few of your own intermediate scripts, then you are ready for this section.
     
     
    The idea behind this topic, is for new users, and current ones, to have a (second)place they can go to for reference when trying to write a script if they can't figure it out with script_commands.txt file. It will also help people learn how to write scripts. While hopefully, keeping script writing techniques to a ' very ' similar structure!
     
    *Read Me* - I have updated the links on this post to link to the oldboard so these guides can be viewed. However, do note that the script_commands.txt links within those guides are no longer accurate. Enjoy your scripting.
  3. Upvote
    GmOcean got a reaction from karazu in Monster Search   
    File Name: Monster Search
    File Submitter: GmOcean
    File Submitted: 12 Oct 2014
    File Category: Utility
    Official Supported Projects: Midgard-Community Project & Yourolist Project & RateMyServer Website
    =============================================================
    Description
    =============================================================
    This script will allow users to search information about a
    monster in-game, and then open up a page to that exact mob on
    any website admins choose to enable. Works for both re/non-re monsters.
    =============================================================
    Features
    =============================================================
    Choose between what website you want your server to use.
    Or simply leave that upto your players by enabling all sites.
    =============================================================
    NOTE - Requires a client from 2011-10-10aRagexe.exe onwards.
    NOTE2 - RateMyServer Link does not support custom mobs.
    NOTE3 - As of yet, Midgard-Community & Yourolist also, do not support
    custom mobs to the extent of my knowledge.
    =============================================================

    Click here to download this file
  4. Upvote
    GmOcean got a reaction from evilpuncker in Monster Search   
    File Name: Monster Search
    File Submitter: GmOcean
    File Submitted: 12 Oct 2014
    File Category: Utility
    Official Supported Projects: Midgard-Community Project & Yourolist Project & RateMyServer Website
    =============================================================
    Description
    =============================================================
    This script will allow users to search information about a
    monster in-game, and then open up a page to that exact mob on
    any website admins choose to enable. Works for both re/non-re monsters.
    =============================================================
    Features
    =============================================================
    Choose between what website you want your server to use.
    Or simply leave that upto your players by enabling all sites.
    =============================================================
    NOTE - Requires a client from 2011-10-10aRagexe.exe onwards.
    NOTE2 - RateMyServer Link does not support custom mobs.
    NOTE3 - As of yet, Midgard-Community & Yourolist also, do not support
    custom mobs to the extent of my knowledge.
    =============================================================

    Click here to download this file
  5. Upvote
    GmOcean got a reaction from IndieRO in Scripting Tutorials & Guides   
    Scripting Tutorials and Guides
    I'm going to attempt to help everyone here with their scripts while not being directly involved in helping you with them xD.
    This will also help future/current scripters get some fresh info and maybe inspire innovative ideas towards scripting.
    So that we can prove that us " Scripters " are the superior ragnarok emulation race! Take that Source Code writers!! Jk lol, we need you too .

    What I'm going to do, is write detailed tutorials on how to write a few scripts. Starting from the basics to more advanced scripts.
    This way everyone can follow along. And hopefully this will help everyone understand how to write a few scripts and even troubleshoot their own scripts.
     
    Also please read: Scripting Standards.
    It will help you understand how to read some of the syntax and way people script things.
    // A list of <sprite id>s can be found here: Sprite_IDs Credits: Ai4rei
    Scripting Tutorials & Guides
    In this section you will learn how to write scripts ranging from Complete Begginer Level Scripts ( Me and Some of you ) -> Expert Level Scripts ( Think, Developer Status O.o; )
    - Beginner Scripts -
    Scripts for complete beginners and novice scripters.
     
     
    - Intermediate Scripts -
    Scripts for intermediate level scripters. If you completed my beginner script series, then you are ready for this section.
     
     
    - Advanced Scripts -
    Scripts for advanced level scripters. If you completed my intermediate script series and have made a few of your own intermediate scripts, then you are ready for this section.
     
     
    The idea behind this topic, is for new users, and current ones, to have a (second)place they can go to for reference when trying to write a script if they can't figure it out with script_commands.txt file. It will also help people learn how to write scripts. While hopefully, keeping script writing techniques to a ' very ' similar structure!
     
    *Read Me* - I have updated the links on this post to link to the oldboard so these guides can be viewed. However, do note that the script_commands.txt links within those guides are no longer accurate. Enjoy your scripting.
  6. Upvote
    GmOcean reacted to kisuka in About continuity of custom NPCs on Hercules Repository.   
    We wanted to deleted this folder at eAthena during the old days. Let's please make that dream come true
     
    What we could do is instead of deleting the entire folder, we just delete the scripts in it, then drop a .gitkeep inside. That way there's still a structure for people to drop custom scripts in without messing about with the official folder structure.
  7. Upvote
    GmOcean got a reaction from Doch in Item Search   
    File Name: Item Search
    File Submitter: GmOcean
    File Submitted: 13 Oct 2014
    File Category: Utility
     
    =============================================================
    Description
    =============================================================
    This script will allow users to search information about an
    item in-game. Supports both renewal/non-renewal items. It
    will show the exact item if using the search directory
    function. If however using the input method, this script will
    will run a broadened search, or pull up the exact item if an
    item ID is given instead of a name.
    =============================================================
    Features
    =============================================================
    Choose between what website you want your server to use.
    Or simply leave that upto your players by enabling all sites.
    =============================================================
    NOTE - Requires a client from 2011-10-10aRagexe.exe onwards.
    NOTE2 - RateMyServer Link does not support custom items.
    =============================================================
     
    Click here to download this file
  8. Upvote
    GmOcean got a reaction from Zirius in What would become of "goto" ?   
    Yes, as Angelmelody showed, that is the proper way to handle your particular situation. However with other concerns where you may be using a make shift loop like the following:
    L_Loop:.@a = rand(1,6);if( .@a != 2 ){ .@b++; goto L_Loop; }mes "It took you "+ .@b +" tries to roll a 2.";close; You can replace goto L_Loop with 1 of the following. The first example being the correct way.
    while( rand(1,6) != 2 ) {.@b++}mes "It took you "+ .@b +" tries to roll a 2.";close; OR simply replace goto with callsub
    .@a = rand(1,6);if( .@a != 2 ){ .@b++; callsub L_Loop; }mes "It took you "+ .@b +" tries to roll a 2.";close;  
    But lastly, if you read the documentation in that link, they did mention a synonym may be provided. Meaning a command which will act like goto " could " be created. The difference is, this will also act like jump_zero as well. So basically replacing 2 commands with 1 command.
  9. Upvote
    GmOcean got a reaction from Random756 in Scripting Tutorials & Guides   
    Scripting Tutorials and Guides
    I'm going to attempt to help everyone here with their scripts while not being directly involved in helping you with them xD.
    This will also help future/current scripters get some fresh info and maybe inspire innovative ideas towards scripting.
    So that we can prove that us " Scripters " are the superior ragnarok emulation race! Take that Source Code writers!! Jk lol, we need you too .

    What I'm going to do, is write detailed tutorials on how to write a few scripts. Starting from the basics to more advanced scripts.
    This way everyone can follow along. And hopefully this will help everyone understand how to write a few scripts and even troubleshoot their own scripts.
     
    Also please read: Scripting Standards.
    It will help you understand how to read some of the syntax and way people script things.
    // A list of <sprite id>s can be found here: Sprite_IDs Credits: Ai4rei
    Scripting Tutorials & Guides
    In this section you will learn how to write scripts ranging from Complete Begginer Level Scripts ( Me and Some of you ) -> Expert Level Scripts ( Think, Developer Status O.o; )
    - Beginner Scripts -
    Scripts for complete beginners and novice scripters.
     
     
    - Intermediate Scripts -
    Scripts for intermediate level scripters. If you completed my beginner script series, then you are ready for this section.
     
     
    - Advanced Scripts -
    Scripts for advanced level scripters. If you completed my intermediate script series and have made a few of your own intermediate scripts, then you are ready for this section.
     
     
    The idea behind this topic, is for new users, and current ones, to have a (second)place they can go to for reference when trying to write a script if they can't figure it out with script_commands.txt file. It will also help people learn how to write scripts. While hopefully, keeping script writing techniques to a ' very ' similar structure!
     
    *Read Me* - I have updated the links on this post to link to the oldboard so these guides can be viewed. However, do note that the script_commands.txt links within those guides are no longer accurate. Enjoy your scripting.
  10. Upvote
    GmOcean got a reaction from Aurora in Scripting Tutorials & Guides   
    Scripting Tutorials and Guides
    I'm going to attempt to help everyone here with their scripts while not being directly involved in helping you with them xD.
    This will also help future/current scripters get some fresh info and maybe inspire innovative ideas towards scripting.
    So that we can prove that us " Scripters " are the superior ragnarok emulation race! Take that Source Code writers!! Jk lol, we need you too .

    What I'm going to do, is write detailed tutorials on how to write a few scripts. Starting from the basics to more advanced scripts.
    This way everyone can follow along. And hopefully this will help everyone understand how to write a few scripts and even troubleshoot their own scripts.
     
    Also please read: Scripting Standards.
    It will help you understand how to read some of the syntax and way people script things.
    // A list of <sprite id>s can be found here: Sprite_IDs Credits: Ai4rei
    Scripting Tutorials & Guides
    In this section you will learn how to write scripts ranging from Complete Begginer Level Scripts ( Me and Some of you ) -> Expert Level Scripts ( Think, Developer Status O.o; )
    - Beginner Scripts -
    Scripts for complete beginners and novice scripters.
     
     
    - Intermediate Scripts -
    Scripts for intermediate level scripters. If you completed my beginner script series, then you are ready for this section.
     
     
    - Advanced Scripts -
    Scripts for advanced level scripters. If you completed my intermediate script series and have made a few of your own intermediate scripts, then you are ready for this section.
     
     
    The idea behind this topic, is for new users, and current ones, to have a (second)place they can go to for reference when trying to write a script if they can't figure it out with script_commands.txt file. It will also help people learn how to write scripts. While hopefully, keeping script writing techniques to a ' very ' similar structure!
     
    *Read Me* - I have updated the links on this post to link to the oldboard so these guides can be viewed. However, do note that the script_commands.txt links within those guides are no longer accurate. Enjoy your scripting.
  11. Upvote
    GmOcean got a reaction from Neneka in Scripting Tutorials & Guides   
    Scripting Tutorials and Guides
    I'm going to attempt to help everyone here with their scripts while not being directly involved in helping you with them xD.
    This will also help future/current scripters get some fresh info and maybe inspire innovative ideas towards scripting.
    So that we can prove that us " Scripters " are the superior ragnarok emulation race! Take that Source Code writers!! Jk lol, we need you too .

    What I'm going to do, is write detailed tutorials on how to write a few scripts. Starting from the basics to more advanced scripts.
    This way everyone can follow along. And hopefully this will help everyone understand how to write a few scripts and even troubleshoot their own scripts.
     
    Also please read: Scripting Standards.
    It will help you understand how to read some of the syntax and way people script things.
    // A list of <sprite id>s can be found here: Sprite_IDs Credits: Ai4rei
    Scripting Tutorials & Guides
    In this section you will learn how to write scripts ranging from Complete Begginer Level Scripts ( Me and Some of you ) -> Expert Level Scripts ( Think, Developer Status O.o; )
    - Beginner Scripts -
    Scripts for complete beginners and novice scripters.
     
     
    - Intermediate Scripts -
    Scripts for intermediate level scripters. If you completed my beginner script series, then you are ready for this section.
     
     
    - Advanced Scripts -
    Scripts for advanced level scripters. If you completed my intermediate script series and have made a few of your own intermediate scripts, then you are ready for this section.
     
     
    The idea behind this topic, is for new users, and current ones, to have a (second)place they can go to for reference when trying to write a script if they can't figure it out with script_commands.txt file. It will also help people learn how to write scripts. While hopefully, keeping script writing techniques to a ' very ' similar structure!
     
    *Read Me* - I have updated the links on this post to link to the oldboard so these guides can be viewed. However, do note that the script_commands.txt links within those guides are no longer accurate. Enjoy your scripting.
  12. Upvote
    GmOcean got a reaction from fiction in Scripting Tutorials & Guides   
    Scripting Tutorials and Guides
    I'm going to attempt to help everyone here with their scripts while not being directly involved in helping you with them xD.
    This will also help future/current scripters get some fresh info and maybe inspire innovative ideas towards scripting.
    So that we can prove that us " Scripters " are the superior ragnarok emulation race! Take that Source Code writers!! Jk lol, we need you too .

    What I'm going to do, is write detailed tutorials on how to write a few scripts. Starting from the basics to more advanced scripts.
    This way everyone can follow along. And hopefully this will help everyone understand how to write a few scripts and even troubleshoot their own scripts.
     
    Also please read: Scripting Standards.
    It will help you understand how to read some of the syntax and way people script things.
    // A list of <sprite id>s can be found here: Sprite_IDs Credits: Ai4rei
    Scripting Tutorials & Guides
    In this section you will learn how to write scripts ranging from Complete Begginer Level Scripts ( Me and Some of you ) -> Expert Level Scripts ( Think, Developer Status O.o; )
    - Beginner Scripts -
    Scripts for complete beginners and novice scripters.
     
     
    - Intermediate Scripts -
    Scripts for intermediate level scripters. If you completed my beginner script series, then you are ready for this section.
     
     
    - Advanced Scripts -
    Scripts for advanced level scripters. If you completed my intermediate script series and have made a few of your own intermediate scripts, then you are ready for this section.
     
     
    The idea behind this topic, is for new users, and current ones, to have a (second)place they can go to for reference when trying to write a script if they can't figure it out with script_commands.txt file. It will also help people learn how to write scripts. While hopefully, keeping script writing techniques to a ' very ' similar structure!
     
    *Read Me* - I have updated the links on this post to link to the oldboard so these guides can be viewed. However, do note that the script_commands.txt links within those guides are no longer accurate. Enjoy your scripting.
  13. Upvote
    GmOcean reacted to Dastgir in [Guide] Adding New Status Icons   
    Hello Hercules Community,
    Here's a Guide to Add a New Custom Status Icons(the one displayed on the right)
     
     
    What you Need?
    Knowledge of Editing and Compiling Server(and ofcourse custom icons)

     
    1) Server Side Edits:
    open
    src/map/status.h
     
    Find
     
    SC_MAX  Add Before
     
    SC_MYCUSTOMBUTTON,  
     
    Find
    SI_MAX, Add Before
     
    SI_MYCUSTOMBUTTON = ID_OF_BUTTON, (ID of Button can be any, but I suggest to have them > 2000, so not to avoid any updates with kRO(which is at 900) now)
    P.S: Remember that ID_OF_BUTTON, we gonna need them later.
     
     
    src/map/status.c
    Find
    status->IconChangeTable[SC_DECORATION_OF_MUSIC] = SI_DECORATION_OF_MUSIC; Add Below
    status->IconChangeTable[SC_MYCUSTOMBUTTON] = SI_MYCUSTOMBUTTON;  
    Recompile 
     
    2) ClientSide Edits
    Get a CleanCopy of statusicon folder (https://github.com/ROClientSide/Translation/tree/master/Data/luafiles514/lua%20files/stateicon)
     
    Open efstids.lub
    Find:
    __newindex = function()error("unknown state") Before it add,
     
    EFST_MYCUSTOMBUTTON = ID_OF_BUTTON,  P.S: ID_OF_BUTTON should match the one on source(status.h)
     
     
    Open  stateiconinfo.lub
    Find
     
    StateIconList[EFST_IDs.EFST_JUMPINGCLAN] = {  Add Before
    StateIconList[EFST_IDs.EFST_MYCUSTOMBUTTON] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { { "My Custom Button Heading", COLOR_TITLE_BUFF }, {"%s", COLOR_TIME}, --do not edit this, this shows time remaining { "Description 1" }, { "Description 2" }, { "Description 3" } }} Open
    stateiconimginfo.lua
    Find
     
    [PRIORITY_GOLD] = { OR
    [PRIORITY_RED] = {  OR
    [PRIORITY_BLUE] = {  OR
    [PRIORITY_GREEN] = {  OR
    [PRIORITY_WHITE] = {  (Depending on what background your Custom Button is)
    Add below
     
    [EFST_IDs.EFST_MYCUSTOMBUTTON] = "MYCUSTOMBUTTONFILE.TGA",  P.S: Your Button File must be in .TGA form only.
    .tga file must go to data/texture/effect/ Folder
     
    And Its DONE!!!
     
    NOTE: Replace MYCUSTOMBUTTON with your own Icon/Effect Name
  14. Upvote
    GmOcean got a reaction from kisuka in checkquest / questprogress   
    Yea, the active and inactive tabs on the client are purely visual. It's to help players decide quests they want to (actively) complete. So they are over whelmed by a lot of quests. They choose have 2 or 3 active. However, this doesn't matter source side. Since even if a quest is inactive, kills and the like, will still be counted. This is the same with 99.9% of all other MMO-RPG games with a questing system.
    If you have ever played WoW, it's the same way. AION, same thing. Ragnarok Online 2,same thing.
     
    So, we should make the changes. Because that is how official works. If we keep what we have, we're just using a make-shift system. Even if it does work.
  15. Upvote
    GmOcean got a reaction from cJei in Scripting Tutorials & Guides   
    Scripting Tutorials and Guides
    I'm going to attempt to help everyone here with their scripts while not being directly involved in helping you with them xD.
    This will also help future/current scripters get some fresh info and maybe inspire innovative ideas towards scripting.
    So that we can prove that us " Scripters " are the superior ragnarok emulation race! Take that Source Code writers!! Jk lol, we need you too .

    What I'm going to do, is write detailed tutorials on how to write a few scripts. Starting from the basics to more advanced scripts.
    This way everyone can follow along. And hopefully this will help everyone understand how to write a few scripts and even troubleshoot their own scripts.
     
    Also please read: Scripting Standards.
    It will help you understand how to read some of the syntax and way people script things.
    // A list of <sprite id>s can be found here: Sprite_IDs Credits: Ai4rei
    Scripting Tutorials & Guides
    In this section you will learn how to write scripts ranging from Complete Begginer Level Scripts ( Me and Some of you ) -> Expert Level Scripts ( Think, Developer Status O.o; )
    - Beginner Scripts -
    Scripts for complete beginners and novice scripters.
     
     
    - Intermediate Scripts -
    Scripts for intermediate level scripters. If you completed my beginner script series, then you are ready for this section.
     
     
    - Advanced Scripts -
    Scripts for advanced level scripters. If you completed my intermediate script series and have made a few of your own intermediate scripts, then you are ready for this section.
     
     
    The idea behind this topic, is for new users, and current ones, to have a (second)place they can go to for reference when trying to write a script if they can't figure it out with script_commands.txt file. It will also help people learn how to write scripts. While hopefully, keeping script writing techniques to a ' very ' similar structure!
     
    *Read Me* - I have updated the links on this post to link to the oldboard so these guides can be viewed. However, do note that the script_commands.txt links within those guides are no longer accurate. Enjoy your scripting.
  16. Upvote
    GmOcean got a reaction from Litro in Scripting Tutorials & Guides   
    Scripting Tutorials and Guides
    I'm going to attempt to help everyone here with their scripts while not being directly involved in helping you with them xD.
    This will also help future/current scripters get some fresh info and maybe inspire innovative ideas towards scripting.
    So that we can prove that us " Scripters " are the superior ragnarok emulation race! Take that Source Code writers!! Jk lol, we need you too .

    What I'm going to do, is write detailed tutorials on how to write a few scripts. Starting from the basics to more advanced scripts.
    This way everyone can follow along. And hopefully this will help everyone understand how to write a few scripts and even troubleshoot their own scripts.
     
    Also please read: Scripting Standards.
    It will help you understand how to read some of the syntax and way people script things.
    // A list of <sprite id>s can be found here: Sprite_IDs Credits: Ai4rei
    Scripting Tutorials & Guides
    In this section you will learn how to write scripts ranging from Complete Begginer Level Scripts ( Me and Some of you ) -> Expert Level Scripts ( Think, Developer Status O.o; )
    - Beginner Scripts -
    Scripts for complete beginners and novice scripters.
     
     
    - Intermediate Scripts -
    Scripts for intermediate level scripters. If you completed my beginner script series, then you are ready for this section.
     
     
    - Advanced Scripts -
    Scripts for advanced level scripters. If you completed my intermediate script series and have made a few of your own intermediate scripts, then you are ready for this section.
     
     
    The idea behind this topic, is for new users, and current ones, to have a (second)place they can go to for reference when trying to write a script if they can't figure it out with script_commands.txt file. It will also help people learn how to write scripts. While hopefully, keeping script writing techniques to a ' very ' similar structure!
     
    *Read Me* - I have updated the links on this post to link to the oldboard so these guides can be viewed. However, do note that the script_commands.txt links within those guides are no longer accurate. Enjoy your scripting.
  17. Upvote
    GmOcean reacted to Yommy in checkquest / questprogress   
    the active/inactive is purely a client side visual effect, for players to chose which tab to put the quest.
    there shouldnt be any server logic done with that choice from the server point of view, its just visual.
     
    scripts only really need to know them 3 things..
    ..player has quest.
    ..player does not have quest.
    ..player has completed quest.
     
    Kisuka is right,
    that is all.
  18. Upvote
    GmOcean got a reaction from Zephyr in Itemdb/db2 SQL & CONF   
    Okay, so adding items via itemdb.conf is really easy now, since you essentially only need to input 3 fields to get an item to exist in game. However, on the SQL side for those of us who use it, you still need to add all the information or it'll be buggy and could cause issues. Since default is either NULL or 0.
     
    #1. I suggest we update this to take on the same parameters as itemdb.conf when not filling them in. It only makes sense in my opinion. (Yes I know I can easily do this myself by editing the main.sql file. But this is a suggestion so that we won't have to in the future).
     
    #2. of the suggestion is about the inherit feature. While looking in itemdb.c you'll notice that it does some PRE-checks before adding the data to the *db. It reads the sql entries -> checks to see if it's valid -> changes information so that it is valid in the instance where it is incorrect.
    /** * Processes one itemdb entry from the sql backend, loading and inserting it * into the item database. * * @param *handle MySQL connection handle. It is expected to have data * available (i.e. already queried) and it won't be freed (it * is care of the caller to do so) * @param n Ordinal number of the entry, to be displayed in case of * validation errors. * @param *source Source of the entry (table name), to be displayed in case of * validation errors. * @return Nameid of the validated entry, or 0 in case of failure. */int itemdb_readdb_sql_sub(Sql *handle, int n, const char *source) { struct item_data id = { 0 }; char *data = NULL; /* * `id` smallint(5) unsigned NOT NULL DEFAULT '0' * `name_english` varchar(50) NOT NULL DEFAULT '' * `name_japanese` varchar(50) NOT NULL DEFAULT '' * `type` tinyint(2) unsigned NOT NULL DEFAULT '0' * `price_buy` mediumint(10) DEFAULT NULL * `price_sell` mediumint(10) DEFAULT NULL * `weight` smallint(5) unsigned DEFAULT NULL * `atk` smallint(5) unsigned DEFAULT NULL * `matk` smallint(5) unsigned DEFAULT NULL * `defence` smallint(5) unsigned DEFAULT NULL * `range` tinyint(2) unsigned DEFAULT NULL * `slots` tinyint(2) unsigned DEFAULT NULL * `equip_jobs` int(12) unsigned DEFAULT NULL * `equip_upper` tinyint(8) unsigned DEFAULT NULL * `equip_genders` tinyint(2) unsigned DEFAULT NULL * `equip_locations` smallint(4) unsigned DEFAULT NULL * `weapon_level` tinyint(2) unsigned DEFAULT NULL * `equip_level_min` smallint(5) unsigned DEFAULT NULL * `equip_level_max` smallint(5) unsigned DEFAULT NULL * `refineable` tinyint(1) unsigned DEFAULT NULL * `view` smallint(3) unsigned DEFAULT NULL * `bindonequip` tinyint(1) unsigned DEFAULT NULL * `buyingstore` tinyint(1) NOT NULL DEFAULT NULL * `delay` mediumint(9) NOT NULL DEFAULT NULL * `trade_flag` smallint(4) NOT NULL DEFAULT NULL * `trade_group` smallint(4) NOT NULL DEFAULT NULL * `nouse_flag` smallint(4) NOT NULL DEFAULT NULL * `nouse_group` smallint(4) NOT NULL DEFAULT NULL * `stack_amount` mediumint(6) NOT NULL DEFAULT NULL * `stack_flag` smallint(2) NOT NULL DEFAULT NULL * `sprite` mediumint(6) NOT NULL DEFAULT NULL * `script` text * `equip_script` text * `unequip_script` text */ SQL->GetData(handle, 0, &data, NULL); id.nameid = (uint16)atoi(data); SQL->GetData(handle, 1, &data, NULL); safestrncpy(id.name, data, sizeof(id.name)); SQL->GetData(handle, 2, &data, NULL); safestrncpy(id.jname, data, sizeof(id.jname)); SQL->GetData(handle, 3, &data, NULL); id.type = atoi(data); SQL->GetData(handle, 4, &data, NULL); id.value_buy = data ? atoi(data) : -1; // Using invalid price -1 when missing, it'll be validated later SQL->GetData(handle, 5, &data, NULL); id.value_sell = data ? atoi(data) : -1; SQL->GetData(handle, 6, &data, NULL); id.weight = data ? atoi(data) : 0; SQL->GetData(handle, 7, &data, NULL); id.atk = data ? atoi(data) : 0; SQL->GetData(handle, 8, &data, NULL); id.matk = data ? atoi(data) : 0; SQL->GetData(handle, 9, &data, NULL); id.def = data ? atoi(data) : 0; SQL->GetData(handle, 10, &data, NULL); id.range = data ? atoi(data) : 0; SQL->GetData(handle, 11, &data, NULL); id.slot = data ? atoi(data) : 0; SQL->GetData(handle, 12, &data, NULL); itemdb->jobid2mapid(id.class_base, data ? (unsigned int)strtoul(data,NULL,0) : UINT_MAX); SQL->GetData(handle, 13, &data, NULL); id.class_upper = data ? (unsigned int)atoi(data) : ITEMUPPER_ALL; SQL->GetData(handle, 14, &data, NULL); id.sex = data ? atoi(data) : 2; SQL->GetData(handle, 15, &data, NULL); id.equip = data ? atoi(data) : 0; SQL->GetData(handle, 16, &data, NULL); id.wlv = data ? atoi(data) : 0; SQL->GetData(handle, 17, &data, NULL); id.elv = data ? atoi(data) : 0; SQL->GetData(handle, 18, &data, NULL); id.elvmax = data ? atoi(data) : 0; SQL->GetData(handle, 19, &data, NULL); id.flag.no_refine = data && atoi(data) ? 0 : 1; SQL->GetData(handle, 20, &data, NULL); id.look = data ? atoi(data) : 0; SQL->GetData(handle, 21, &data, NULL); id.flag.bindonequip = data && atoi(data) ? 1 : 0; SQL->GetData(handle, 22, &data, NULL); id.flag.buyingstore = data && atoi(data) ? 1 : 0; SQL->GetData(handle, 23, &data, NULL); id.delay = data ? atoi(data) : 0; SQL->GetData(handle, 24, &data, NULL); id.flag.trade_restriction = data ? atoi(data) : ITR_NONE; SQL->GetData(handle, 25, &data, NULL); id.gm_lv_trade_override = data ? atoi(data) : 0; SQL->GetData(handle, 26, &data, NULL); id.item_usage.flag = data ? atoi(data) : INR_NONE; SQL->GetData(handle, 27, &data, NULL); id.item_usage.override = data ? atoi(data) : 0; SQL->GetData(handle, 28, &data, NULL); id.stack.amount = data ? atoi(data) : 0; SQL->GetData(handle, 29, &data, NULL); if (data) { int stack_flag = atoi(data); id.stack.inventory = (stack_flag&1)!=0; id.stack.cart = (stack_flag&2)!=0; id.stack.storage = (stack_flag&4)!=0; id.stack.guildstorage = (stack_flag&8)!=0; } SQL->GetData(handle, 30, &data, NULL); if (data) { id.view_id = atoi(data); if (id.view_id) id.flag.available = 1; } SQL->GetData(handle, 31, &data, NULL); id.script = data && *data ? script->parse(data, source, -id.nameid, SCRIPT_IGNORE_EXTERNAL_BRACKETS, NULL) : NULL; SQL->GetData(handle, 32, &data, NULL); id.equip_script = data && *data ? script->parse(data, source, -id.nameid, SCRIPT_IGNORE_EXTERNAL_BRACKETS, NULL) : NULL; SQL->GetData(handle, 33, &data, NULL); id.unequip_script = data && *data ? script->parse(data, source, -id.nameid, SCRIPT_IGNORE_EXTERNAL_BRACKETS, NULL) : NULL; return itemdb->validate_entry(&id, n, source);} Knowing this we could add an INHERIT column in our sql itemdb entries to allow for the option of making an item inherit that of another item. Which leads to my third suggestion.
     
     
    #3. While inherit is useful in some cases, it's fairly if not vastly limited, since it's a boolean option. Meaning either YES inherit or NO don't inherit. This should be changed to an item_id entry. So that we can specify WHAT item it inherits its information from. That way were not limited to re-making an existing item just to change or add a feature.
     
    Example of current inherit:
    {  Id: 501  AegisName: "Red_Potion"  Name: "Red Potion"  Buy: 1200  Weight: 150  Script: <" itemheal rand(325,405),0; "> Inherit: true}, This will make a red potion inherit all of it's information from itemdb.conf but make it act like a White Potion in terms of buy/sell price, weight and heal power.
     
    Example of suggested inherit:
    { Id: 501 AegisName: "Red_Potion" Name: "Red Potion" Inherit: 504}, This would effectively do the same thing as above should we decide to add it. BUT more importantly, i wouldn't be limited to using an existing item ID.
    { Id: 32000 AegisName: "New_Potion" Name: "New Potion" Inherit: 504}, Thusly allowing us to add new items in and inherit information without the need to overwrite an item already in existence. ( I'm repeating myself xD ).
     
    Naturally this could be applied to the SQL side as well and rightfully should if there aren't any underlying compatibility issues.
     
    For those who don't know what I'm talking about in relation to the src here is the section in question:
    if( (t = libconfig->setting_get_member(it, "Inherit")) && (inherit = libconfig->setting_get_bool(t)) ) { if( !itemdb->exists(id.nameid) ) { ShowWarning("itemdb_readdb_libconfig_sub: Trying to inherit nonexistent item %d, default values will be used instead.n", id.nameid); inherit = false; } else { // Use old entry as default struct item_data *old_entry = itemdb->load(id.nameid); memcpy(&id, old_entry, sizeof(struct item_data)); } } It would be a simple change to: *Note - would also need to change   bool inherit = false   to int inherit = false
    if( (inherit = libconfig->setting_lookup_int(it, "Inherit", &i32 )) ) {      if( !itemdb->exists(id.nameid) && inherit == 1 || !itemdb->exists(inherit) && inherit != 1 ) {      ShowWarning("itemdb_readdb_libconfig_sub: Trying to inherit nonexistent item %d, default values will be used instead.n", inherit);      inherit = false;    } else {      // Use old entry as default      if( inherit = 1 ) {        struct item_data *old_entry = itemdb->load(id.nameid);        memcpy(&id, old_entry, sizeof(struct item_data));      } else {        struct item_data *old_entry = itemdb->load(inherit);        memcpy(&id, old_entry, sizeof(struct item_data));      }    }  }  
    From my limited knowledge on the src code ( and coding in general ), this would let it lookup the item specified rather than a boolean option and then use that information as the default, else go to the default paramters given in itemdb.conf
  19. Upvote
    GmOcean got a reaction from anacondaq in explode to push arraysize   
    I just wanna suggest that the *explode script command, should push the array size of the one it creates. So that things like this are possible:
    .@a = 10;while( .@b != .@a ) { .@menu$ = .@menu$ +""+ .@b +":"; .@b++;}.@menu$ = .@menu$ +"Last Option";if( select( .@menu$ ) == ( .@size = explode( .@temp$, .@menu$, ":" ) ) ) { close; } // Clicked Last Option in list. vs what we have to do now:
    .@a = 10;while( .@b != .@a ) { .@menu$ = .@menu$ +""+ .@b +":"; .@b++;}.@menu$ = .@menu$ +"last Option";explode( .@temp$, .@menu$, ":" );if( select( .@menu$ ) == getarraysize( .@temp$ ) ){ close; } // Clicked Last Option in list.  
    It's not really " needed " more of just a feature I think it should have since commands like query_sql have it. I figure why not give it the extra feature since it's not a downgrade nor does it break backwards compatibility.
  20. Upvote
    GmOcean reacted to Yommy in kRO Introduces Pet Evolution System, Roulette Game,RoDex   
    the menu buttons changed officially,
    i'm thinking about starting a service to sell client package setups, using the latest clients
  21. Upvote
    GmOcean got a reaction from Zephyr in explode to push arraysize   
    I just wanna suggest that the *explode script command, should push the array size of the one it creates. So that things like this are possible:
    .@a = 10;while( .@b != .@a ) { .@menu$ = .@menu$ +""+ .@b +":"; .@b++;}.@menu$ = .@menu$ +"Last Option";if( select( .@menu$ ) == ( .@size = explode( .@temp$, .@menu$, ":" ) ) ) { close; } // Clicked Last Option in list. vs what we have to do now:
    .@a = 10;while( .@b != .@a ) { .@menu$ = .@menu$ +""+ .@b +":"; .@b++;}.@menu$ = .@menu$ +"last Option";explode( .@temp$, .@menu$, ":" );if( select( .@menu$ ) == getarraysize( .@temp$ ) ){ close; } // Clicked Last Option in list.  
    It's not really " needed " more of just a feature I think it should have since commands like query_sql have it. I figure why not give it the extra feature since it's not a downgrade nor does it break backwards compatibility.
  22. Upvote
    GmOcean got a reaction from Jezu in [Request] New PVP Idea + League Of Legends Type   
    Well, this is a very basic script, doing just the bare minimum of what you requested. Just the bones, no flesh =P
    prontera,160,180,4 script PVP ROOMS 123,{mes "Welcome, what PVP room do you want to enter?";switch( select("Normal PVP Room [ Unranked ]"+ (lolpvprank?":["+ .ranknames$[lolpvprank] +"] PVP Room:No Division Limit":"::") +":Close") ) { case 1: explode( .@w$, .warplocations$[0], ":" ); warp .@w$[0], atoi( .@w$[1] ), atoi( .@w$[2] ); end; case 2: explode( .@w$, .warplocations$[lolpvprank], ":" ); warp .@w$[0], atoi( .@w$[1] ), atoi( .@w$[2] ); end; case 3: explode( .@w$, .warplocations$[getarraysize(.warplocations$)], ":" ); warp .@w$[0], atoi( .@w$[1] ), atoi( .@w$[2] ); end; case 4: close;}OnPCKillEvent:for( .@i = 0; .@i< getarraysize( .warplocations ); .@i++ ) { explode( .@w$, .warplocations$[.@i], ":" ); if( strcharinfo(3) == .@w$[0] ) { .@a = 1; }}if( !.@a ) { end; } // Only Count Kills from maps in Ranked/Non-Ranked PVP rooms.lolpvpkills--; // Minus Points on death, even if it was a suicide.if( lolpvpkills == -1 ){ lolpvprank--; lolpvpkills = .lolpvpkillsrank[lolpvprank] - 1; // De-rank players and set them to 1 kill away from promotion again. announce "Ouch~! You've been deranked, back to "+ .ranknames$[lolpvprank] +"~!",bc_self | bc_blue;}if( killedrid == killerrid ){ end; } // Was a suicide so end.attachrid( killerrid );if( lolpvprank == ( getarraysize( .lolpvpkillsrank ) - 1 ) ){ end; } // Reached Max Rank already.lolpvpkills++;if( lolpvpkills >= .lolpvpkillsrank[lolpvprank +1] && .lolpvpkillsrank[lolpvprank+2] >= lolpvpkills ) { lolpvprank++; announce "Congratulations~! You are now "+ .ranknames$[lolpvprank] +"~!",bc_self | bc_blue; lolpvpkills = 0;}end;OnInit:// Warp Locations// eg: "prontera:150:180", <--- Will warp you to Prontera 150,180.setarray .warplocations$[0],"MapName:X:Y", // Unranked Warp Location ( Always make this one first ). "MapName:X:Y", // Bronze V "MapName:X:Y", // Bronze IV "MapName:X:Y", // Bronze III "MapName:X:Y", // Bronze II "MapName:X:Y", // Bronze I "MapName:X:Y", // Silver V "MapName:X:Y", // Silver IV "MapName:X:Y", // Silver III "MapName:X:Y", // Silver II "MapName:X:Y", // Silver I "MapName:X:Y", // Gold V "MapName:X:Y", // Gold IV "MapName:X:Y", // Gold III "MapName:X:Y", // Gold II "MapName:X:Y", // Gold I "MapName:X:Y", // Platinum V "MapName:X:Y", // Platinum IV "MapName:X:Y", // Platinum III "MapName:X:Y", // Platinum II "MapName:X:Y", // Platinum I "MapName:X:Y", // Challenger V "MapName:X:Y", // Challenger IV "MapName:X:Y", // Challenger III "MapName:X:Y", // Challenger II "MapName:X:Y", // Challenger I "MapName:X:Y"; // No Division Limit ( Always keep this one last ).setarray .ranknames$[0],"Unranked", "Bronze V", "Bronze IV", "Bronze III", "Bronze II", "Bronze I", "Silver V", "Silver IV", "Silver III", "Silver II", "Silver I", "Gold V", "Gold IV", "Gold III", "Gold II", "Gold I", "Platinum V", "Platinum IV", "Platinum III", "Platinum II", "Platinum I", "Diamond V", "Diamond IV", "Diamond III", "Diamond II", "Diamond I", "Challenger V", "Challenger IV", "Challenger III", "Challenger II", "Challenger I";setarray .lolpvpkillsrank[0],00, // Unranked 10,10,15,20,25, // Bronze 30,35,40,45,50, // Silver 55,60,65,70,75, // Gold 80,85,90,95,100, // Platinum 105,110,115,120,125, // Diamond 130,135,140,145,150; // Challengerend;}  
  23. Upvote
    GmOcean got a reaction from Zirius in What controls "water" in skill_require_db.txt   
    Well, incases like WZ_Waterball, it checks to see if the cell type your standing on is water type.
    if( src->type != BL_PC || map->getcell(src->m,x,y,CELL_CHKWATER) ) // non-players bypass the water requirement count++; // natural water cell else if( (su = map->find_skill_unit_oncell(src,x,y,SA_DELUGE,NULL,1)) != NULL || (su = map->find_skill_unit_oncell(src,x,y,NJ_SUITON,NULL,1)) != NULL ) { count++; // skill-induced water cell skill->delunit(su); // consume cell } However, with AL_HOLYWATER and AB_ANCILLA, there isn't a check atleast, not one directly correlated with it's titles. It just says to produce them at 100%.
    case AL_HOLYWATER: /** * Arch Bishop **/ case AB_ANCILLA: make_per = 100000; //100% success break; There isn't a check in skill.c for water type, it might be else where but I don't know where to look.
  24. Upvote
    GmOcean got a reaction from Edgar in Item Search   
    Currently, no one knows how to change that. It's a client limitation until we can find the proper hex code and make a diff for it. For now people will just have to drag the corner of the window to increase it's size or maximize it :/
  25. Upvote
    GmOcean got a reaction from Begin in Slot Machine   
    File Name: Slot Machine
    File Submitter: GmOcean
    File Submitted: 14 Sep 2014
    File Category: Events & Games
     
    This script will allow users to spend zeny &/or an item for a chance to win a prize from the slot machine. Currently there are 2 versions. First is a Single Slot Machine, where only 1 slot is rolled. Second is the Triple Slot machine, where 3 slots are rolled. For either version, SUCCESS must be the only thing displayed in order to win.
     
    To add the cutins, just place them in: data/texture/À¯ÀúÀÎÅÍÆäÀ̽º/illust
     
    /* =============================================================
    /* NOTE - If using soundeffects you must add the ".wav" files
    /* provided in the ".rar" file to your: data/wav folder located
    /* in either your: ( Ragnarok folder ) OR ( .grf file )
    /* =============================================================
     
    I've included the PSD file, so you can edit it as you like.
     
    Click here to download this file
×
×
  • Create New...

Important Information

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