Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 01/18/13 in all areas

  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.
    2 points
  2. Here's the debug technique I made. First diff my mod: http://upaste.me/raw/6e40508943049cf0 Then your map server will start throwing out more detailed warnings. Now you know what items to check.
    2 points
  3. Hey everyone. Im releasing a client pack I put together that contains everything needed for making a client to make things as easy as possible for new and current users. Making a client or updating from a old one has proven to be difficult for many and im hoping to put a end to this issue. Below is info from the readme about the client pack. The readme also contains information on how to make and install the client. ================================ The Purpose Of This Client Pack ================================ This pack was created as my response to helping the community with a few common issues. The main issue im hoping this will resolve for most users is getting all the needed files easly. During my time as a developer, ive noticed many users having issues staying up-to-date with things because of the fact that you would normally have to search here and there for all the files, tools, and other things needed just to make a fully working client. I also found myself getting outdated at times because of how things change. Many users out there still arn't fully aware of where to get up-to-date diff plugins for the WeeDiffGen program. With the release of this client pack, I hope it be less time consuming for users and allow them to catch up with everything to allow them to run a fully up-to-date server with the latest server revision with the latest client files. Their's still people out there using clients from mid 2010. Come on people. Its time to catch up. ================================ Whats Included In This Pack ================================ This client pack includes the following.... 2012-04-10aRagexeRE.exe which will be the core of your client. Pre-client generated DATA.INI file used to set what GRF files will be loaded when the client is started. The RO Mouse Freedom Plugin V1.8.4.0 (dinput.dll) to allow the mouse to freely leave the screen if your in a window. Ai4rei's kRO and RE Patchers V2.4.1.574 to patch up your official RO files. Ai4rei's Open Setup V2.5.1.147 to use as a user friendly english client options program. clientinfo.xml for setting up connection information to tell the client what IP and port to connect to, and other things. Translation Files r224 which contains translated text and texture files. Decompiled LUA files r221 for 2012-04-10 clients fully formatted and translated. WeeDiffGen r40 with all diff generator plugin's for diffing (modifying) the client exe. All of Ai4rei's latest diff generator plugin's for WeeDiffGen as of December 2nd, 2012 (already installed to WeeDiffGen) ================================ WARNING!!!! ================================ Some security programs will attack and remove some of the files included in this pack. The files itl mark as a threat are the dll plugin files used in the WeeDiffGen program and are not viruses. Before extracting, its recommended you make a new folder on your desktop and set your security software to exclude scans and real time protection for this folder, sub-folders, and files in them. Once done, extract your files in the folder. ================================ Credits ================================ All of this stuff wouldn't be possiable or exist without these people.... Ai4rei = RO Open Setup, RO Patcher Lite, and updated plugins for the WeeDiffGen program. Earthlingz = Decompiled LUA files. Gravity = Client EXE and a number of other things. (Hey, gotta give them credit too right? We wouldn't be here if RO didnt exist.) Shinryo = WeeDiffGen and original plugins for the program. Translations Team = Translated text files and textures. TrueNoir = Translated msgstringtable.txt file for 2012-04-10 client. Everyone else who helped / worked on this stuff. ================================ Change Log ================================ 12/2/2012 US = V1.0 Released. Rytech's Client Pack 2012-04-10 V1.rar
    1 point
  4. Hello there, It's been a long time since the last time I posted something here. (to the point) Here, I have repacked an updated Miruku Client, dated on 9th of January, 2013. Client was updated through normal patches, repacked using WinRAR (sorry, I still haven't learnt NSIS since the last time (http://rathena.org/board/topic/70753-miruku-07-09-2012-7th-september-2012/'>Miruku 07-09-2012 (7th September 2012)) I updated. Parts are uploaded to Mediafire. Enjoy and have a nice day~ http://www.mediafire.com/?8owj579z85ncb'>Miruku 09-01-2013 *PS: please let me know if something happens. If there is (are) missing files / problems / etc, please don't forget to PM me. Sorry, the files on my Mediafire have been deleted~ UPDATE: As I heard so much problems encountered when downloading the file (yes, I admit it is all because of my account), I have made a mirror from filecloud.io with the links below: http://filecloud.io/k2mwt8ra'>BGM http://filecloud.io/j1g6adbw'>Part 1 http://filecloud.io/djntzwpa'>Part 2 http://filecloud.io/n6chkj78'>Part 3 http://filecloud.io/5akyl0jc'>Part 4 http://filecloud.io/bdf4t8ep'>Part 5 http://filecloud.io/s82eo4fm'>Part 6 http://filecloud.io/h0xmbu71'>Part 7 http://filecloud.io/prwqiaxd'>Part 8 http://filecloud.io/hidfu2wz'>Part 9 http://filecloud.io/yu4r2qf6'>Part 10 http://filecloud.io/2y86nvum'>Part 11 UPDATE 2: Instead of sharing these files like that, I am giving you the credentials of my Mediafire. Well, I ask for all of you to be nice to all other as well as me. Not much, I am just asking you NOT to delete / damage the any of the files inside the account, as well changing the password. So, here it is: Mediafire e-mail: [email protected] password: freeforfriends Have a nice day! UPDATE 3: Now available on GDrive! https://docs.google.com/folder/d/0B4GIW--OnyUETlNPcEZhdEU0YkE/edit?usp=sharing'>https://docs.google....dit?usp=sharing Have a nice day! UPDATE 4: A mirror has been added, http://star-o.net/miruku/'>http://star-o.net/miruku/(Thank to Snow) !!! Re-hosting and re-mirrorring is NOT allowed without permission from the owner of the file !!!
    1 point
  5. File Name: Announce monster spawn permission File Submitter: Kyo File Submitted: 17 Jan 2013 File Category: Source Modifications Content Author: Kyo What is this feature? This feature is a security addon for your server to avoid corruption. What does it do? When the permission is set and a Gamemaster spawns monsters it will be announced to the server. The Monster name will be announced. The Monster ID will be announced. The amount of monsters will be announced. The coordinates will be announced. Compatibility I tested it with the latest rAthena revision (r17101) -> if you use a different revision and it shouldn't work check the support part. Support Free updates to this are included. If you're using a different rAthena revision and you cannot apply the patch, drop me a private message. Policy You are NOT allowed to remove the credits. You are NOT allowed to use this for commercial purposes. You are NOT allowed to restribute this in any way. Breaking the policy will result in you no longer getting new updates or support anymore. Credits: This code was written by me, Kyo, therefor I receive all the credits. Click here to download this file
    1 point
  6. Made from the latest rAthena release. This is my own implementation of the item "Scroll of SProtect" of Flyff to Ragnarok. I don't know if you'll find this useful, but I'll release it anyway. Scroll of SProtect item image : Description: Sprotects are used to prevent items from breaking during an upgrade for an item over +4. They are useful for Armor and Weapon Upgrades. You have to use this item script to activate sprotect. sc_start SC_SPROTECT,10000000,0; This is an initial release, there are probably bugs lying around there somewhere. Download v2sprotect2.diff V1 - Initial release V2 - Added the diff for refine npc.
    1 point
  7. Hi mythology, This message is basically just a notification that you have an error. I recommend that you edit the '/config/error.php' and turn error_reporting to true, so you can get the actual error message.
    1 point
  8. Hi ramzelle100, I recommend that you try using screen; so when you exit SSH and re-enter, you can just view the ID # of the screen window and then re-attach to view the Athena server process. http://linux.die.net/man/1/screen
    1 point
  9. are u using the Game exe provided from your Harmony Package? ( you have Uploaded it while request the Harmony Package) and did you recompiled the server after set the mmo.h to 20120410 and applied harmony patch ?
    1 point
  10. did you run your server local? or did many players got this problem? if you are the only who trys to login , check your harmony instalation , maybe something went wrong while appling the harmony diff into your Source
    1 point
  11. there is a new command that can handle this - script notest12345 -1,{ OnPCLoginEvent: if(donatorvar) atcommand "@rmvperm can_trade"; }
    1 point
  12. LOL !!I also wrote one 5 years ago before I became scripting moderator in eathena forum just almost the same as your script anyways, I just rewrite another one from scratch - script jlsfsdkjfhsd -1,{ OnInit: bindatcmd "mapflag", strnpcinfo(0)+"::Onaaa", 99, 100; // only GM99 can use setarray .mapflag, mf_nomemo, mf_noteleport, mf_nosave, mf_nobranch, mf_nowarp, mf_nowarpto; // put in more as needed setarray .mapflag$, "nomemo", "noteleport", "nosave", "nobranch", "nowarp", "nowarpto"; .size = getarraysize( .mapflag ); end; Onaaa: .@map$ = strcharinfo(3); while (1) { mes "Current map -> ^0000FF"+ .@map$ +"^000000"; for ( .@i = 0; .@i < .size; .@i++ ) mes .mapflag$[.@i] +" -> "+( ( getmapflag( .@map$, .mapflag[.@i] ) )? "^00CC00On" : "^FF0000Off" )+"^000000"; next; .@menu$ = "Current map -> ^0000FF"+ .@map$ +"^000000"; for ( .@i = 0; .@i < .size; .@i++ ) .@menu$ = .@menu$ +":"+ .mapflag$[.@i] +" -> "+( ( getmapflag( .@map$, .mapflag[.@i] ) )? "^00CC00On" : "^FF0000Off" )+"^000000"; .@s = select( .@menu$ ) -2; if ( .@s == -1 ) { if ( !input( .@tmp$, 2, 12 ) ) { if ( getmapusers(.@tmp$) != -1 ) { .@map$ = .@tmp$; } } } else if ( getmapflag( .@map$, .mapflag[.@s] ) ) removemapflag .@map$, .mapflag[.@s]; else setmapflag .@map$, .mapflag[.@s]; } close; // shouldn't reach }
    1 point
  13. prontera,150,150,5 script Broadcaster 456,{ mes "[broadcaster]"; mes "Hello "+strcharinfo(0); mes "If you want to broadcast some messages,"; mes "type ^ff0000NPC:Broadcaster^000000 in the"; mes "Whisper Box, then type ^ff0000Global#<Text>^000000, or ^ff0000Map:<Text>^000000"; mes "in the Text Box."; next; mes "[broadcaster]"; mes "Example:"; mes "[WhisperBox:] NPC:Broadcaster"; mes "[TextBox:] Global#Hi Guys!"; mes ""; mes "The message 'Hi Guys' will be"; mes "announced to everyone on the Server."; mes "If I had put 'Map' instead of 'Global'"; mes "the message would be announced to the"; mes "current Map your on."; next; mes "[broadcaster]"; mes "A Global Broadcast costs "+.global_price+" Zeny."; mes "A Map Broadcast costs "+.map_price+" Zeny."; close; OnInit: set .map_price,75000; set .global_price,150000; end; OnWhisperGlobal: if(@whispervar0$ == "Global") { if(@whispervar1$ != "") { if(Zeny < .global_price) { dispbottom "You don't have enough Zeny."; end; } set Zeny, Zeny - .global_price; announce "(From "+strcharinfo(0)+"): "+@whispervar1$+"",bc_yellow; } else announce "You didn't put a message.",bc_self|bc_red; end; } else if(@whispervar0$ == "Map") { if(@whispervar1$ != "") { getmapxy(@mapn$,@mapx,@mapy,0); if(Zeny < .map_price) { dispbottom "You don't have enough Zeny."; end; } set Zeny, Zeny - .map_price; mapannounce @mapn$,"(From "+strcharinfo(0)+"): "+@whispervar1$+"",bc_yellow; } else announce "You didn't put a message.",bc_self|bc_red; end; } end; } Doc whisper system : http://svn.rathena.org/svn/rathena/trunk/doc/whisper_sys.txt and it's working
    1 point
  14. You're warped there automatically when you've added a map incorrectly to the map index. Double-check that you've done that properly.
    1 point
  15. Yes thats the only way to disable the GM sprite on your character. <admin></admin> look for that in your clientinfo and remove your account ID.
    1 point
  16. I suggest to enable a "add server" function so we can have few servers in one account. It will help someone like me who has a High-rate Server and a Mid-rate Server.
    1 point
  17. I realize this is an old post but I thought I should share. You can use Amazon EC2 with a micro instance for free for the first year. It's what I'm using and everything works great.
    1 point
  18. As of recently, you may or may not have noticed that Jman is no longer bears the blue name that he's always carried since rAthena's creation. It bring me great regret that I'd have to announce this but unfortunately due to personal reasons and lack of time for the project, Jman has elected to resign from his position as our Community Administrator. On behalf of everyone in the emulator community, I'd like to give Jman a massive thank you for all the time and effort he's dedicated into this project so far. He's been a key player into the creation of this fork and without him we won't have the things that we do have now. I'd also like to invite anyone who desires to do so to post their appreciations below or shoot him a message. As per nominations of the current Admins and the Managers, I've been promoted to rAthena's Community Administrator. I know I've just been recently promoted as a Forum Manager but my statement in the previous topic still stands: Let's work together for the betterment and future of rAthena. If you have any comments, concerns, suggestions, or inquiry, please feel free to shoot me a message. My inbox is always open. I think that is it so far...Please expect to see some changes soon and be on the look out for future announcements. Thank you!
    1 point
  19. how could i know you have added what pc bonus recently... i am not a mind reader....
    1 point
×
×
  • Create New...