Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 12/25/11 in Posts

  1. Queue System The code is commented all the way through to ease the reading and understanding of it. Updates 25/12: Redownload queue.txt, forgot silly quotation of a query at the bottom during testing. 25/12: Updated example at the bottom of the post to keep pulling if it gets an error. 27/12: Fixed a bug and optimized a variable, thanks KeyWorld. New version 1.01 14/06: Did some minor optimizations and commented better for linked lists. New version 1.02. I decided to stick with getgmlevel since it's a better way to sort influential people out then groupid. If your server do not have table creation permission, please execute the query on line 29 separately. Please do not use or redistribute this script without giving proper credits. Report all bugs you notice! Files queue.txt - Version 1.02 queue.txt - Version 1.01 queue.txt - Version 1.00 queuetest.txt - The script I used to bug test, good to check if unsure how to use the functions speedtest.txt - Please run this and reply with the values Prologue When you create a script involving more than one player at a time, you usually have to limit the script or access in an ugly kind of way, or build a kind of waiting hall where the players have to sit until it’s their turn. You never find the time to make a sleek waiting system for every script you make. You then remember playing another RPG where you could sign up, even sign up with friends, and you would be paired up with other people who signed up for the same event, battleground or PvP fight. Look no further; this Queue system is what you’re looking for! What is it? This is a system that you embed in to your own script. It’s simple in its function but also powerful to let you customize it exactly to match what you need for the moment. It lets you store players, parties or guilds in a queue. You can then retrieve them from that queue. Both actions have their own simple function call; “push” and “pull”. You only need the player attached when “pushing” them to the queue and you will receive a list of Account IDs when you “pull” players from the queue. Why would you, a mighty coder, use this system when you could just make it yourself? What makes it special enough to actually bother to include? This system lets you put players and parties in the same queue. You can then tell it to retrieve, say, 20 players for you. For the current event, you do not care if people join with friends or by themselves so it will put together 20 people within your customizations and makes sure to keep the parties unbroken. It will also make sure that the players, who have waited the most, get picked first. Features Are there any more awesome features? Yes! Full feature list: General: · Can support infinite amount of queues · The list uses MySQL so no queue is lost when restarting the server · Supports priority system (will be explained below) · Custom error codes so you will know exactly what went wrong · Supports linking events together (will be explained below) Push: · Supports single players, parties and guilds · Can set level required for the queue Pull: · Can return mixed players/parties · Can return only players · Can return parties only until X players are found · Can return a single party of a certain size · You can choose how many players to pull from the queue · If X players aren’t found, you can set it to return the IDs found or an error Priority system: If you want to make donators have a perk, if your event requires a champion to join fast or for any reasons don’t want players to wait, the priority system is something to use! If you set priority to a player, they will be put first in the queue, bypassing those who have been waiting. This can ONLY be used when pulling players or players and parties. You cannot give parties priority. Linked events: If you have some events that you want people to be able to queue for at the same time, linking events is for you! Say you have two events: Event 1 Event 2 You can put a link together in 2 possible ways. 1) $@queue3[0], 1, 2; This will get players from queue 1 and 2 when asking for event 3. 2) $@queue1[0], 3; $@queue2[0], 3; This will get players from queue 3 when asking for 1 or 2. What can I use it for? Say you are making any kind if event, battleground, PvP room or if you just like to put people in to a queue to then announce the time for them. All you have to worry about is (1) putting them in the queue and what should I do with the account IDs I’ve received when asking who was next in line. The rest just works. How can I use it? If you want a simple queue, you can just include the code and then copy/paste one of the examples below. If you want to make it fit perfectly in your script, then you should read up on the two functions described below. First of all, there’s a NPC at the top of the script file. If you want to link events (see information about linking above) then you should edit that NPC. The main two functions you will be interacting with are “push” and “pull”. The push function callfunc("push", arg(0), arg(1), arg(2), arg(3)); Type of input 0. Player 1. Party 2. Guild Event number; 0 means all events Level required for the event Should the member get priority? 0. No 1. If GM level is above 0 2. Yes Function return values: 0. Successful 1. No player attached 2. Base level too low 3. Player is missing a party 4. Party size is too small ( < 2 ) 5. A party member was offline 6. A party member was too low level 7. A player/guild was already in the queue 8. Player is missing a guild 9. Player is not guild leader The pull function This function sets two temporary, global variables. Make sure to copy them before the script gets another queue! $@queue[] – Contains all the IDs wanted $@queue_size – Contains the amount of IDs recieved callfunc("pull", arg(0), arg(1), arg(2), arg(3)); How you would like to search for players 0. Both players and parties 1. Only players 2. Only parties 3. Only guilds Event number; 0 means all events Amount of players wanted Required to fill the group 0. Returns the ones found, even if it couldn’t find the amount wanted 1. Returns an error if it couldn’t find the amount wanted (If you’re searching for parties only, this will search for a party at exactly the size specified) Function return values: 0. Successful 1. Size wanted was 0 2. Didn't get the required amount of players from the DB 3. Didn't get the required amount of players after filtering Example: // Put the player in to the queue for event 1, lvl 5 is required callfunc("push", 0, 1, 5, 0); ... ... ... // Now I want to get 5 players for my event 1, I want to make sure I get all 5 while(callfunc("pull", 0, 1, 5, 1)) sleep 100; // Keep pulling untill we don't have an error set .@queue_size, $@queue_size; copyarray .@queue[0], $@queue[0], .@queue_size; // Here I have all the account IDs in '.@queue' and I can use them as I want! I have included the NPC I used to bug test the script. It will show how you use the functions described above. It can also erase the content of the table and fill it with dummy data for testing.
    4 points
  2. Hello everyone. Im here today to release a batch of decompiled Lua files made from the latest Lub's in the client's official grf's. The files you see here were decompiled and adjusted to work with the latest RO clients while in a decompiled form. This allow's private server dev's to add many different types of custom content to their clients without the need of hexing a client. These files are completely brand new and dont use any data from any past decompiled files (Except emotionlist.lub). Reason is because as old as the last release is (March 2011) it was hard to find a starting point. Not only that, past releases are missing some needed data like job checks for skill requirements, types, missing other data....etc. It was best to start from scratch so I could make some fully up-to-date and reliable files. The files here were made with the latest lub's from around December of 2011. However, due to issues with December clients I made and tested them while using a 2011-11-22aRagexeRE client. No function changes were made during the month of December. With the release of these files I hope to help the community move a big step forward to getting full support for the latest clients possiable. Rytech's Decompiled Lua's Release For 2011-11-22 client. = How To Use = Place the "lua files" folder in your RO/data/ directory. They will work in data folders and GRF's. Be sure to have the "Load Lua Before Lub" diff diffed into your client. = Notes = Skill names in the skillinfolist.lua are still in Korean as I didnt bother taking the time to replace the names with english ones....yet. All 3rd job skill descripts in the skilldescript.lua are copied from the sakray iRO client and are mostly up-to-date with the info for the 2011 balances from kRO. The stateiconinfo.lua is from iRO's sakray client and is up-to-date with skill info. However, iRO skill names are used in here and will need to be replaced with kRO skill names in the future. Finally, I will not bother decompileing any function files since its pointless. Their's no possiable ways in customize with editing them and is best to keep true to the original coding in them for the client date. If for some reason one does need to be decompiled then I will do it. Other then that, have fun and enjoy the release. =Final Notes The development and release of these files is a big step in my plan for getting full support completed for newer clients. So many users out there are still using clients from around Feb....March....around there due to lack of newer lua support. Its time to start moving up to the newer stuff. So much has changed since then and now their's many new custom things that can be added. Im really looking forward to the future. =D ----------------------------------------------------------------------------- Below are 2 downloads. The 1st one is the original release and is mainly for development purposes. The 2nd one (V2) is a re-release that includes a few updated files and makes installing a lot easier, as well as allowing the use of the "Load Lua Before Lub" diff. Rytech's Decompiled Lua Release 2011-11-22.rar Rytech's Decompiled Lua Release 2011-11-22 V2.rar
    2 points
  3. I'd like to suggest the style of my company I'm working on. We use it for PHP, Python, Perl, C, C++ and even Assembler. /** * Description here, * Even multilined. * - 1 line space before params or return statements * - 1 line space between params and return statements * * @param<TAB><name of param><TAB><Parameter description> * * @return<TAB><type of return><TAB><Return description> */ This is our style of comments and is used above every function/method/prodcedure and is supported natively from doxygen i.e. I would love to see somedays every comment in that way <3 Also, if a comment takes 2 or more lines, we use multiline comment blocks. If not, single line comments of course. Suggestions?
    2 points
  4. Title: Eden Release Author: jTynne - [email protected] Background History: I originally created this region as the starting town for the second version of UtopiaRO. As the server is no longer online, I've decided to make these a public release. This package includes 44 Monster Sprites (Recolored), 1 Town Map, 1 Indoors Map (spl_in duplicate), 3 Field Maps, 1 PVP Map, 4 Dungeon Maps, Monster Coding (Stats/Skills), Spawns, Warp Portals, and Map Flags. Donations can be made via Paypal to : [email protected] This release is intended for pre-RE servers. You will need to adjust the experience and monster stats before using it on a RE-based server. You can see the maps in action below: http://www.jtynne.co.../packages/eden/ Download: http://rathena.org/b...eden-by-jtynne/ Thank You! The individuals listed below have sent in a donation as thanks for this release.
    1 point
  5. WeeDiffGen <no image available> Info: Plug-in for my diff patcher that allows you to generate diffs on the fly without the need of a diff file. Clients 2010-08-17bRagexeRE 'till 2011-04-05aRagexeRE parsed successfully. Features: Allows input boxes Inline descriptions Has an easy to use interface to create further diffs Plug-in based (you can just delete diff plug-ins which you never use) Supports 35+ diffs so far Probably some others that I forgot for now Downloads: WeeDiffGen SVN WeeDiffGen Plugins SVN WeeDiffGen Interface SVN Quick Usage 1. Grab the Diff Patcher here: http://www.eathena.w...howtopic=268538 2. Download WeeDiffGen.dll from SVN and place it inside the plug-ins folder of the patcher. 3. Create a folder named "WeeDiffGen" inside the plug-ins folder and paste your desired plug-ins there. 4. Start the patcher and select WeeDiffGen as patch engine. 5. Select an executable. 6. Select your diffs. 7. Select output file. 8. Patch it. Alternatively: Download the whole repository from here: https://subversion.assembla.com/svn/weetool...insDiffPatcher/ Notes: This release is not the final one. It is meant for developers to test and implement new stuff without taking care of hexing newer clients. Also, it may still contain some bugs. I won't give any support on how to implement server side code to get your server working with those clients. However, the generator itself creates a log file in case a diff should break. Should a diff not been listed in the patcher, then it probably failed to parse and added an entry inside of the file "Patcher/plugins/WeeDiffGen/WeeDiffGen.log". If you never used a specific diff, then just don't place it inside the plug-ins folder of WeeDiffGen. This way you have the possibility of only using those diffs that you have always used. Don't forget that this plug-in only works with my Diff Patcher above or equal to version 1.1a. So if you still use the old version then go and update it. It will also work only on clients that were compiled with VC9. Also, you can request a diff that has been already marked as obsolete. As long as there is enough interest in a diff, I don't mind to fix/create it.
    1 point
  6. by Beowulf and Nightroad (and a little by me) SVN: https://cerescp.svn.sourceforge.net/svnroot/cerescp/trunk/ Website: http://cerescp.sf.net/ Demo: http://cerescp.sourceforge.net/demo/ Features: Ajax Based System, to speed up the page loads and answers (it doesn't need to load the entire page every time you click something) Divorce System, because sometimes your partner stops playing and the server won't let you divorce with partner offline Player Ladder Guild Ladder Zeny Ladder Password Change E-Mail Change Money Transfer Change Slot Who is Online About page with statistics from the server Reset Position Reset Look Development has slowed. If you would like SVN access, let me know!
    1 point
  7. Patcher has been updated, the information here.
    1 point
  8. datasprite악세사리 datatexture유저인터페이스
    1 point
  9. Sounds like you want someone to do all the work for you... How about you at least try? Do what you can, and then ask for help. Or if you are trying to hire staff (to do the work for you), post in the Jobs Available section.
    1 point
  10. Thank you for this, i'm going to spread the milk
    1 point
  11. 1 point
  12. A mi me gusta este proyecto, en eAthena ya casi nadie se preocupa por las cosas, dejan los proyectos tirados, y pues no nos podemos quedar atras, hay que "renovarnos", yo no soy tan bueno desarrollando como los que llevan años en esto, pero si pienso aportar lo que pueda en la medida de lo posible. ¡Arriba rAthena!
    1 point
×
×
  • Create New...