Jump to content
RF-Dev | RF Online Development
g00dw1n

Yorozuya - Open Source Zone Guard [2.2.3.2]

Recommended Posts

You must be a registered member of RF-Dev and logged in to view this content.

How did you fix the script files to allow the yorozuya zone to open? 

Share this post


Link to post
Share on other sites
Posted (edited)
You must be a registered member of RF-Dev and logged in to view this content.

I'll give you an example

I deleted everything inside quest.dat then i make the file same size as it used to be (6,255,996 bytes). Tested with different zoneserver. None of them give error. Worked normally but when i use yorozuya's zone it crashes cause it sees an unusual file unlike the other zones. ( in my opinion )

So the best thing you can do is use clean files always. Do not delete anything directly inside of script files. If you delete something and try to trick the yorozuya's zone with simply adding byte is not going to work. It'll crash. If you want to edit something. Use working structure, edit carefully and always use datcutter. If you use clean script files you'll see the difference.

Edited by Wade

Share this post


Link to post
Share on other sites

Extra bytes at the end of script files means the file was edited with an incorrect structure.

Refer to "trimming null bytes" guides on how to correct them. The datcutter tool also works, although its good to know exactly what is being done here to understand the problem.

Manual fix:

  1. Open your structure and script with Structorian.
  2. Select the final block, and scroll down to the bottom column of the last block.
  3. Check the hex editor view. Any null bytes showing after the last data column are bad data and must be deleted manually. Null bytes look like: "0F 3A 00 00 00 00 00". Note the offset or values of the final data column in the last block so you can find this in a hex editor.
  4. Open a hex editor, manually remove all null bytes (all the extra 0's), save the file.

 

Your script dat file should now be "clean", and you should find a better structure to edit the file next time.

Share this post


Link to post
Share on other sites
You must be a registered member of RF-Dev and logged in to view this content.

not all 00 Byte is extra byte, some script have 00 in end of file.

Some Information About Script : 
You must be a registered member of RF-Dev and logged in to view this content.

 

Black Block : Total Rows of the current script.

Red Block : Total Struct of current script.

Orange Block : Total Size of Structure. 

Here's How To Calculate : 
(Black Block * Orange Block) + Count 3 Block Of This Information (3* 4 Byte) = End Of File (Real Size Of Files). The Rest Of This is Extra Bytes.

Example : (417*1044) + 12 = 435360

End Of Files Look Like this : 
You must be a registered member of RF-Dev and logged in to view this content.

 

For Client is difference, Client doesnt contain information about Red Block, Only contain 2 information, so the formula is : 

(Black Block * Orange Block) + 2 Block Of This Information (2* 4 Byte) : 

This is an example of Item.dat ( Splitted ) : 

calc3.jpg

 

But there's already tools for this, to remove extra bytes, u can download it for massive remove extra bytes.

Share this post


Link to post
Share on other sites
You must be a registered member of RF-Dev and logged in to view this content.

You should re-read my post, specifically, steps 2 and 3.

Scrolling to the final value in the final data block confirms the proper final offset of the file. It is implied not to remove any null bytes that exist within the data structure prior to the ending of the last data block (structure).

Share this post


Link to post
Share on other sites
Posted (edited)
You must be a registered member of RF-Dev and logged in to view this content.

I see that ron :D. I only say again. Not all 00.

Sometimes structorian program "DatEditor" generating random extra bytes. Sometimes the program write the struct as extra bytes, sometimes program write random from memory data. 

 

And sometimes some peoples doesnt have a good structure of .strs

Thats why i post how to count it.

Edited by PrinceRay

Share this post


Link to post
Share on other sites
You must be a registered member of RF-Dev and logged in to view this content.

As long as you scroll to the last column in the last data block, you'll always be able to confirm the correct final offset of the file. Find that offset in hex and remove anything after. It doesn't matter how the bytes were initially added or how many additional null bytes exist. Remove them all until the final null bytes in the data block. We're saying the same thing but you're assuming something different.

The way you posted is the "hard" way. For newbies, simply scroll to the last block's final column in Structorian, note the offset, then remove anything after that offset. Structorian will highlight the data block you're working with. Remove everything after the final highlighted hex code when selecting the final column and the DAT will be fixed, easy as that.

I've used this method back in the day with no issues, as long as the structure isn't completely wrong. This will work as long as your structure uses the proper block and column counts.

Not everything has to be so complicated for beginners. :)

Anyway, this is off-topic now. If you're seeing issues after edited DATS with this zone protection, try unmodified DAT files (scripts).

Share this post


Link to post
Share on other sites
Posted (edited)

i just found Modules that have NPC Buff/BuffMe features, i dont know about the credit (from pudn). Maybe someone can implementing into Yorozuya GG, sadly i cant do anything about these files.

You must be a registered member of RF-Dev and logged in to view this content.

Edited by Nuna

Share this post


Link to post
Share on other sites
Posted (edited)

This module maybe..

EN: You must be a registered member of RF-Dev and logged in to view this content.

RU: You must be a registered member of RF-Dev and logged in to view this content.

Edited by Ruuvi

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×