Leaderboard
Popular Content
Showing content with the highest reputation on 06/27/13 in all areas
-
The problem with your if statement is the missing dot. You are saving the selected value from the SQL query to .@tree_planted but then you use @tree_planted. Furthermore, you should always use lower case commands (e.g. if instead of If and else instead of Else), unless the command requires any special case. It should work with upper case, but it is not very pretty.2 points
-
Yes, of course there are interested people! You can't even imagine. Programming is a little hobby of mine and for years now I was wondering how 3d part of clients such as RO is done. And it always boggled my mind that such an old and popular game with an open-source server existing for more than ten years, still doesn't have any open-source client code. And then to find out that there are actually plenty of programmers working on their little client-projects only to abandon it later, it's such a shame. Please, be the first one to actually release something. Don't let that effort to just go to waste. As for code quality, I consider orignial jAthena code to be ugly as hell. But if it wasn't released we wouldn't be talking here right now2 points
-
Instance System Rewrite!! r17386 contains a complete instance system rewrite! In a nutshell this new instance system allows us to create instances in a much easier fashion as opposed to the 5+ steps it took before. With the introduction of an instance database, creating an instance within a script is as simple as a single command, as well as entering it. Everything in instance creation is now handled automatically, making scripting instances a breeze compared to before. Features: Separation of instances from maps and scriptsThis allows us to create a system that is independent of the main functions (killmonster, monster, warp) using a new command instance_mapname(); Now whenever specifying a map for an instance, we no longer need specific commands to have these src4instance checks. Everything related to instancing is also done on an as needed basis, which means there won't be extra processing on each script run to figure out whether you're in an instance or not. Loading an instance automatically runs OnInstanceInitBefore it was an extra task taking generally 20-50 extra lines of unnecessary code. Now, when specifying your instance to create, this is no longer an issue. Instance database files hold the instances to be madeWith a new database file that contains all the instances, we no longer have to manually add each instance map and attach it to the scripts. This is another way we've made a system that works for the scripters, not making the scripters work for the system. We've also added a useful @reload instancedb command to reload the instancedb in runtime. Instances persist through @reloadscriptOne of the major reasons for this rewrite was to offer us the ability to use reloadscript and keep our instances in-tact. Now, when a reloadscript occurs, we reset all players to start of the instance and reset their timer. Instance persistence can be expanded upon later allowing us to store these into the SQL and even recreate them on server reboots! Script commands rewrittenWith the new system, we've removed a set of commands. These include: instance_attachmap instance_attach instance_set_timeout instance_init instance_detachmap has_instance Create instance of any mapIn the old system, we could only create instances of maps which were named to be instances because others would crash the client. Now you can create an instance of any map you'd like. Usage: To create an instance, first add it into the new database, then you can create it using instance_create and enter the instance with instance enter: 10,Instance Prontera,7200,prontera,150,150,prontera if (instance_create("Instance Prontera") < 0) // Check for a failure in creating instance instance_enter("Instance Prontera"); To make a monster in an instance, simply use the instance_mapname function. areamonster instance_mapname("prontera"),155,150,160,155,"Prontera Octopus",2192,3; You can refer to the rewritten instance scripts for more examples. Documentation for the new commands is below. Special Thanks: Euphy for suggesting this rewrite be done, doing hours of testing, and rewriting the scripts for the new system. It would have never been done without him. Auriga the Japanese emulator for giving me a place to start as well as much of the code in the new system. It certainly made this task much easier. Lemongrass for helping me out along the way and providing some code improvements in the final stages. Lighta for help in fixing bugs. The Future: Expect expansions upon this project such as instance storing in SQL and possibly additional instance types such as guild instancing. Please remember to post bug reports in the proper area and if you have any questions or need help converting a script, don't hesitate to ask. Commit 1 Commit 21 point
-
If you're not already tired of unfinished Ragnarok client projects - read on! This is a little project of mine I've been working on for a while now. It's basically the same as KeyWorld's RoBrowser project. I thought his client looked kinda cool and got tired of waiting for it, so I decided to make my own, but it's tough work! Mostly it's a learning project for my own sake with no real roadmap. This is, this is more of a share and tell than an announcement. The code-base so far is 100% JavaScript, using WebGL for graphics, WebSocket for server connection (using a WebSocket-TCP tunnel on the server side), HTML audio API for sounds and BGM and so on. Currently only running in WebKit-based browsers I think, I'll get around to other browsers later. The long term goal is to make a client implementing the features available back in the good old days of Ragnarok, around episode 6 or so. (Meaning this is not intended to be a replacement for the official client!) It a lot of work, but I'm getting closer to my first milestone; being able to log in and walk around. Some things are still left though. I need to fix my camera, implement actors, integrate my map viewer into the client and so on. Luckily I'll soon be done with all the 3D rendering related work, which is a huge relief because I have no idea what I'm doing. Now for the screenshots... Char select (as far as I've currently implemented the actual client): Morocc the old-fashioned way. Once I get the shadowing on models up and running it'll look even prettier! Lighthalzen in all it's glory. FPS is pretty good by the way. Even large detailed maps such as this go at a solid 60FPS, even when viewing the whole map at once with models animations and all that. I make sure to merge all the static geometry and build texture atlas for the models. This slows the map loading down by 5-10 seconds and uses lots of RAM (though only for a short while), so I'm considering trying to put this on the server side somehow. Unfortunately my GPU drivers are broken and crash a lot when using larger textures, so I only use atlas textures of size 2048x1024 for now, resulting in around 10 textures or so for all the models. By using atlas texture size 4096x4096 (which should work fine for most people) you only need a single texture for the whole map, speeding things up quite a bit. For fun I also tried to get my map rendering code running on my trusty iPad 1st gen. Can't say I expected much of it though. Which was why it was pleasant to see that it actually performed much better than expected, giving a great frame rate while rendering some GNDs. However it only has a grand total of 256 megabytes of RAM, of which only about 100MB is available to the browser. Another 100MB and I could probably safely load a map, but half of Alberta was the best I could do for now: Along with some grass. Don't mind the textures here, I accidentally replaced a lot of them with textures from the Alpha client so some maps look weird. Anyway, while my old iPad is a no-go I'm hoping to get this running on some of the newer mobile hardware available eventually. I don't think Android has any working support for WebGL yet, but it'll probably come soon. That's all for now. It's been an interesting journey so far through all the insanity Gravity has pulled over the years. To be continued...1 point
-
Or if you still wanted to restrict account creation, it'd be far easier to do it via a Control Panel than modifying the actual source code.1 point
-
I don't think you can use a WHERE condition in an INSERT query. You either have to remove the condition like this: query_sql("INSERT INTO `tree_db` (`last_water`) VALUES (" + gettimetick(2) + ")"); or, if you want to update an existing record, use UPDATE: query_sql("UPDATE `tree_db` SET `last_water` = " + gettimetick(2) + " WHERE `acc_id` = " + getcharid(3));1 point
-
Oh finally, been waiting for instance to be improved, thanks for this Akinari great work. I guess i can start releasing instance scripts now~1 point
-
1 point
-
1 point
-
1 point
-
1 point
-
Did you make sure to search for:getitem <ID>,1;and replace <ID> with the number you use for Ygg box, because it works fine for me. Example: getitem 617,1;1 point
-
Make sure before posting a script to turn off the Rich-Text Editor (Light Switch in top left) to keep tabs. You just need to retab the header.prontera.gat,144,173,3 script Berry Trader#1:BT 91,{1 point
-
Alright I did some testing and I got it working really well... but your cords are still a little bit messedup when he trys to move past the wall. Just add some more when he goes through the gate... I've included my test cords if you'd like to see. prontera,37,207,3 script MovingNPC 1004,{ if( .b ){ npctalk "Go away I'm busy!"; end; } set .b, 1; for(set .a,0;.a<getarraysize(.x);set .a,.a+1) { npcwalkto .x[.a],.y[.a]; //Other commands go here... while( 1 ){ getmapxy(.map$,.x3,.y3,1); sleep 100; getmapxy(.map$,.x2,.y2,1); if(.x3==.x2&&.y3==.y2) if( .x2==.x[.a]&&.y2==.y[.a] ) break; } if(!.a) { monster strnpcinfo(4),.x[.a],.y[.a],"Poring",1002,1; //enablenpc strnpcinfo(0); } } npcstop; disablenpc strnpcinfo(0); set .b, 0; end; OnInit: npcspeed 200; setarray .x[0],50,59,70,82,99,99,100,102,115,127,142,161,175,191,211,216,212,212; setarray .y[0],203,201,200,193,185,172,155,139,138,149,163,166,156,151,158,171,186,196; //setarray .x[0], 47, 56, 65, 76, 86, 97, 103, 113, 126, 134, 138/*, 161, 175, 191, 211, 216, 212, 212*/; //setarray .y[0], 208, 207, 205, 204, 204, 204, 204, 204, 204, 204, 204/*, 166, 156, 151, 158, 171, 186, 196*/; }Keep in mind if the npc can't get to the cords you've put then it will loop forever and the ending bits won't be run.1 point
-
you can download them here: http://www.mediafire.com/download/d6bhmym67dl8yd4/gravity.rar1 point
-
It's located in your "data" folder. You can extract it from your main GRFs using a program like this.1 point
-
Make the shop invisible (no coordinates), then call it with a script. Read: Callshop1 point
-
Set the <ID> on this code to the id of the ygg box which contains a certain amount of berries prontera.gat,144,173,3 script Berry Trader#1:BT 91,{ set $@npcname_mpq$, "^4000C0[Trader]^000000"; mes $@npcname_mpq$; mes "Hi, I'm the Yggdrasil Berry Trader, I can pack them into boxes for easir trading! Would you like to do some packing?"; next; menu "Yes, Please!",L_Berry,"No Thanks.",L_Exit; L_Berry: mes $@npcname_mpq$; mes "Input the amount of yggberry you want to pack"; next; input .@amount; if ( .@amount == 0 || countitem(607) < .@amount ) { mes $@npcname_mpq$; mes "Invalid amount"; close; } delitem 607, .@amount; mes $@npcname_mpq$; mes "You really have " +.@amount+ " berrys? Okay, Let's trade!"; getitem <ID>,1; mes ". . ."; mes "Thank you sweety. Dont ygg too much!"; close; LNotEnough: mes "You dont have the required items...?"; mes "Come back when you are actually ready. Now gtfo!"; close; Lnotenuff: mes "Wtf, come back when you got the goods!"; close; L_Exit: close; }1 point
-
Add the code below "OnMenu:", ex.: OnMenu: message strcharinfo(0),"Please enter the password."; input .@password$; if (.@password$ != "your_password") { mes "[Quest Shop]"; mes "Password invalid."; close; } ...1 point
-
In your ACP, under Themes, select "Easy logo changer". There is a screenshot on this file's download page.1 point
-
Much better if you are going to instruct them to run the kRO(rsu-kro-rag-lite/renewal-lite).1 point
-
1 point
-
1 point
-
1 point
-
Not directly relevant to the issue, but I figured I'd mention, you can take screenshots (a picture of your screen) by hitting the 'Print Screen' key on your keyboard and then pasting it (CTRL + V on Windows) into any image editing program (IE: Paint). It's bound to be easier than physically taking pictures and provides better clarity.1 point
-
Nope. Still ongoing. Made some heavy cleanups and will release some binary prototypes soon.1 point