Jump to content

Patskie

Community Contributors
  • Content Count

    366
  • Joined

  • Last visited

  • Days Won

    8

Reputation Activity

  1. Upvote
    Patskie got a reaction from Mumbles in GTB Effect   
    lol right ~.~
  2. Upvote
    Patskie got a reaction from kerbiii in help in script   
    if ( BaseClass == Job_Merchant && checkcart() ) { // talk}
  3. Upvote
    Patskie got a reaction from Mumbles in Request NPC Script   
    prontera,150,150,0 script Sample 100,{ if ( countitem(7318) && getequipid(1) == 5137 ) { // allow them to go to the map warp "guild_vs3",0,0; end; }}  
    - script Sample -1,{ OnPCLoadMapEvent: getmapxy(.@map$,.@x,.@y,0); if ( .@map$ == "guild_vs3" ) { if ( !countitem(7318) || getequipid(1) != 5137 ) { message strcharinfo(0),"You need to have alice doll and old pick"; sleep2 2000; warp "SavePoint",0,0; } } end;}guild_vs3 mapflag loadevent  
    1st script is for warper
    2nd script is a checker
  4. Upvote
    Patskie got a reaction from Mumbles in Request NPC Script   
    if ( countitem(7318) && getequipid(1) == 5137 ) {    // allow them to go to the map}
  5. Upvote
    Patskie got a reaction from kerbiii in help with this npc tia   
    I should instead use clearitem commands instead of loops and inventory list comand :
    *clearitem;This command will destroy all items the invoking character has in theirinventory (including equipped items). It will not affect anything else,like storage or cart. Back to business, If you want to delete cart items of an invoking player you need to run a sql query for that ( i think unless there is a command in hercules that deletes cart items ). You can add this to my script.
     
    Change : 
    mes "Where you want to warp?";next;input .@map$;Zeny -= 1000000;warp .@map$,0,0;close; to :
    if ( checkcart() ) { query_sql "SELECT `nameid` FROM `cart_inventory` WHERE `char_id` = '" +getcharid(0)+ "'",.@a; if ( .@a ) end;}mes "Where you want to warp?";next;input .@map$;Zeny -= 1000000;warp .@map$,0,0;close; Be sure next time you are more specific when you are requesting scripts. Not tested!
  6. Upvote
    Patskie reacted to jaBote in MVP Announcer   
    The script works, you just forgot first line spaces are actually tabs:
    - script Sample -1,{ OnInit: setarray .Maps$[0],"prontera","payon","geffen"; .mob_id = 1002; end; OnMinute00: .random_index = rand(getarraysize(.Maps$)); monster .Maps$[.random_index],0,0,getmonsterinfo(.mob_id,0),.mob_id,1,strnpcinfo(1)+"::OnKill"; announce getmonsterinfo(.mob_id,0)+ " has been spawned on map " +.Maps$[.random_index],0; end; OnKill: announce getmonsterinfo(.mob_id,0)+ " has been killed and will spawn again at " +(gettime(3)+1)+ ":" +gettime(2)+ " " +(gettime(3)+1>11?"PM":"AM"),0; end;}  
     
     
    Yeah, it's an MvP (or whichever mob you want to spawn, this one is in fact a poring) each hour, on a random city. If you want to add more monsters and maps there please use my script modification of Patskie's:
     
    - script Sample -1,{ OnInit: setarray .Maps$[0],"prontera","payon","geffen","aldebaran"; // Add more map names here following this syntax (up to 128) setarray .mob_ids[0], 1002,1031,1062,1090,1096,1120,1388,1582,1613,1836,1894; // Add more mob IDs here following this syntax (up to 128) end; OnMinute00: .random_map = rand(getarraysize(.Maps$)); .random_mob = rand(getarraysize(.mob_ids)); monster .Maps$[.random_map],0,0,getmonsterinfo(.mob_ids[.random_mob],0),.mob_ids[.random_mob],1,strnpcinfo(3)+"::OnKill"; announce getmonsterinfo(.mob_ids[.random_mob],0)+ " has been spawned on map " +.Maps$[.random_map],0; end; OnKill: announce getmonsterinfo(.mob_ids[.random_mob],0)+ " has been killed and will spawn again at " +(gettime(3)+1)+ ":" +gettime(2)+ " " +(gettime(3)+1>11?"PM":"AM"),0; end;}
  7. Upvote
    Patskie got a reaction from themon in MVP Announcer   
    Every hour spawn time :
    - script Sample -1,{ OnInit: setarray .Maps$[0],"prontera","payon","geffen"; .mob_id = 1002; end; OnMinute00: .random_index = rand(getarraysize(.Maps$)); monster .Maps$[.random_index],0,0,getmonsterinfo(.mob_id,0),.mob_id,1,strnpcinfo(1)+"::OnKill"; announce getmonsterinfo(.mob_id,0)+ " has been spawned on map " +.Maps$[.random_index],0; end; OnKill: announce getmonsterinfo(.mob_id,0)+ " has been killed and will spawn again at " +(gettime(3)+1)+ ":" +gettime(2)+ " " +(gettime(3)+1>11?"PM":"AM"),0; end;}
  8. Upvote
    Patskie got a reaction from jaBote in MVP Announcer   
    Every hour spawn time :
    - script Sample -1,{ OnInit: setarray .Maps$[0],"prontera","payon","geffen"; .mob_id = 1002; end; OnMinute00: .random_index = rand(getarraysize(.Maps$)); monster .Maps$[.random_index],0,0,getmonsterinfo(.mob_id,0),.mob_id,1,strnpcinfo(1)+"::OnKill"; announce getmonsterinfo(.mob_id,0)+ " has been spawned on map " +.Maps$[.random_index],0; end; OnKill: announce getmonsterinfo(.mob_id,0)+ " has been killed and will spawn again at " +(gettime(3)+1)+ ":" +gettime(2)+ " " +(gettime(3)+1>11?"PM":"AM"),0; end;}
  9. Upvote
    Patskie got a reaction from jaBote in help with this npc tia   
    Sample1 = first request
    Sample2 = second request
    Sample3 = third request
     
    Didn't test though ( /me lazy ). Just a side note i just copy the function of @KeyWorld here ( http://rathena.org/board/topic/66255-party-checker-job/?p=118481 ) so credits to him. If any error occur post it. 
    prontera,150,150,0 script Sample1 100,{ getinventorylist; query_sql "SELECT `nameid` FROM `storage` WHERE `account_id` = '" +getcharid(3)+ "'", .@names; if ( ( BaseClass == Job_Novice ) && ( BaseLevel == 1 ) && ( Zeny > 1000000 ) && ( @inventorylist_count == 0 ) && ( !.@names ) ) { for ( .@i = 1; .@i < 15; .@i++ ) { if ( getequipid(.@i) == -1 ) { mes "Where you want to warp?"; next; input .@map$; Zeny -= 1000000; warp .@map$,0,0; close; } } }}prontera,153,153,0 script Sample2 100,{ for ( .@i = 1; .@i < 15; .@i++ ) { if ( getequipid(.@i) == -1 ) { getinventorylist; for ( set .@a, 0; .@a < @inventorylist_count; .@a++ ) { delitem @inventorylist_id[.@a], @inventorylist_amount[.@a]; } jobchange Job_Novice; BaseLevel = 1; JobLevel = 1; savepoint "prontera",150,150; end; } }}prontera,156,156,0 script Sample3 100,{ if ( getcharid(2) ) { if ( callfunc("party_has_duplicate_job") ) { mes "It seems that someone in the party has the same class than another member. Please check again the requirements..."; close; } getmapxy .@map$, .@x, .@y, 0; savepoint .@map$, .@x, .@y; end; }}function script party_has_duplicate_job{ set .@party_id, getarg( 0, getcharid(1) ); // Need to have a party. if ( .@party_id != 1 ) { return -1; } // Loading party members variables getpartymember getcharid(1),1; getpartymember getcharid(1),2; // Keep rid attached. set .@rid, playerattached(); // Check all members for ( set .@i,0; .@i<$@partymembercount; set .@i, .@i+1 ) { // Online user if ( isloggedin( $@partymemberaid[.@i], $@partymembercid[.@i]) ) { // Attach the member to access "Class" attachrid( $@partymemberaid[.@i] ); if ( compare( .@tmp_class$ + "|", "|" + Class + "|" ) ) { if ( .@rid ) attachrid(.@rid); else detachrid; return 1; } set .@tmp_class$, .@tmp_class$ + "|" + Class; } // Offline user (use sql) else { set .@sql$, .@sql$ + ( .@sql_i ? "OR " : "" ) "`char_id`='" + $@partymembercid[.@i] + "' "; set .@sql_i, .@sql_i + 1; } } // SQL for offline users if ( getstrlen(.@sql$) ) { // get class from offline members set .@count, query_sql("SELECT `class` FROM `char` WHERE " + .@sql$, .@class ); // Check the class. for ( set .@i, 0; .@i<.@count; set .@i, .@i+1 ) { if ( compare( .@tmp_class$ + "|", "|" + .@class[.@i] + "|" ) ) { if ( .@rid ) attachrid(.@rid); else detachrid; return 1; } set .@tmp_class$, .@tmp_class$ + "|" + .@class[.@i]; } } // Restore RID. if ( .@rid ) attachrid(.@rid); else detachrid; return 0;}
  10. Upvote
    Patskie got a reaction from nikki1200 in TCG Shop NPC   
    Try changing :
    prontera,150,150,0 script Dynamic Shop 100,{    callshop "dynamicshop",1;    npcshopattach "dynamicshop"; to :
    prontera,150,150,0    script    Dynamic Shop    100,{    setarray .Restricted$[0], "Job_Merchant_High","Job_Whitesmith","Job_Creator","Job_Merchant","Job_Blacksmith","Job_Alchemist","Job_Baby_Merchant","Job_Baby_Blacksmith","Job_Baby_Alchemist";    for ( set .@a, 0; .@a < getarraysize(.Restricted$); set .@a, .@a + 1 ) if ( BaseClass == .Restricted$[.@a] ) end;   callshop "dynamicshop",1;   npcshopattach "dynamicshop";
    If you are using a renewal base server then you should add those 3rd job with discount skill
  11. Upvote
    Patskie got a reaction from nikki1200 in Announce the Player when Entering PVP   
    I don't find it good that you use an array and use it on a warp command. Practically and realistically would you want your character to warp to multiple maps like naruto doing kagebunshin and go to every single company on the shinobi war? I don't think so. 
     
    JK What i meant to say is that if you will use single data you should use set instead of setarray :3
  12. Upvote
    Patskie got a reaction from Mumbles in OnClock command   
    Every 3 hours the event will start
  13. Upvote
    Patskie got a reaction from Hadeszeus in Emperium Breaker Event (Just a new IDEA)   
    Not sure : 
    - script Sample -1,{ OnMinute00: if ( ( gettime(3) % 2 ) == 0 ) monster "prontera",150,150,"Emperium",1288,1,strnpcinfo(1)+ "::OnKill"; end; OnKill: announce strcharinfo(0)+ " breaks the Emperium",0; getitem 7227,10; end;}
  14. Upvote
    Patskie got a reaction from ToiletMaster in summon monster script   
    To attach all party member. try :
     
    getpartymember getcharid(1), 2;for ( set .@i, 0; .@i < $@partymembercount; set .@i, .@i + 1 ) { detachrid; if ( attachrid($@partymemberaid[.@i]) ) { // do whatever }}
  15. Upvote
    Patskie got a reaction from Mumbles in R> Full Debuff   
    try this one
    - script debuffer -1,{OnInit: setarray .Map$[0], "arug_cas01", "schg_cas01", "schg_cas02"; set .size, getarraysize(.Map$); for ( set .@i, 0; .@i < .size; set .@i, .@i + 1 ) setmapflag .Map$[.@i], mf_loadevent; end; OnPCLoadMapEvent: getmapxy(@map$, @x, @y, 0); while ( .@j < .size ) { if ( @map$ == .Map$[.@j] ) sc_end SC_ALL; set .@j, .@j + 1; } end;}
  16. Upvote
    Patskie got a reaction from TokyRO in [Guide] How to setup hercules   
    There is an existing server installation guide made by Diconfrost VaNz on this topic but this is outdated. So let me give ample time to share my experience on how to install Hercules SVN on your local machine.
     
    1. To obtain hercules, refer to Ind's topic
    2. Go to conf/char-server.conf and look for the code below : 
    // Server Communication username and password.userid: s1passwd: p1  
    Set s1 and p1 to anything you want but take note of them as you will use them later on when you move to SQL portion of this installation.
     
    In my case, i will use patskie since it is my screen name.
    // Server Communication username and password.userid: patskiepasswd: patskie  
    3. Set your server name? Find this line also on your conf/char-server.conf. Change it to whatever you want : 
    // Server name, use alternative character such as ASCII 160 for spaces.// NOTE: Do not use spaces or any of these characters which are not allowed in //       Windows filenames /:*?"<>|//       ... or else guild emblems won't work client-side!server_name: Hercules  
    4. Remove // on the following code : 
    //login_ip: 127.0.0.1  
    //char_ip: 127.0.0.1 Note : 127.0.0.1 means localhost, local machine.
     
    5. Save and exit
    6. Now go to conf/map-server.conf
    7. Same to what you have did in conf/char-server.conf :
    //--------------------------------------------------------------//                     Configuration Info//--------------------------------------------------------------// Interserver communication passwords, set in account.txt (or equiv.)userid: patskiepasswd: patskie  
    8. Remove // on the following code :
    //char_ip: 127.0.0.1  
    //map_ip: 127.0.0.1  
    9. Once you're done. Save and exit.
    10. Now go to conf/inter-server.conf
    11. Set the following code :
    // Global SQL settings// overriden by local settings when the hostname is defined there// (currently only the login-server reads/obeys these settings)sql.db_hostname: 127.0.0.1sql.db_port: 3306sql.db_username: rootsql.db_password: ragnaroksql.db_database: herculessql.codepage:// MySQL Character SQL serverchar_server_ip: 127.0.0.1char_server_port: 3306char_server_id: rootchar_server_pw: ragnarokchar_server_db: hercules// MySQL Map SQL Servermap_server_ip: 127.0.0.1map_server_port: 3306map_server_id: rootmap_server_pw: ragnarokmap_server_db: hercules// MySQL Log SQL Databaselog_db_ip: 127.0.0.1log_db_port: 3306log_db_id: rootlog_db_pw: ragnaroklog_db_db: loglog_codepage:log_login_db: loginlog Note : Use 127.0.0.1 as ip because you will run these server on your local machine. Use root as the database id because by default MySQL workbench uses root as username. And finally ragnarok as database password which is configurable by users. Set map, char an sql database to hercules and set log database to loginlog 
     
    12. Once done, Save and exit
    13. Now go to src/common/mmo.h and find the following code :
    #ifndef PACKETVER #define PACKETVER 20120418#endif Change to : 
    #ifndef PACKETVER #define PACKETVER 20100730#endif Note : You can change 20120418 (2012-04-18) to whatever client-date you want. In my case i will use 2010-07-30 client (20100730).
     
    14. Save and exit.
    15. Now let's go to mysql part.
    16. Download MySQL workbench here. Why workbench? More convenient to use.
    17. Once you are finished downloading and installing. Download WAMP server here because workbench will not start functioning if you do not have WAMP server
    18. Once you are finished downloading and installing wampserver. Run it
    19. Open mysql workbench
    20. Add user and password into it. Follow this guide. Make sure you set username as root and password as ragnarok because this is the credentials located on your conf/inter-server.conf
    21. Create a server instance and connection. Just click New Connection for creating connection and click New Server Instance for creating a new server instance everything there are self explanatory
    22. More likely you must have the following : ( Check image below )

    23. At the left portion of the application. You can see schemas. Right click on one of them (test schema) and click on create schema
    24. Set the name of the schema to hercules because that is the credential we put in our inter-server
    25. Create also a schema log 
    26. Double click hercules schema
    27. Under file located at the bottom of the home button ( upper left to be exact ) click Open SQL Script and locate sql script on sql-files/main.sql, open it and execute ( you can find execute button at the upper portion of the text editor of mysql workbench it looks like a thunder xD )
    28. Double click log schema
    29. Under file located at the bottom of the home button ( upper left to be exact ) click Open SQL Script and locate sql script on sql-files/logs.sql, open it and execute ( you can find execute button at the upper portion of the text editor of mysql workbench it looks like a thunder xD )
    30. Once everything is set double click again hercules schema
    31. Execute the following code 
    SELECT * FROM login; 32. Change userid, user_pass to the credentials you have put on both char-server and map-server.conf
    33. Click apply.
    34. Once done, go back to your server files and compile everything using Microsoft Visual Studio 2009 or 2010 or 2012 
     
    Note : 
    Microsoft Visual Studio 2009 = Hercules-9
    Microsoft Visual Studio 2010 = Hercules-10
    Microsoft Visual Studio 2012 = Hercules-12
     
    35. Open it via C++
    36. In my case i am using MVS 2010, Highlight char-server, login-server, map-server, mapcache at the left portion of the application. Right click on it and click Build Selection
    37. Check image for successful compilation, Once done exit the application

    38. Now you're done! Run run-server.bat on main folder
     
     
    I hope this guide help other people who find it difficult to install hercules svn on your local machine. Actually this guide is not hard. I just divided the guide into small chunks so that people will understand more. If you think that any portion of installation is not included in my guide or maybe in some way not good or not correct then feel free to post it.
     
    Additional Notes : 
    - If you want other people to connect then you must port forward your router, or you can use other application like hamachi
    - If any error occur feel free to post it here. Make sure you will post it in a detailed manner. Post screenshot if possible
    - I include a diff client for 2010-07-30 since i use it in this guide
    2010-07-30-DIFF.rar
  17. Upvote
    Patskie got a reaction from Vanquiser in Soul Link Modif.. [Request]   
    src/map/status.c. You are in the english section of the hercules emulator. You should avoid using your native language in all english section unless ofcourse your native language is english. 
  18. Upvote
    Patskie got a reaction from Vanquiser in Soul Link Modif.. [Request]   
    Professor / Wizard ( intelligence / 5 ) : 
    if (sc && sc->data[SC_SOULLINK] && (sc->data[SC_SOULLINK]->val2 == SL_SAGE || sc->data[SC_SOULLINK]->val2 == SL_WIZARD)) vit += ((TBL_PC*)bl)->status.int_ / 5; Professor / Wizard ( BaseLevel * 200 ) :
    if (sc && sc->data[SC_SOULLINK] && (sc->data[SC_SOULLINK]->val2 == SL_SAGE || sc->data[SC_SOULLINK]->val2 == SL_WIZARD)) maxhp += ((TBL_PC*)bl)->status.base_level * 200; Star Gladiator ( Perfect Dodge + 10 ) :
    if (sc && sc->data[SC_SOULLINK] && sc->data[SC_SOULLINK]->val2 == SL_STAR) flee2 += 10; Star Gladiator ( Holy Monster & Boss Monster Additional Damage ) :
    if (sc && sc->data[SC_SOULLINK] && sc->data[SC_SOULLINK]->val2 == SL_STAR) { sd->right_weapon.addrace[RC_BOSS] += 100; sd->left_weapon.addrace[RC_BOSS] += 100; sd->right_weapon.addele[ELE_HOLY] += 100; sd->left_weapon.addele[ELE_HOLY] += 100;}  
    One thing is for sure. This is not 100% accurate nor will work. Hercules emulator have a different source structure.
  19. Upvote
    Patskie got a reaction from Senos in Shortening the script   
    To make this short, use a loop :
     
     
    Short version ( didn't try though ) : 
    @i = 82000;while ( @i < 82267 ) { if( checkquest(@i) ) goto N_Progress; @i++; }
  20. Upvote
    Patskie got a reaction from ToiletMaster in Shortening the script   
    To make this short, use a loop :
     
     
    Short version ( didn't try though ) : 
    @i = 82000;while ( @i < 82267 ) { if( checkquest(@i) ) goto N_Progress; @i++; }
  21. Upvote
    Patskie reacted to KeyWorld in Flux Control Panel for Hercules   
    Don't say something I didn't write.   It's not because I post a list of technologies than all have to be used, even if it's a base from a good framework, the pros and crons have to be studied before writing a piece of code. If I had enough time to write a CP, it will be already done for years but I already have some problems to regularly work on my personal projects to add a new one to the queue.   The exploits i were talking are already in discussion with Xantara and CalciumKid to find the better approach to fix it without potentially provoke a massive hack of a big part of pservers. The main problem of this exploit : it required some fix on templates folder but no servers are using the default one because of theirs custom design (so it's an update that will break all current servers).   I'm not here to promote myself, just to discuss but it seems like when an opinion diverges from yours we just are the bad guys and you need to spit on me to discredit myself and all I said, just grow up guys, I think you are enough older to have a discussion without bashing the guy in front of you.
  22. Upvote
    Patskie got a reaction from grobyczen in [Guide] How to setup hercules   
    There is an existing server installation guide made by Diconfrost VaNz on this topic but this is outdated. So let me give ample time to share my experience on how to install Hercules SVN on your local machine.
     
    1. To obtain hercules, refer to Ind's topic
    2. Go to conf/char-server.conf and look for the code below : 
    // Server Communication username and password.userid: s1passwd: p1  
    Set s1 and p1 to anything you want but take note of them as you will use them later on when you move to SQL portion of this installation.
     
    In my case, i will use patskie since it is my screen name.
    // Server Communication username and password.userid: patskiepasswd: patskie  
    3. Set your server name? Find this line also on your conf/char-server.conf. Change it to whatever you want : 
    // Server name, use alternative character such as ASCII 160 for spaces.// NOTE: Do not use spaces or any of these characters which are not allowed in //       Windows filenames /:*?"<>|//       ... or else guild emblems won't work client-side!server_name: Hercules  
    4. Remove // on the following code : 
    //login_ip: 127.0.0.1  
    //char_ip: 127.0.0.1 Note : 127.0.0.1 means localhost, local machine.
     
    5. Save and exit
    6. Now go to conf/map-server.conf
    7. Same to what you have did in conf/char-server.conf :
    //--------------------------------------------------------------//                     Configuration Info//--------------------------------------------------------------// Interserver communication passwords, set in account.txt (or equiv.)userid: patskiepasswd: patskie  
    8. Remove // on the following code :
    //char_ip: 127.0.0.1  
    //map_ip: 127.0.0.1  
    9. Once you're done. Save and exit.
    10. Now go to conf/inter-server.conf
    11. Set the following code :
    // Global SQL settings// overriden by local settings when the hostname is defined there// (currently only the login-server reads/obeys these settings)sql.db_hostname: 127.0.0.1sql.db_port: 3306sql.db_username: rootsql.db_password: ragnaroksql.db_database: herculessql.codepage:// MySQL Character SQL serverchar_server_ip: 127.0.0.1char_server_port: 3306char_server_id: rootchar_server_pw: ragnarokchar_server_db: hercules// MySQL Map SQL Servermap_server_ip: 127.0.0.1map_server_port: 3306map_server_id: rootmap_server_pw: ragnarokmap_server_db: hercules// MySQL Log SQL Databaselog_db_ip: 127.0.0.1log_db_port: 3306log_db_id: rootlog_db_pw: ragnaroklog_db_db: loglog_codepage:log_login_db: loginlog Note : Use 127.0.0.1 as ip because you will run these server on your local machine. Use root as the database id because by default MySQL workbench uses root as username. And finally ragnarok as database password which is configurable by users. Set map, char an sql database to hercules and set log database to loginlog 
     
    12. Once done, Save and exit
    13. Now go to src/common/mmo.h and find the following code :
    #ifndef PACKETVER #define PACKETVER 20120418#endif Change to : 
    #ifndef PACKETVER #define PACKETVER 20100730#endif Note : You can change 20120418 (2012-04-18) to whatever client-date you want. In my case i will use 2010-07-30 client (20100730).
     
    14. Save and exit.
    15. Now let's go to mysql part.
    16. Download MySQL workbench here. Why workbench? More convenient to use.
    17. Once you are finished downloading and installing. Download WAMP server here because workbench will not start functioning if you do not have WAMP server
    18. Once you are finished downloading and installing wampserver. Run it
    19. Open mysql workbench
    20. Add user and password into it. Follow this guide. Make sure you set username as root and password as ragnarok because this is the credentials located on your conf/inter-server.conf
    21. Create a server instance and connection. Just click New Connection for creating connection and click New Server Instance for creating a new server instance everything there are self explanatory
    22. More likely you must have the following : ( Check image below )

    23. At the left portion of the application. You can see schemas. Right click on one of them (test schema) and click on create schema
    24. Set the name of the schema to hercules because that is the credential we put in our inter-server
    25. Create also a schema log 
    26. Double click hercules schema
    27. Under file located at the bottom of the home button ( upper left to be exact ) click Open SQL Script and locate sql script on sql-files/main.sql, open it and execute ( you can find execute button at the upper portion of the text editor of mysql workbench it looks like a thunder xD )
    28. Double click log schema
    29. Under file located at the bottom of the home button ( upper left to be exact ) click Open SQL Script and locate sql script on sql-files/logs.sql, open it and execute ( you can find execute button at the upper portion of the text editor of mysql workbench it looks like a thunder xD )
    30. Once everything is set double click again hercules schema
    31. Execute the following code 
    SELECT * FROM login; 32. Change userid, user_pass to the credentials you have put on both char-server and map-server.conf
    33. Click apply.
    34. Once done, go back to your server files and compile everything using Microsoft Visual Studio 2009 or 2010 or 2012 
     
    Note : 
    Microsoft Visual Studio 2009 = Hercules-9
    Microsoft Visual Studio 2010 = Hercules-10
    Microsoft Visual Studio 2012 = Hercules-12
     
    35. Open it via C++
    36. In my case i am using MVS 2010, Highlight char-server, login-server, map-server, mapcache at the left portion of the application. Right click on it and click Build Selection
    37. Check image for successful compilation, Once done exit the application

    38. Now you're done! Run run-server.bat on main folder
     
     
    I hope this guide help other people who find it difficult to install hercules svn on your local machine. Actually this guide is not hard. I just divided the guide into small chunks so that people will understand more. If you think that any portion of installation is not included in my guide or maybe in some way not good or not correct then feel free to post it.
     
    Additional Notes : 
    - If you want other people to connect then you must port forward your router, or you can use other application like hamachi
    - If any error occur feel free to post it here. Make sure you will post it in a detailed manner. Post screenshot if possible
    - I include a diff client for 2010-07-30 since i use it in this guide
    2010-07-30-DIFF.rar
  23. Upvote
    Patskie got a reaction from Kiel in [Guide] How to setup hercules   
    Just comment out #define tags 
     
    Link : https://github.com/HerculesWS/Hercules/blob/master/src/config/renewal.h
  24. Upvote
    Patskie got a reaction from Mission in [Guide] How to setup hercules   
    There is an existing server installation guide made by Diconfrost VaNz on this topic but this is outdated. So let me give ample time to share my experience on how to install Hercules SVN on your local machine.
     
    1. To obtain hercules, refer to Ind's topic
    2. Go to conf/char-server.conf and look for the code below : 
    // Server Communication username and password.userid: s1passwd: p1  
    Set s1 and p1 to anything you want but take note of them as you will use them later on when you move to SQL portion of this installation.
     
    In my case, i will use patskie since it is my screen name.
    // Server Communication username and password.userid: patskiepasswd: patskie  
    3. Set your server name? Find this line also on your conf/char-server.conf. Change it to whatever you want : 
    // Server name, use alternative character such as ASCII 160 for spaces.// NOTE: Do not use spaces or any of these characters which are not allowed in //       Windows filenames /:*?"<>|//       ... or else guild emblems won't work client-side!server_name: Hercules  
    4. Remove // on the following code : 
    //login_ip: 127.0.0.1  
    //char_ip: 127.0.0.1 Note : 127.0.0.1 means localhost, local machine.
     
    5. Save and exit
    6. Now go to conf/map-server.conf
    7. Same to what you have did in conf/char-server.conf :
    //--------------------------------------------------------------//                     Configuration Info//--------------------------------------------------------------// Interserver communication passwords, set in account.txt (or equiv.)userid: patskiepasswd: patskie  
    8. Remove // on the following code :
    //char_ip: 127.0.0.1  
    //map_ip: 127.0.0.1  
    9. Once you're done. Save and exit.
    10. Now go to conf/inter-server.conf
    11. Set the following code :
    // Global SQL settings// overriden by local settings when the hostname is defined there// (currently only the login-server reads/obeys these settings)sql.db_hostname: 127.0.0.1sql.db_port: 3306sql.db_username: rootsql.db_password: ragnaroksql.db_database: herculessql.codepage:// MySQL Character SQL serverchar_server_ip: 127.0.0.1char_server_port: 3306char_server_id: rootchar_server_pw: ragnarokchar_server_db: hercules// MySQL Map SQL Servermap_server_ip: 127.0.0.1map_server_port: 3306map_server_id: rootmap_server_pw: ragnarokmap_server_db: hercules// MySQL Log SQL Databaselog_db_ip: 127.0.0.1log_db_port: 3306log_db_id: rootlog_db_pw: ragnaroklog_db_db: loglog_codepage:log_login_db: loginlog Note : Use 127.0.0.1 as ip because you will run these server on your local machine. Use root as the database id because by default MySQL workbench uses root as username. And finally ragnarok as database password which is configurable by users. Set map, char an sql database to hercules and set log database to loginlog 
     
    12. Once done, Save and exit
    13. Now go to src/common/mmo.h and find the following code :
    #ifndef PACKETVER #define PACKETVER 20120418#endif Change to : 
    #ifndef PACKETVER #define PACKETVER 20100730#endif Note : You can change 20120418 (2012-04-18) to whatever client-date you want. In my case i will use 2010-07-30 client (20100730).
     
    14. Save and exit.
    15. Now let's go to mysql part.
    16. Download MySQL workbench here. Why workbench? More convenient to use.
    17. Once you are finished downloading and installing. Download WAMP server here because workbench will not start functioning if you do not have WAMP server
    18. Once you are finished downloading and installing wampserver. Run it
    19. Open mysql workbench
    20. Add user and password into it. Follow this guide. Make sure you set username as root and password as ragnarok because this is the credentials located on your conf/inter-server.conf
    21. Create a server instance and connection. Just click New Connection for creating connection and click New Server Instance for creating a new server instance everything there are self explanatory
    22. More likely you must have the following : ( Check image below )

    23. At the left portion of the application. You can see schemas. Right click on one of them (test schema) and click on create schema
    24. Set the name of the schema to hercules because that is the credential we put in our inter-server
    25. Create also a schema log 
    26. Double click hercules schema
    27. Under file located at the bottom of the home button ( upper left to be exact ) click Open SQL Script and locate sql script on sql-files/main.sql, open it and execute ( you can find execute button at the upper portion of the text editor of mysql workbench it looks like a thunder xD )
    28. Double click log schema
    29. Under file located at the bottom of the home button ( upper left to be exact ) click Open SQL Script and locate sql script on sql-files/logs.sql, open it and execute ( you can find execute button at the upper portion of the text editor of mysql workbench it looks like a thunder xD )
    30. Once everything is set double click again hercules schema
    31. Execute the following code 
    SELECT * FROM login; 32. Change userid, user_pass to the credentials you have put on both char-server and map-server.conf
    33. Click apply.
    34. Once done, go back to your server files and compile everything using Microsoft Visual Studio 2009 or 2010 or 2012 
     
    Note : 
    Microsoft Visual Studio 2009 = Hercules-9
    Microsoft Visual Studio 2010 = Hercules-10
    Microsoft Visual Studio 2012 = Hercules-12
     
    35. Open it via C++
    36. In my case i am using MVS 2010, Highlight char-server, login-server, map-server, mapcache at the left portion of the application. Right click on it and click Build Selection
    37. Check image for successful compilation, Once done exit the application

    38. Now you're done! Run run-server.bat on main folder
     
     
    I hope this guide help other people who find it difficult to install hercules svn on your local machine. Actually this guide is not hard. I just divided the guide into small chunks so that people will understand more. If you think that any portion of installation is not included in my guide or maybe in some way not good or not correct then feel free to post it.
     
    Additional Notes : 
    - If you want other people to connect then you must port forward your router, or you can use other application like hamachi
    - If any error occur feel free to post it here. Make sure you will post it in a detailed manner. Post screenshot if possible
    - I include a diff client for 2010-07-30 since i use it in this guide
    2010-07-30-DIFF.rar
  25. Upvote
    Patskie reacted to Emistry in What difference bitween hercules, rathena, 3cema, eathena?   
    1 thing that rAthena dont have...
     
    Hercules support custom ideas / suggestions .....
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.