Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 06/11/15 in all areas

  1. In C and C++, strings are null-terminated, meaning they must end with '\0' (which is 0x00 in hex). If you omit this 0x00, the end of the string cannot be seen and it will read whatever's currently in your memory until it finds a 0x00. The + 9 is for the total length of the packet. packet length = 2 bytes (packet id) + 2 bytes (string length) + 4 bytes (npc id) + strlen(mes) bytes (number of characters in your message) + 1 byte (null-terminated char byte) = strlen(mes) + 9 If you take a look at the memcpy line, it copies 6 characters but the string "hello" is actually only 5 characters (slen - 8 = 14 - 8 = 6). This when it copies that 0x00. For any strings in C, writing this is wrong : char c[5] = "hello"; It needs to be : char c[6] = "hello"; Not really sure what you mean here! 0xb4 is a "shortcut" for 0x000000b4. The compiler converts it to a Word for you, so : 0x00b4, which is swapped around to 0xb4 0x00. So I guess that yes, you set the two values with this line. That explanation may not be 100% accurate, but it's close enough. If you had... 0xfb4, you'd get 0xb4 0x0f. If you had 0xaabb0f, you'd get 0x0f 0xbb (that 0xaa is 'lost' because it goes beyond the uint16 range of 2 bytes).
    2 points
  2. File Name: Auto shop File Submitter: Kurofly File Submitted: 27 Apr 2015 File Category: Utilities Content Author: Kurofly This script will allow players to shop their items while playing via a shop NPC, this is kind of an alternative to the auction system. Note: There's also a french version since I'm french ^^ There is a user setup, be sure to check it out ! User can add a cost to shop creation and/or a tax, there's also a delay after which the shop is deleted. Players can create a shop using an item or via the '@shop' command, depending on the mode value in the user setup Players can shop any kind of item apart from bound and time-limit items You can add items, change prices, modify your shop name anytime using the '@shop' command You can disconnect and reconnect anytime, if you sold something and/or your shop was deleted you will get your money and items on relog In case the server reboots you also get back the shop creation's cost or the item you used to open it Please report any bug you find. If I can't answer you while you are experiencing bugs, consider following this step: Make sure no one is selling when you do this because they will loose all of their sales !! Note: you can just reloadscript before doing this to give them back all of their items. //bindatcmd "delall",strnpcinfo(3)+"::OnDelall",99,99; /*In case you have problems I recommend you to uncomment this command and to execute it. It will erase all the data of every shop and every player. I myself experienced some issues not directly related to the script but to unexpected events so reseting data should temporarly solve the problem. Please contact me on rA (Kurofly) if you experience any bug*/ Click here to download this file
    1 point
  3. Hello everyone I am here to contribute in this forum. I am releasing my GvG Script to the public in able to enhanced and be improved. This script will help you lessen the work on having GvG/Team Vs GvG/Team Event. I hope some good script makers will help me simplify my work. Thank you !! I hope we can also revised it to automated script. GvG Event Script.txt
    1 point
  4. The script command 'query_sql' isn't going to be affected/changed. The array variable that it saves to though is what is affected from this patch. Here you all go: Pull: 457. Give it a test and tell me if you find any issues.
    1 point
  5. Mr. Pseudo has given you the .grf file. There are multiple ways to add or replace a map. Merging myRO.grf and newprontera.grf using GRF Builder. Step 1. Open your myRO.grf wait for it to be read. Step 2. Step 3. Replace your myRO.grf in your RO Folder. *I think the "NEW PRONTERA" map works on 2013 clients.* Since mine is // see conf/battle/client.conf for other version #ifndef PACKETVER //#define PACKETVER 20130807 #define PACKETVER 20120410 I got an error. . Manually replacing/adding the map files to your data folder. Step 1. Open your myRO.grf Step 2. Click "Extract All". Wait for it Step 3. After this click on "close". Step 4. Open your desired prontera map, extract it, and replace it all. (In my case I'm going to replace my prontera with Olrox's Fall Seasons Prontera) Step 5. Open GRFBuilder click on "New" for your new grf (I like to make new copies in case there will be a problem). Step 6. Click on "MERGE DIR" look for the "data" folder where you placed the new prontera map files. Step 7. Copy/replace your myro.grf in your RO folder. Step 8. Lastly it should work. *switched from summer to fall* Map credits to Olrox
    1 point
  6. Hi Pseudo i already patch my kRO ... so can you please tell me where to download the "New Prontera" ( link if possible ) and how to add it to my grf ? i'm sorry i'm new here ! about the ... "moroc" are you sure it's spell "morocc"? xD Q: How to add it on my grf? A: Use GRF Builder. About the moroc and morocc Check your trunk/db/map_index.txt morocc morocc_in and maps_athena.conf map: morocc map: morocc_in Just to be sure
    1 point
  7. Yes the map(gat, etc.) is spelled "morocc" but the town name is Morroc. (no idea why) You can download the new prontera files here. *Credits to Tokeiburu of Hercules* And for making new GRFs. Follow this guide
    1 point
  8. disable PACKET_OBFUSCATION src/config/core.h line 100 change to //#define PACKET_OBFUSCATION don't forget to recompile ur server
    1 point
  9. Preview : Info :GM active this game ---> player go to click NPC ---> wait for it ---> warp to game map ---> Kill all monster ---> go to next wave ---> no more wave ---> go to next level ---> no more level ---> go to reward. IF you didn't kill all monster before time over, you lose this game. IF you didn't go to click reward before time over, you get nothing. IF you are dead and no one help you, you can't do anything. Download : Another Devil Square.txt Time setting : .time_joining = 100; // How long that game will start after first join. (second) Level setting : OnSpawnMob: // getarg(0) ---> Level , getarg(1) ---> Wave , you can do what you like. callsub OnTimeLeftAnnounce, <second for player have to finish this motion or it will be game over>; callsub OnTimePauseDelay, <second for pausing the timer and it will not end this game>; callsub OnSMob, <x1>, <y1>, <x2>, <y2>, <mob id>, <amount>; // Use this to spawn monsters. default: // Game Over, go to reward mapannounce "ordeal_1-1", "[Devil Square]: You win!!", bc_map, 0x00FF00, 400, 18; enablenpc "#DevilSquarewarp2zoon6"; // Open reward npc stopnpctimer; sleep2 5000; // Delay for ending this game callsub OnEndd; break; ordeal_1-1, 149, 149, 4 script #DevilSquarewarp2zoon6 1324,{ // Default Reward NPC warp "prontera", 150, 180; getitem 607, 1; end; }
    1 point
  10. No it ain't an easy process. Sometimes if you have a huge player base (roughly 1000)... a lot of prepping time can take half a year. Especially if you're moving to Herc or rA.
    1 point
×
×
  • Create New...