Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 06/29/13 in all areas

  1. 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 2
    2 points
  2. thx..should be fixed now https://rathena.org/board/index.php?/files/file/2821-%7B?%7D/
    1 point
  3. Thousands of protesters occupy the National Congress in Brasilia, capital of Brazil, in symbolic manifestation I am Brazilian and I wonder if the foreigners are aware of the protests that are taking place in Brazil, at the height it should be festive, due to events that Brazil will receive =) What do you think of all this? What do you think will happen? More in New York Times: http://www.nytimes.com/2013/06/18/world/americas/thousands-gather-for-protests-in-brazils-largest-cities.html?src=rechp http://www.nytimes.com/2013/06/20/world/americas/brazil-protests.html?hp&_r=0
    1 point
  4. I am aware of it, the goverment lowered the bus price again. If you ask me this whole protest should be over pretty soon. Yesterday was really harsh though. Honestly, I don't think it is all about the world cup and the money that is spend on it instead of schools. It started when they made buses 20 cents expensiver. I guess that was the reason.
    1 point
  5. - script storage22 -1,{ OnInit: bindatcmd "storage",strnpcinfo(3)+"::OnAtcommand"; end; OnAtcommand: setarray .Map$[0],"guild_01","guild_02"; if(strcharinfo(3) == .Map$[0] || strcharinfo(3) == .Map$[1]){ message strcharinfo(0),"You can't open your storage here!"; end; } openstorage; end; } then on your groups.conf remove storage: true
    1 point
  6. or call a label from within the source.. Index: pc.c =================================================================== --- pc.c (revision 16138) +++ pc.c (working copy) @@ -8399,6 +8399,7 @@ night_flag = 0; // 0=day, 1=night [Yor] map_foreachpc(pc_daynight_timer_sub); strcpy(tmp_soutput, (data == 0) ? msg_txt(502) : msg_txt(60)); // The day has arrived! + npc_event_doall("OnDay"); intif_broadcast(tmp_soutput, strlen(tmp_soutput) + 1, 0); return 0; } @@ -8420,6 +8421,7 @@ night_flag = 1; // 0=day, 1=night [Yor] map_foreachpc(pc_daynight_timer_sub); strcpy(tmp_soutput, (data == 0) ? msg_txt(503) : msg_txt(59)); // The night has fallen... + npc_event_doall("OnNight"); intif_broadcast(tmp_soutput, strlen(tmp_soutput) + 1, 0); return 0; } then based on Euphy's script, you can use.. OnDay: disablenpc "Your NPC"; end; OnNight: enablenpc "Your NPC"; end;
    1 point
×
×
  • Create New...