Jump to content

anacondaq

Members
  • Posts

    1096
  • Joined

  • Days Won

    38

Everything posted by anacondaq

  1. Not tested, but something like that prontera,168,126,3 script Shod 689,{ mes "[ ^0065DFShod^000000 ]"; mes "Hello, im Shod"; mes "I Can Help You Warp To Your Death"; mes "You Ready?"; if( select( "Yes please","No" ) == 2 ) close; announce ""+ strcharinfo(0) +" Has Entered The Map",bc_all,0x00ff00; //announce and end warp "gld_dun01",119,20; end; OnClock0400: OnClock1200: OnClock1600: OnClock2300: stopnpctimer; announce "Shod Event are now Enable.",bc_all,0x00ff00; hideoffnpc "Shod"; initnpctimer; end; // after 1 hour kick all from map <gld_dun01-04> OnTimer60000: stopnpctimer; announce "The even has been finished",bc_all,0x00ff00; for(.@i = 1; .@i < 5; .@i++) { addrid 5, "gld_dun0"+.@i; warp "SavePoint",0,0; detachrid; } end; OnInit: hideonnpc "Shod"; while(1) { delwaitingroom; set .@count, getmapusers("gld_dun01") + getmapusers("gld_dun02") + getmapusers("gld_dun03") + getmapusers("gld_dun04"); waitingroom "Map ["+ .@count + ((.@count==1) ? " Soul" : " Souls") +"]",0; sleep 1000; } end; } Btw, open script_commands and find *mapwarp & *addrid, detach, and initnpctimer commands.
  2. This is just my personal opinion, but i should to say my few cents about it: Looks like you guys don't even understand HOW IS BIG AMOUNT OF WORK need to do You do not even answer to yourself -> for what do you need to do it? Because some knows better C++? You do not even answer to yourself -> HOW WILL YOU DO IT? Or you will keep c based functions in C++? Do you even understand, that you CAN'T change C to C++ easy as 1-2-3, and C++ project it's TOTALLY ANOTHER EMULATOR First few years (2-3) you will just try to convert C functions with C logic to another language. Then next few years you will understand that you have builded C code on C++ what you have before I really want to say a lot of words, but the main question? For what? Why not Rust? Why not GO? Why not python? What do you want to get in result? More bugs, more work, bigger time window between latest kRO episode & current rA? Or do you want just death of rAthena? What C can't do right now for you in code? Maybe it's time to better optimize C code and current functions and split millionlinesfunctions to small compact 60-70 lines function with deep & good parameters checks? Maybe it's better start to write C unit tests? I really trying understand your logic in your wishes, but i can't. Because C is hard, C in few things more limited then any other languages, but with C++ you will have million of problems with memory usage, etc things... Anyway, i respect your opinion about switching to another platform, it's ok for me, and i can't say you stop not doing it, but please think about it very well first, because looks like you guys don't even know what you are building, and i hope you will not waste a lot of your potential, time, and energy to trash.
  3. here is correct: // Copyright (c) rAthena Dev Teams - Licensed under GNU GPL // For more information, see LICENCE in the main folder #ifndef _CONFIG_RENEWAL_H_ #define _CONFIG_RENEWAL_H_ //quick option to disable all renewal option, used by ./configure #define PRERE #ifndef PRERE /** * rAthena configuration file (http://rathena.org) * For detailed guidance on these check http://rathena.org/wiki/SRC/config/ **/ /** * @INFO: This file holds general-purpose renewal settings, for class-specific ones check /src/config/classes folder **/ /// Game renewal server mode /// (disable by commenting the line) /// /// Leave this line to enable renewal specific support such as renewal formulas #define RENEWAL /// Renewal cast time /// (disable by commenting the line) /// /// Leave this line to enable renewal casting time algorithms and enable fixed cast bonuses. /// See also default_fixed_castrate in conf/battle/skill.conf for default fixed cast time (default is 20%). /// Cast time is altered be 2 portion, Variable Cast Time (VCT) and Fixed Cast Time (FCT). /// By default FCT is 20% of VCT (some skills aren't) /// - VCT is decreased by DEX * 2 + INT. /// - FCT is NOT reduced by stats, reduced by equips or buffs. /// Example: /// On a skill whos cast time is 10s, only 8s may be reduced. the other 2s are part of a FCT #define RENEWAL_CAST /// Renewal drop rate algorithms /// (disable by commenting the line) /// /// Leave this line to enable renewal item drop rate algorithms /// While enabled a special modified based on the difference between the player and monster level is applied /// Based on the http://irowiki.org/wiki/Drop_System#Level_Factor table #define RENEWAL_DROP /// Renewal exp rate algorithms /// (disable by commenting the line) /// /// Leave this line to enable renewal item exp rate algorithms /// While enabled a special modified based on the difference between the player and monster level is applied #define RENEWAL_EXP /// Renewal level modifier on damage /// (disable by commenting the line) /// // Leave this line to enable renewal base level modifier on skill damage (selected skills only) #define RENEWAL_LVDMG /// Renewal ASPD [malufett] /// (disable by commenting the line) /// /// Leave this line to enable renewal ASPD /// - shield penalty is applied /// - AGI has a greater factor in ASPD increase /// - there is a change in how skills/items give ASPD /// - some skill/item ASPD bonuses won't stack #define RENEWAL_ASPD /// Renewal stat calculations /// (disable by commenting the line) /// /// Leave this line to enable renewal calculation for increasing status/parameter points #define RENEWAL_STAT #endif #endif // _CONFIG_RENEWAL_H_
  4. 2013-08-07 seems to be stable client, i do not know reason why it happened. maybe someone else can explain and help you.
  5. no duplicate in iteminfo.lua, its randomly. do u have skype? if it happened randomly, so, that means client (.exe) somewhy stacked at loading item description and put twice the same job, you can't do anything with it, the best way it's change exe to another one, or try to google for nemo patches, maybe they already know about patch to fix the issue. Btw, which exe are you using? Which date?
  6. This is not really script request. Because with scripts you should to do a lot of work for controlling mobs, do a lot of arrays, do a lot of checks, and you will not know exact time when MVP spawned. Why do you need to do all of this job, if you can try to use src edits? Here what you need to do: 1. Open mob.c and find next function int mob_delayspawn(int tid, unsigned int tick, int id, intptr_t data) 2. In this function find mob_spawn(md); and above or below add next code // if monster boss -> do announce if( md->spawn->state.boss ) { char message[128]; sprintf(message, "[MVP Spawn]: %s has been spawned on his map.", md->name); clif_broadcast(&md->bl, message, strlen(message) + 1, BC_DEFAULT, ALL_CLIENT); } P.S. if you do not understand where need to add code above, just look function uploaded here: https://gist.github.com/anacondaqq/b0c7729aa4ed9ee73c9a45705f8daec4 Or here is diff patch: link Here is screen when i kill Tao, (tomb system enabled, mvp re-spawn time decreased in monster.conf to avoid log waiting for mvp re-spawn (just for testing this custom source mode above). Then i go to another map just to confirm that mod showing announces for all connected players to the game on any map. As you see i sitting at prt_fild, and just waiting for announce. So, as you see this mod show you if some mvp spawned. It will NOT affect @reloadscript, and reloadmobdb, it will affect only spawn data if mob killed by someone. Have fun P.S. if you wish to see where exactly spawned mob (like on screen below) replace line in modification above: sprintf(message, "[MVP Spawn]: %s has been spawned on his map.", md->name); to: sprintf(message, "[MVP Spawn]: %s has been spawned on %s map.", md->name, map_mapid2mapname(md->spawn->m));
  7. Do you see duplicate data in item description ALWAYS or time to time (randomly) for the same item? Because it can be client translation based issue, or client issues which is bugged and load twice the same item description.
  8. Hi, take a look for this information: https://github.com/rathena/rathena/pull/1524#issuecomment-242977796 This table in my comment telling where a reason of the problem, and why this problem happened. As you see problem related ONLY for increased size in struct item. So, solution can be another and easy: 1. You should define structure in item structure ONLY if you enable it. 2. Then, when you will compile server and will use it, your item structure will back to normal (like it was before of implementation this random option feature). What do you need todo? A lot of changes man... really a lot.. 1. open src/config/core.h and add extra lines like: At this point you making defining option related only to feature (which you will disable by default for your server) // Random Option Feature // Minimal client required for feature is 20150315 // This feature increase item structure usage, so you will be limited in item strorage, cart, etc structures // Can cause a lot of problems on servers with custom changes and not default values for storage, cart, etc. // #define RANDOM_OPTION_FEATURE 2. Then, with your favorite text editor you should to find all mentions in code related to MAX_ITEM_RDM_OPT + you need manually watch each file with ITEM_RDM and replace #if PACKETVER >= 20150226 to #if RANDOM_OPTION_FEATURE + many parts of code in files which you will edit WILL NOT have this string define, so you should with search option in your text editor find them manually. 3. Then, recompile, and you will get stable mmo_charstatus with normal size like it should to be, because your struct item will not have random option structure inside item structure, you you should to have next code : struct item { int id; unsigned short nameid; short amount; unsigned int equip; // location(s) where item is equipped (using enum equip_pos for bitmasking) char identify; char refine; char attribute; unsigned short card[MAX_SLOTS]; #if RANDOM_OPTION_FEATURE struct { short id; short value; char param; } option[MAX_ITEM_RDM_OPT]; // max of 5 random options can be supported. #endif unsigned int expire_time; char bound; uint64 unique_id; }; 4. sure i don't talk about extra code edits like checking if your #define RANDOM_OPTION_FEATURE has enabled in mmo.h #packet_ver > 20150315, but it's not really important for now.
  9. <?xml version="1.0" encoding="euc-kr" ?> <clientinfo> <servicetype>america</servicetype> <servertype>primary</servertype> <connection> <display>TEST Ragnarok Online</display> <balloon>TEST</balloon> <desc>TEST</desc> <address>107.160.168.105</address> <port>6900</port> <version>45</version> <langtype>1</langtype> <registrationweb>/</registrationweb> <aid> <admin>2000000</admin> <admin>2000001</admin> <admin>2000002</admin> <admin>2000003</admin> <admin>2000004</admin> <admin>2000005</admin> </aid> <loading> <image>loading00.jpg</image> <image>loading01.jpg</image> <image>loading02.jpg</image> <image>loading03.jpg</image> <image>loading04.jpg</image> <image>loading05.jpg</image> </loading> </connection> </clientinfo>
  10. Hi, you can try to use script section and select ANY already made scripts with item-based bonuses and replace commands like: countitem(item_id) and delitem item_id,amount;, and getitem item_id,amount to #CASHPOINTS += amount - how many cashpoints you wish to add #CASHPOINTS -= amount - how many cashpoints you wish to remove from player. For such manipulation's you need only next commands: attach; detach, set, if()
  11. There are a bunch of methods to do that. First of all you can try to use lzma compression for data/rdata it will change size of Data grf from 2gb to around 1.2 gb, and rdata size from 500mb to around 200-220MB, + your GRF will be resized well too. Then you can to try to avoid duplicate resource usage via "Patch tool" inside GRF editor, look screenshot below: How enable LZMA compression: Go to opions, and select compression method LZMA Then go to File -> Save Advanced -> Repack + Do not forget to put to your game-client advanced modified GRF Editor cps.dll which support classic ZIP/unzip and advanced lzma algorithm (you can find this cps.dll (size more then 72KB) in GRF editor folder (where usually you are extract your grf files)) So, you can enter to "old grf field" your data.grf, and to "newer grf field" your current game-server GRF, then create patch which you need convert to GRF, it will remove ALL duplicates in your game-server grf if compare to official data.grf. The same you can do for rdata.grf too (if you wish). Summary by following these methods you can decrease size of your full game client from 3GB up to 1.4GB easly. But please try to understand important things related to LZMA algorithm, this algorithm compress much better resources, and need the same amount of cpu (or similar) to decompress it while client will work. That means client-based processors should decompress it while they playing. And maybe it will cause some issues for players while they are playing (for example intensive CPU usage). In my personal experience LZMA were slow-down very much game-client in CPU usage for resource-heavy maps like new prontera for players with old (2007-2011 pc build) or for laptop users (all laptops has bad CPU). But decide what do you wish todo.
  12. If i remember correctly, this is can be happened because of pincode system. Open config/servers.php find string related to pincode system and turn it off.
  13. something like this (i have rewrite your functions, sorry about it) OnPCDieEvent: @orc_face = 0; sc_end SC_ORCISH; if( killerrid == getcharid(3) || killerrid > 2999999 || killerrid == NULL || baselevel < 175 ) end; // Now we checking ip of our killer and killed via getcharip(), name2rid convert killedrid to name. if( getcharip() == getcharip(name2rid(killedrid)) ) end; set KARMAPOINTS,KARMAPOINTS + 1; dispbottom "Gained : "+ 1 +" Point(s). Total : "+ KARMAPOINTS +" Karma Point(s)."; end; // killedrid - the died guy // by default we are attached to guy WHO KILL // so we should for checking IP check IP address of the guy WHO died. OnPCKillEvent: // Your default checks if( baselevel < 175 || killedrid == getcharid(3) || getstatus(SC_ORCISH) ) end; // Now we checking ip of our killer and killed via getcharip(), name2rid convert killedrid to name. if( getcharip() == getcharip(name2rid(killedrid)) ) end; // the same logic like in your example, but without "attach command" and jumping between players. if( !getstatus(SC_ORCISH,0,getcharid(0,rid2name(killedrid))) ) { sc_start SC_ORCISH,60000,10,10000,SCSTART_NOTICKDEF,killedrid; set @orc_face, @orc_face + 1, getcharid(0,rid2name(killedrid)); } set KARMAPOINTS,KARMAPOINTS + 1; dispbottom "Gained : "+ 1 +" Point(s). Total : "+ KARMAPOINTS +" Karma Point(s)."; end;
  14. it still return 0 even if my job is AB or mecha or GX or gene or RG ( can you show full script?
  15. Hi, i have experienced this too, but this happened only with players which usually playing on very old and very bugged eAthena / eAmod emulators 2007-2009 years old. Since that time a lot of things has been changed, a lot of reported bugs in 2005-2011 has been fixed (and not only this bugs), right now emulators works clother to official as never before, and it make players confused because they usually were played in another game based on very old emulator, and never knew how Ragnarok Online is for real. I want to say: it's ok if they are feeling differences where they usually playing if compare to your (i hope you have up to date) emulator. But in 80% cases usually problem has been solved for those guys by irowiki and other sources. Rest 20% of reports which me were received from them already tested by me / them and we both were trying to find sources where this behavior comes from, and how it should be for sure, and in this 20% usually we found 20% bugs in emulator, rest 80% of 20% confused things we solving by ourself via sources in internet (but to be clear a lot of good websites are down / not working anymore / or provide incorrect information (like Ratemyserver)). As i know RMS based on *athena (rA or herc or both of them) files / core, and some guides taken from rA sources / irowiki, etc. And i were shocked, when were played on some official server with modern episode, and i found really mega many differences between what RMS saying, and how for real it work (for example item descriptions / bonuses / mob descriptions). So if summarize, only in less 5% of such reports (based on my own experience) players really reporting about the bugs in rAthena emulator, in other 80% cases it's information which very easy to find by theyself somewhere in irowiki board, rest 15% it's hard to find info, but this info still exist.
  16. You can try something like that: switch( BaseThird ) { case Job_Arch_Bishop: case Job_Mechanic: case Job_Guillotine_Cross: case Job_Royal_Guard: case Job_Genetic: set @bodystylemax,1; break; default: set @bodystylemax,0; break; } That means we doing loop switch though all classes, if we have this variable in switched variable then we do 1 thing, if we do not have this variable, then we do another thing (default:)
  17. A* path finding algorithm for units for walking to long distances function. Walking mobs between maps (i talking about pure script based algorithm without touching sources) Example: what do you have: Your mob at x = 1, y = 1, you should to move your mob unit to x = 300, y = 300 in prontera, how will you do it, how will you avoid walls, obstacles, buildings, zones, warp-portals? This will be good challenge to try your power + Try to test your algorithm at any maze map what is your output (script function) mob_unitwalktoxy(.@map$, .@x, .@y); and mob will walk to this coordinates, if this coordinates busy he will walk somewhere around it. Extra important information: path.h -> MAX_WALKPATH defined to 32 and can't be changed (because it will break a lot of mechanic things in the game) path finding algorithm divided to 32 cells only around you. So you can easly walk in 32x32 area, but you should somehow found a way to walk for longer distances by walking between this 32x32 blocks easy What do you think about it?) Will be it hard for you (just for education purposes)
  18. rAthena bro, rAthena should be in your heart like in mine rAthena has pre-re & renewal in the emulator, if you want to use renewal - you don't need to do anything. If you want to use pre-re (classic mechanic) you should open renewal.h and define PRERE Example: src/config/renewal.h For PRE-RE mechanic you should uncommend this line // Copyright (c) rAthena Dev Teams - Licensed under GNU GPL // For more information, see LICENCE in the main folder #ifndef _CONFIG_RENEWAL_H_ #define _CONFIG_RENEWAL_H_ //quick option to disable all renewal option, used by ./configure #define PRERE <------------------------------ THIS ONE #ifndef PRERE /** * rAthena configuration file (http://rathena.org) * For detailed guidance on these check http://rathena.org/wiki/SRC/config/ **/ /** * @INFO: This file holds general-purpose renewal settings, for class-specific ones check /src/config/classes folder **/ /// Game renewal server mode /// (disable by commenting the line) /// /// Leave this line to enable renewal specific support such as renewal formulas #define RENEWAL
  19. something like that //===== rAthena Script ======================================= //= Find the Mushroom //===== By: ================================================== //= Mysterious //===== Current Version: ===================================== //= 3.6a //===== Compatible With: ===================================== //= rAthena SVN //===== Description: ========================================= //= Find the Mushroom - random amount of Mushrooms spawns in random maps. //= Players need to find these mushrooms and kill them to gain prizes! //===== Additional Comments: ================================= //= 3.0 Fully Functional with Rewritten script. [Mysterious] //= 3.6a Slightly edited. [Euphy] //============================================================ prontera,142,228,6 script Find the Mushroom 1014,{ mes "[ Find The Mushroom ]"; if (!.Status) mes "There is no event at the moment!"; else { mes "There are "+.Spawn+" Mushrooms left in "+.Map$+"!"; mes "Find and kill the mushrooms to gain "+getitemname(.Prize)+"!"; } if (.Status || getgmlevel() < .GM) close; mes "Start the event?"; next; if(select("- No:- Yes") == 1) close; donpcevent strnpcinfo(0)+"::OnMinute10"; mes "[ Find The Mushroom ]"; mes "Event started!"; close; OnInit: set .Prize,677; // Reward item ID set .Amount,1; // Reward item amount set .GM,60; // GM level required to access NPC setarray .Maps$[0],"izlude","geffen","morocc","prontera","payon","lighthalzen","aldebaran","hyrule"; // Possible maps end; OnMinute10: // Start time (every hour) if (.Status) end; set .Status,1; set .Spawn,rand(1,5); // How many Mushrooms should spawn? set .Map$,.Maps$[rand(getarraysize(.Maps$))]; killmonster .Map$,"All"; initnpctimer; // start timer monster .Map$,0,0,"Please don't kill me!",1084,.Spawn,strnpcinfo(0)+"::OnMobKilled"; announce "Find the Mushroom : Total of "+.Spawn+" Mushrooms have been spawned in "+.Map$+"!",0; sleep 2500; announce "Find the Mushroom : Every Mushroom you kill will give you "+getitemname(.Prize)+"!",0; end; // If nobody kill all mobs // 1800 seconds = 30 minutes OnTimer1800000: stopnpctimer; if(.Spawn || .Status) { killmonster .Map$,"All"; announce "The Find the Mushroom Event has ended. All the Mushrooms have been killed.",0; set .Status,0; } end; OnMobKilled: stopnpctimer; set .Spawn, .Spawn - 1; getitem .Prize, .Amount; if (.Spawn) announce "[ "+strcharinfo(0)+" ] has killed a Mushroom. There are now "+.Spawn+" Mushroom(s) left.",bc_map; else { announce "The Find the Mushroom Event has ended. All the Mushrooms have been killed.",0; set .Status,0; } end; }
  20. try <?xml version="1.0" encoding="euc-kr" ?> <clientinfo> <desc>Ragnarok Client Information</desc> <servicetype>america</servicetype> <servertype>primary</servertype> <connection> <display>Local</display> <address>127.0.0.1</address> <port>6900</port> <version>55</version> <langtype>1</langtype> <registrationweb></registrationweb> <admin>1000000</admin> <admin>2000000</admin> <admin>2000118</admin> <admin>2000129</admin> <loading> <image>loading00.jpg</image> <image>loading01.jpg</image> <image>loading02.jpg</image> <image>loading03.jpg</image> <image>loading04.jpg</image> </loading> </connection> </clientinfo>
  21. try to repalce bindatcmd "mining","Milenia Mining Corp::OnCmdMining"; to bindatcmd strnpcinfo(3) +"::OnCmdMining", 0, 99; where 0, 99 = means all palyers can use this command.
  22. <?xml version="1.0" encoding="euc-kr" ?> <clientinfo> <servicetype>america</servicetype> <servertype>primary</servertype> <langtype>1</langtype> change to from korea to any of your preffered settings, for example like above.
  23. Hi. Please provide more details what do you want. Because item drop very different and has seperate drops, card drop, items drop, mvp bonus drop. Yes, it's possible to edit drop only for drop multiple quanty FOR ALL cards at the same time in sources, but possible without source edits by manual edition item database add 5 cards to drop. Anyway, i think it possible to make some source edit, where you can decide how many items per item_id you want to get Example: Original line 1751,RANDGRIS,Valkyrie Randgris,Valkyrie Randgris,99,3567200,0,2854900,3114520,3,5560,9980,25,42,100,120,30,120,220,210,10,12,2,8,86,0x6283695,100,576,576,480,1427450,617,5500,603,5000,616,2000,7510,5000,2357,1600,2524,3000,2421,3000,2229,5000,7024,2500,0,0,0,0,0,0,4407,1 Modified line: 1751,RANDGRIS,Valkyrie Randgris,Valkyrie Randgris,99,3567200,0,2854900,3114520,3,5560,9980,25,42,100,120,30,120,220,210,10,12,2,8,86,0x6283695,100,576,576,480,1427450,617,5500,603,5000,616,2000,7510,5000,2357,1600,2524,3000,2421,3000,2229,5000,7024,2500,0,0,0,0,0,0,4407:5,1 Where 4407:5,1 as you see means drop 5 4407 with rate 1 If you want something like that, let me know just by mentioning my name here, when i will get free time, i maybe will help you (if someone will NOT help you before me).
×
×
  • Create New...