Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 04/16/13 in all areas

  1. Hi. If I remember correctly I wrote some things related to this post on the forum, at the beginning of rathena, I'm not able to find it ever, so maybe it was in the staff section. It was talking about script optimization, more specially, how some fake commands (if/else/while/for) are converting to label in the source and can be improved. Since I don't have the motivation (and the time) to work on a patch, I let you the result of my investigations here (because it was waiting from one year on my ftp). So first of all, this modifications required two commands : jump_nonzero, goto_ifexist. There will be used to rewrite all the for() while() code and optimize the code. // jump_nonzero() - inverse of jump_zero. BUILDIN_DEF(jump_nonzero,"il") BUILDIN_FUNC(jump_nonzero) { if( script_getnum(st,2) ) { if( !data_islabel(script_getdata(st,3)) ){ ShowError("script: jump_zero: not label !\n"); st->state=END; return 1; } st->pos = script_getnum(st,3); st->state = GOTO; } return 0; } // goto_ifexist() - Jump to a label if it exist (required a string !) BUILDIN_DEF(goto_ifexist,"s") BUILDIN_FUNC(goto_ifexist) { int n = search_str( script_getstr(st,2) ); if( n == -1 || str_data[n].type != C_POS ) {// label not found return 0; } st->pos = str_data[n].label; st->state = GOTO; return 0; } ---------------------------------------------------- Now, let's have fun: For NPC Script: for ( <a>; <b>; <c> ) { <d>; }Currently compiled to:<a>; __FR%x_J: jump_zero( <b>, __FR%x_FIN ); goto __FR%x_BGN; __FR%x_NXT: <c>; goto __FR%x_J; __FR%x_BGN: <d>; goto __FR%x_NXT; __FR%x_FIN:My proposal:<a>; jump_zero( <b>, __FR%x_FIN ); __FR%x_J: <d>; __FR%x_NXT: <c>; jump_nonzero( <b>, __FR%x_J ); __FR%x_FIN: While NPC Script: while ( <a> ) { <b> } Currently compiled to: __WL%x_NXT: jump_zero( <a>, __WL%x_FIN ); <b> goto __WL%x_NXT; __WL%x_FIN: My proposal: goto __WL%x_NXT; __WL%x_BGN: <b>; __WL%x_NXT: jump_nonzero( <a>, __WL%x_BGN ); __WL%x_FIN: Do-While NPC Script: do { <a> } while( <b> ); Currently compiled to: __DO%x_BGN: <a>; __DO%x_NXT: jump_zero( <b>, __DO%x_FIN ); goto __DO%x_BGN; __DO%x_FIN: My proposal: __DO%x_BGN: <a>; __DO%x_NXT: jump_nonzero( <b>, __DO%x_BGN ); __DO%x_FIN: Switch NPC Script: switch(<a>) { case 1: <b> break; default: <c> } Currently compiled code (simplify, the original is more obscure): set $@__SW%x_VAL, <a>; goto __SW%x_%xJ; __SW%x_%xJ: __SW%x_%x: if(%d != $@__SW%x_VAL) goto __SW%x_%x; <b>; goto __SW%x_FIN; // break __SW%x_%x: goto __SW%x_DEF; __SW%x_DEF: <c>; set $@__SW%x_VAL,0; goto __SW%x_FIN; __SW%x_FIN: My proposal: goto_ifexist("__SW%x_" + <a>); goto_ifexist("__SW%x_DEF"); goto __SW%x_FIN; __SW%x_1: <b> goto __SW%x_FIN; // break; __SW%x_DEF: <d> __SW%x_FIN:
    3 points
  2. Xantara's FluxCP Everyone knows of FluxCP. However, with the creation of rAthena, there became a need to support renewal changes and other features such as the new group system. This is where my Control Panel comes in. Xantara's FluxCP is a free and open source control panel to work with rAthena. Forked from FluxCP by Paradox924X and Byteflux at r1121. I will continually merge updates from the original FluxCP. Demo: http://web.artistic-coder.com/fluxcp-rA Note: this site is used to test new functionality and custom addons so it may not always be functioning properly Features The original/base FluxCP already comes with a lot of features. Here I will only highlight those that came after the fork. For a full list, click here. Updated Ragnarok Data Full Birthdate Functionality Working GM Group System Mob Skills SQLized Zeny Log Page Specific Item Drop Rates Toggle for Pre-Renewal or Renewal SQL Data Alchemist Ranking Blacksmith Ranking Paginated Item Shop Character/job images (static) WIP Account management system (link one or more in-game accounts to one CP account) Queued Accepted Suggestions (have suggestions? post them here!) Search in logs page Pin code functionality Character sprites with palettes (would replace static images) Requirements Apache webserver with PHP 5.2 or greater PDO extension with MySQL support (http://www.php.net/pdo) PHP GD2 for security images (Optional) Enabled Zip extension for exporting guild emblems (Optional) Apache/mod_rewrite for using the "Clean URLs" feature Download There are three ways to get a copy of this Control Panel. For detailed installation instructions, click here (TBD). 1. GIT Clone git clone https://github.com/missxantara/fluxcp-ra.git * For Windows, you can take a look at using TortoiseGit with its friendly user interface. 2. SVN Checkout svn checkout https://github.com/missxantara/fluxcp-ra/trunk/ * For Windows, you can take a look at using TortoiseSVN with its friendly user interface. 3. ZIP Download https://github.com/missxantara/fluxcp-ra/archive/master.zip Extra Downloads Extract to the root folder of your FluxCP system Job Image Files: http://missxantara.github.io/fluxcp-ra/downloads/FluxCP_Jobs_Images_2012-04-28.zip Updated details: April 28, 2013 Credits: Xantara Monster Image Files: http://missxantara.github.io/fluxcp-ra/downloads/FluxCP_Monsters_Eclage_14.2.zip Updated details: Mob ID #2380 of Eclage (Episode 14.2) Credits: Brynner Item Icon Files: http://missxantara.github.io/fluxcp-ra/downloads/FluxCP_Item_Icons_2012-04-08.zip Updated details: April 8, 2013 Credits: Latheesan's Extractor Item Image Files: http://missxantara.github.io/fluxcp-ra/downloads/FluxCP_Item_Images_2012-04-08.zip Updated details: April 8, 2013 Credits: Latheesan's Extractor Quick Links Wiki: https://github.com/missxantara/fluxcp-ra/wiki Bug/Suggestion Reports: https://github.com/missxantara/fluxcp-rA/issues GitPage: http://missxantara.github.io/fluxcp-ra Misc. Feel free to post any suggestions here. If suitable, they may be polled by general users before being decided to be implemented or not. If you have a feature already coded that you would like to share, please do send a GIT pull request or send me an SVN diff of the work - I'd love to take a look at it! Please note that working on this open-source project will furthermore serve as a learning opportunity for me. If you find that I've implemented something that could be improved, I urge you to let me know - your knowledge on this subject would be greatly appreciated! Like my work? Rep up the topic first post
    2 points
  3. Hmm.. Well, I have drew 3 icons for Cursed Water, Elemental Resist Potions and Undead Scrolls and decided to share with rA community. Also, this is not really what so call 'design'. My skills are very limited in Photoshop Requirement Basic knowledge on text editing. Basic knowledge on compiling your rA source code. Installation GuideServer Side 1. Open status.c, go to line 761 and add these lines: StatusIconChangeTable[SC_ENCHANTARMS] = SI_ENCHANTARMS; StatusIconChangeTable[SC_ARMOR_ELEMENT] = SI_ARMOR_ELEMENT; StatusIconChangeTable[SC_ARMOR_RESIST] = SI_ARMOR_RESIST; 2. Open status.h, go to line 1348 and add these lines: SI_ENCHANTARMS = 900, // Elemental Converter SI_ARMOR_ELEMENT = 901, // Resist Potion SI_ARMOR_RESIST = 902, // Undead Scroll 3. Compile your source.Client Side 1. Download clean stateiconinfo.lua, efstids.lua and stateiconimginfo.lua files from here. (Credits to the SVN owner.) 2. Open efstids.lua, go to line 669 and add these lines: EFST_ENCHANTARMS = 900, EFST_ARMOR_ELEMENT = 901, EFST_ARMOR_RESIST = 902, 3. Open stateiconinfo.lua, go to line 2297 and and these lines: StateIconList[EFST_IDs.EFST_ENCHANTARMS] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Enchant Weapon", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Temporarily enchants property to the user's weapon."}, } } StateIconList[EFST_IDs.EFST_ARMOR_ELEMENT] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Enchant Armor", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Temporarily enchants property to the user's armor."} } } StateIconList[EFST_IDs.EFST_ARMOR_RESIST] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Enchant Resistance", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Temporarily grants resistance to Fire/Water/Wind/Earth property attack."} } } 4. Open stateiconimginfo.lua, go to line 39 and add these lines: [EFST_IDs.EFST_ENCHANTARMS] = "ENCHANTARMS.TGA", [EFST_IDs.EFST_ARMOR_ELEMENT] = "ARMOR_ELEMENT.TGA", [EFST_IDs.EFST_ARMOR_RESIST] = "ARMOR_RESIST.TGA", DownloadsLink - http://rathena.org/b...a-status-icons/ Mirror - MediaFire Do not take credit for my work as if they were your own.
    1 point
  4. Multilanguage Support r17251 extends the functionality of rAthena's map-server message system to support other languages. When enabled, players are able to set a language to receive self-information messages, notably from atcommands. This setting is stored as the #langtype variable in `global_reg_value` (default 0, or English). Note that adding additional languages consume RAM, so all languages besides English are disabled by default. Adding a Language Languages are defined in a bitmask in trunk/src/common/msg_conf.h: enum lang_types { LANG_RUS = 0x01, LANG_SPN = 0x02, LANG_GRM = 0x04, LANG_CHN = 0x08, LANG_MAL = 0x10, LANG_IDN = 0x20, LANG_FRN = 0x40, LANG_POR = 0x80, LANG_THA = 0X100, LANG_MAX }; // Multilanguage System. // Define which languages to enable (bitmask). // 0xFFF will enable all, while 0x000 will enable English only. #define LANG_ENABLE 0x000Add values for languages you want to enable, then recompile.Setting a Language The @langtype command will allow players to switch their language setting: For example, typing @langtype SPN will make all messages display in Spanish.Language Files All language files are stored in the trunk/conf/msg_conf/ directory as map_msg_***.conf. Custom messages may be stored inside the 'import' directory for easy updating. When the server reads a line from a language file, you may receive debug messages for the following cases: The line is missing from the translation file. The language is enabled, but the table is missing. In both cases, the server will output the English line as a fallback.(As of now, not all translations are complete.) Other Changes The msg_txt function now takes a target parameter, so all lines like this: clif_displaymessage(fd, msg_txt(6)); // Your save point has been changed. Now look like this:clif_displaymessage(fd, msg_txt(sd,6)); // Your save point has been changed.If you have any conflicting code, consider using RegEx to batch update the lines rather than doing so manually; Cydh has explained the process here.Lastly, the @reloadmsgconf command will reload all message configuration files. Credits This project is made possible through the support of many of our members: Coding: @Lilith & @Lighta Translations: Chinese: @goddameit/ (svn) (user) German: @Snow/@Lemongrass Russian: @Lilith/@Jarek (svn) (user) Bahasa Malaysia: @Feistz Bahasa Indonesia: @Cydh/@nanakiwurtz (svn) (user) French: @Capuche (svn) (user) Spanish: @Leeg (svn) (user) ~ @jaBote/@Tragedy (user) Portuguese: @mkbu95 (svn) Thai: @boneskung (svn) Thanks to everyone for their help!(The original topic may be found here.) Updates Please post any updates or changes you would like to see in a translation file here; they will be reviewed and added periodically. Any time changes are made to the original map_msg files, a post will also be made; if you are contributing to the translations, I ask that you follow this topic and provide updates when this happens.
    1 point
  5. So I just talked to Namine210(http://rathena.org/board/user/1399-namine210/). She mentioned that she would like to have a parameterized @reloadscript command. She told me, she would like to be able to reload seperate core parts of the scripts, in particular the mob scripts. I agree with her idea and want to take it even further! What do you guys think of a parameterized version which features: @reloadscript: reloads everything @reloadscript custom: reloads custom files @reloadscript guild: reloads guild files @reloadscript job: reloads job files @reloadscript mobs: reloads mob files @reloadscript npc: reloads npc files @reloadscript warp: reloads warp files These optional parameters could be based on the conf files related to it. So since you are the users, what would you think of this feature?
    1 point
  6. This small modification allow you to manage damage of skills. Request: this topic Ver.2.1: patch updated. You can change the skill damage in file db/skill_damage_db.txt (skill_damage.txt) Version 1.1: added more options for manage skills damage on specific mapflags ( QQfoolsorellina'sSuggestion ) Version 2.0: added map bitflag ( Lighta's Suggestion ) Version 2.1:(Updated 2.0) Skill_damage_v1.1.patch Manage_Skill_Damage_2.0.patch manage_skill_damage_v2.1_rAthena17121.patch
    1 point
  7. File Name: Cash Shop Window File Submitter: iDontCare File Submitted: 09 Apr 2013 File Category: Textures Content Author: From pRO Base on official Texture From pRO Click here to download this file
    1 point
  8. Hello, Here i am again with a new Turbo room Style, it is designed with MOA or SM Mall of Asia, i enhance the map and extend some more areas to chill. and also more space for shops! perfect for a Item Mall So yeah! i have nothin more to say! C&C are accepted xD. Hope you like it! Mini Map In-game Screenshots
    1 point
  9. Click web hosting in your client area > click contrpl panel access it will redirect you to your cpanel or https://cpanel.asurahosting.com:2083/ login with your username and password Then click file manager > public_html or www > upload your .zip to this root or make a dir then configure your control panel config > application.php and server.php Good Luck
    1 point
  10. Recalling that: 1 = 0.01 10 = 0.1 100 = 1 1000 = 10 10000 = 100 Configure to your liking!
    1 point
  11. everytime i change the location of the npc i got a problem on this script?
    1 point
  12. PC = "Player Character" will only effect when players are killed. - script Mirage -1,{ OnNPCKillEvent: if(rand(1,.npcpercent)-1||!@m_Eq) end; getmapxy( .@Map$,.@X,.@Y,0,strcharinfo(0) ); clone .@Map$,.@X,.@Y,"Mirage::OnCloneDeath",getcharid(0),getcharid(0),14261,0,30; end; OnPCKillEvent: if(rand(1,.pcpercent)-1||!@m_Eq) end; getmapxy( .@Map$,.@X,.@Y,0,strcharinfo(0) ); clone .@Map$,.@X,.@Y,"Mirage::OnCloneDeath",getcharid(0),getcharid(0),14261,0,30; end; OnCloneDeath: charcommand "#heal "+strcharinfo(0)+" -9999"; end; OnInit: set .pcpercent,50; // Player Percent 1=1% 100=100% set .npcpercent,20; // Non-player Character 1=1% 100=100% end; }
    1 point
  13. I think its a little to CPU consuming if we add all those checks. Items dont get changed so often during runtime and even when it is enough to remove them on logout/relog etc since they arent useable anyway.
    1 point
  14. I agree. Cart and inventory aren't the only places items may be corrupted. The map-change part is fine since players stats are recalculated each time they change maps.
    1 point
  15. As it is right now there is not. But I agree that there should be such a thing for storage, guild storage, mail, cart and every other thing that allows item storage. Maybe this should be applied on character saving? What do you guys think?
    1 point
  16. Marking this as finished. All further updates/comments should be posted in SVN News.
    1 point
  17. Hi orange, This is not possible; I would recommend that you change your SSH port, and install a software firewall to prevent bruteforce attacks on your SSH. A very popular Linux-based software used for bruteforce protection is 'fail2ban'.
    1 point
  18. Check the web directory in your VPS and see where you put it?
    1 point
  19. shutdown server and try run this query in your SQL Machine.. backup ur database just in case anything happen... DELETE FROM `global_reg_value` WHERE `str` LIKE '#dailyreward';
    1 point
  20. that is the directory of the files that you have to put the LUA / LUB files into it.. we mostly use LUB file since it can be "encrypted" .. and to make thing easier..because most of the client read LUB file by default. you have to diff your client to READ LUA BEFORE LUB if you are going to use LUA files. to compile LUA to LUB, you can either use notepadd++ and directly rename the file to LUB extension or get a LUB compiler.... LUA that renamed to LUB using notepad++ will not be "encrypted" ..and larger size when compared to compiled LUB that compile using LUB compiler.
    1 point
  21. Or you can just rename it iteminfo.lua > iteminfo.lub but its not ecnrypt
    1 point
  22. You use an LUA compiler to do that. http://www.lua.org/download.html
    1 point
  23. Hi, You have to add in script.c: BUILDIN_FUNC(getchardirection) { TBL_PC *sd; if( script_hasdata(st,2) ) sd = map_nick2sd(script_getstr(st,2)); else sd = script_rid2sd(st); if( sd == NULL ){ script_pushint(st, -1); return 0; } script_pushint(st, sd->ud.dir); return 0; }And:BUILDIN_DEF(getchardirection,"?"),In your script:set .@dir, getchardirection(); if( .@dir == DIR_NORTHWEST ) { // You can see all DIR_* constantes in db/const.txt mes "Nice !"; }It's also possible to check the direction of another player by adding his name as argument:set .@direction , getchardirection("PlayerTester");Have fun.
    1 point
  24. should be data > luafiles514 > lua files since you get alexandria basic data you should use a latest lua compiler to make it lub files.
    1 point
  25. implemented in r17251 don't have russian support to read file so couldn't add it, sorry about that
    1 point
  26. @darristan nice xD @others... here is a small pack of status icon taken from Official KRO Grf...xD you might wanna give it a try .... http://www.mediafire.com/?oz29u521dwcy3f1 some icon might have existed in latest server ... i just upload part of icon that we seldom seen it. forget to inform you guys.... my computer cant read Korean text by default....so..some of these file's name might be broken. you can choose to rename the file / extract it from ur kRO grf.
    1 point
  27. no need to do hexing for this Example: Image: Location: Login --> Create a new char Korean: Äɸ¯ÅÍ ¸¸µé±â Hex code: C4C9B8AFC5CD20B8B8B5E9B1E2 English Suggestion: Create Player / Create a Char diff your client using this.WDGTranslateClientIntoEnglish.dll
    1 point
×
×
  • Create New...