Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 04/27/12 in all areas

  1. Summary As of r15982, variables used within scripts can be directly assigned to as you would using another programming language. That is to say, that the following set of predicates will work: @i = 1; @i++; @i *= 2; @i = @j = 1; @i -= @j; for( @i = 0; 10 > @i; @i++ ) { } while( (@i += 1) < 20 ) { } Support for all of the major operator methods have been included (+=, -=, /=, *= etc.) This announcement is to ensure that any and all problems encountered while using this method of accessing variables must be reported, along with any traces you can possibly provide (and a clear example of the script is appreciated.) This comes as a secondary update to the scripting engine to unify the language to conform to standards set by other languages. The scripting engine now supports both the direct invocation of user-defined functions (r15979 and r15981) and variable access systems (r15982.) Notes This does not affect previous scripts at all. The new engine converts patterns that match var = value; to set(var, value); for backwards compatibility. Testing was performed using all of the operator methods, and was tested using loops. However, nested operations have not yet been thoroughly tested.
    6 points
  2. Hi, it's me again (haha), i think it is be nice if you guys (core developers), it's make switch accept words and numbers (now, just accept numbers ..), for example: switch(getarg(0)){ case 'mes': mes getarg(1); break; case 'getitem': getitem getarg(1), 1; break; } and again: sorry for my bad english.
    3 points
  3. Yeah it's possible since switch is hardcode with goto. First way: Change $@__SW%x_VAL, to be $@__SW%x_VAL$ (and all stuff related to decimal value (strtol(), etc. ) to convert directly int to string and don't have problems. Second way: Create a new variable ($@__SW%x_TYPE ?) that will store if the data is a int (value 0) or string (value 1), create a new var $@__SW%x_VAL$ and will do the right tests in the 'case' stuff based on $@__SW%x_TYPE to know if using $@__SW%x_VAL$ or $@__SW%x_VAL. @devs It should be good to use .@vartype to store this king of private data...
    2 points
  4. I can confirm this behavior with Chrome, it looks like it has problems with memory leeks. I also tested it with Opera and Firefox and with those two it's working fine.
    2 points
  5. This is designed for the incompetent. The same information can be found in my nfo file. If you wish to keep a little pice of me with you. You can download it off of my public cloud. Spread me around like a cancer! Pour some sugar on me~ P.S. This will be updated, improved regularly. If I miss something please get in touch with me. Keep it up everyone, let's work together! ^_^V SVN rAthena GIT~ https://github.com/rathena/rathena SVN Downloader TortoiseSVN ~ http://tortoisesvn.net/downloads.html Codeplex ~ http://downloadsvn.codeplex.com/ SmartSVN ~ http://www.syntevo.c...n/download.html KRO Installer Miruku ~ http://miruku.rathena.org/ RateMyServer ~ http://ratemyserver....wnload_kROLinks RSU ~ http://nn.nachtwolke.com/dev/rsu/ Clients & Diff Patchers k3dT 2013 Clients - http://k3dt.eu/Ragexe/unpacked/ Weetools Clients ~ https://subversion.a...etools/clients/ Supportmii Clients ~ http://supportmii.com/ro1/Clients/ Earthlingz CleintSide ~ http://www.assembla....bversion/nodes/ ShinsDiffPatcher ~ https://subversion.a...insDiffPatcher/ rAthena's Online Diff Patcher ~ http://rathena.org/t...iff_patcher.php LUA/LUB & Data LUA/Data ~ http://svn6.assembla...svn/ClientSide/ LUB ~ http://code.google.c.../downloads/list Packet_dbs & Packet_lengths Packets ~ http://svn6.assembla...ntSide/Packets/ actRO, Browedit, GRF, Sprite, Client Tools Ratemyserver Tools ~ http://ratemyserver....e=download_tool Supportmii Tools ~ http://supportmii.com/ro1/tools/ Browedit ~ http://browedit.exca...com/?a=download Shins Programs WeeMapCache ~ https://subversion.a...nk/WeeMapCache/ WeeThumbnail ~ https://subversion.a...k/WeeThumbnail/ rAthena's Tools rA's Login Background Screen Generator ~ http://rathena.org/t...gin_background/ Game Server Patchers Thor ~ http://thor.aeomin.net/ Triad ~ http://www.nitroconc...d/index_eng.php Control Panels FluxCP ~ https://github.com/c.../fluxcp-renewal CeresCP ~ http://sourceforge.n.../cerescp/files/ Guides & Info Judas Bible ~ http://supportmii.co.../JudasBible.pdf rAthena Wiki ~ http://rathena.org/wiki/ Misc Helpful Links eAthena Board ~ http://eathena.ws/forum/ RMS Sprite Bible ~ http://ratemyserver....riot_bible_main Web Host Talk ~ http://www.webhostingtalk.com/ Codes / Scripts Paste Sites kPaste ~ http://rathena.kpaste.net/ uPaste ~ http://upaste.me Pastebin ~ http://pastebin.com/ Security / Client Protection Harmony ~ https://harmonize.it/ Setup.exe BlueGhost Setup.exe ~ http://rathena.org/b...up/#entry144124 OpenSetup ~ http://www.mediafire...abj2jau2wxbvoiu
    1 point
  6. kRO MVP Tomb System.... Changelog: 1.0 First version 2.0 Added Feature showTimeRespawn and showTimerRespawn. 2.1 Fixed map crashing when MVP arena is use or summoning MVP using 'monster' script. 3.0 Fixed duplicate issue and max gap. TODO: incorporate with the convex mirror. (need info in official behavior) @battle.h // rAthena int max_third_parameter; int atcommand_max_stat_bypass; +// Tomb System [malufett] +int show_mvp_tomb; @battle.c **/ { "max_third_parameter", &battle_config.max_third_parameter, 20, 0, INT_MAX, }, { "atcommand_max_stat_bypass", &battle_config.atcommand_max_stat_bypass, 0, 0, 100, }, +{ "skill_amotion_leniency", &battle_config.skill_amotion_leniency, 90, 0, 100, }, +// Tomb System [malufett] +{ "show_mvp_tomb", &battle_config.show_mvp_tomb, 1, 0, 1 }, // Should MVP slaves retain their target when summoned back to their master? mob_slave_keep_target: yes +// Show Tomb when MVP got killed? +show_mvp_tomb: yes @mob.c md->spawn_timer = add_timer(gettick()+spawntime, mob_delayspawn, md->bl.id, 0); +if( md->status.mode&MD_BOSS && + battle_config.show_mvp_tomb){//Tomb System [malufett] + struct map_session_data *sd = map_id2sd(md->target_id); + md->target_id = npc_mvp_tomb(md, sd ); +} int mob_spawn (struct mob_data *md) { int i=0; unsigned int tick = gettick(); int c =0; +if(md->status.mode&MD_BOSS && + battle_config.show_mvp_tomb){//Tomb System [malufett] + npc_mvp_tomb(md, NULL); +} clif_clearunit_delayed(&md->bl, CLR_DEAD, tick+250); if(!md->spawn) //Tell status_damage to remove it from memory. return 5; // Note: Actually, it's 4. Oh well... +if( mvp_sd && md->status.mode&MD_BOSS && battle_config.show_mvp_tomb)//Tomb System [malufett] + md->target_id = mvp_sd->bl.id; @npc.c npc_debug_warps_sub(map[m].npc[i]); } +/** MVP Tomb System. [malufett] +**/ +int npc_mvp_tomb(struct mob_data *md, struct map_session_data *sd){ + char w1[256], w2[256], w3[256]; + struct npc_data *nd = NULL; + + nullpo_ret(md); + + if(sd){ + struct mob_data *boss_md = map_getmob_boss(sd->bl.m); // Search for Boss on this Map and ignore summoned Boss + + if( boss_md != NULL && + boss_md->bl.prev != NULL && + md->bl.id == boss_md->bl.id ) + { + int x = boss_md->bl.x, y = boss_md->bl.y; + const struct TimerData * timer_data = get_timer(md->spawn_timer); + + if(md->spawn_timer == INVALID_TIMER) + return 1; + + sprintf(w2, "Tomb#%d|%d", boss_md->class_, (DIFF_TICK(timer_data->tick, gettick()) + 60)); + sprintf(w1, "%s, %d, %d, 1", map[boss_md->bl.m].name, x , y); + sprintf(w3, "%s@%s", sd->status.name, map[boss_md->bl.m].name); + sprintf(w2, "%s::%s", w2, w3); + sprintf(w3, "%s::OnMyMobDead", w3); + + safestrncpy(md->npc_event, w3, sizeof(md->npc_event)); + npc_parse_duplicate(w1,"duplicate(tomb_stone)",w2,"565", "-", "-", "MVP_TOMB"+boss_md->class_); + + npc_event(sd,md->npc_event,0); + safestrncpy(md->npc_event, "", sizeof(md->npc_event)); + return sd->bl.id; + } + }else{ + struct map_session_data *msd = map_id2sd(md->target_id); + + if(msd != NULL){ + sprintf(w1, "%s@%s", msd->status.name, map[md->bl.m].name); + nd = npc_name2id(w1); + if (nd != NULL){ + npc_unload(nd); + md->target_id = 0; + } + } + } + return 0; +} @npc.h int npc_duplicate4instance(struct npc_data *snd, int m); int npc_cashshop_buy(struct map_session_data *sd, int nameid, int amount, int points); +int npc_mvp_tomb(struct mob_data *md, struct map_session_data *sd); How to configure? 1. Add this script on your npc/custom folder. tomb_stone.txt - v1.0 tomb_stone.txt - v2.0 tomb_stone.txt - v3.0 2. Add this line scripts_custom.conf npc: npc/custom/tomb_stone.txt 3. And lastly the adding of tomb to MVP monster *for this nothing to configure in your mob folder, just make/add to your liking ex. anthell02,0,0,0,0 boss_monster Maya 1147,1,7200000,0,1 4. Open tomb_stone.txt and edit the settings for your likings. //+-- -- -- -- -- -- -- + //| Settings | //+-- -- -- -- -- -- -- + set .showTimeRespawn, 1; // Display the time when the MVP will respawn set .showTimerRespawn, 1; // Display countdown timer Patch for rA MVP Tomb Version. Download: MVP_Tomb_added_features.patch Download:MVP_Tomb_Added_Features_15981_v1.1.PATCH *must update rA rev to 15908+ Patch for eA with rA MVP Tomb Version. Download: rA_MVP_Tomb_Added_Features_For_eA15090.PATCH Note: Add on your own risk...=P Enjoy!! ^^, Comments and suggestions are highly accepted....
    1 point
  7. Made the Event downloadable through my SVN. Download: http://mysterious-project.googlecode.com/svn/trunk/npc/ Changes: http://code.google.c...ect/source/list
    1 point
×
×
  • Create New...