Jump to content
  • 0

Everyone equipping Everything bug.


Question

Posted

Hello. Im having some serious issues here.

Every class can equip every equipment on my server, for example:

 

Everyone can wear Binoculars, that is suposed to be used only by Archers and its evolutions;

Lord Knights can equip Bows and Crosbows;

Priests can equip Spears;

 

Can someone please help me with this?

 

Thanks in advance.

7 answers to this question

Recommended Posts

  • 0
Posted
That you've tried your acc gm ?, if so it's only because you have put in groups_ID this configuration
all_equipment: true

Another option is the itemdb. ensures that the field of Database Structure: (job) is correct

sorry for my bad English ://
  • Upvote 1
  • 0
Posted

You are right. My Database Struture is with the same value on all the fields.

How do I change it? I cant change item by item, it will take years... And I must fix it.. Imagine the mess a SinX with Bow+EDP breaking an Emperium can make... :(

 

Thanks for your answer in advance.

  • 0
Posted (edited)

You are right. My Database Struture is with the same value on all the fields.

How do I change it? I cant change item by item, it will take years... And I must fix it.. Imagine the mess a SinX with Bow+EDP breaking an Emperium can make... :(

 

Thanks for your answer in advance.

 

The easiest way is replacing your item_db.txt with the one provided by rAthena devs in github: https://github.com/rathena/rathena

 

However, if you want to manually update only the Job values of your item_db, you can try to convert it to sql and then apply a query to change it with the ones in item_db.txt provided by rAthena.

 

You can use Ai4rei's tool to convert your item_db.txt to sql format: nn.ai4rei.net/dev/eatoys/item-db.htm

 

If you want, I can fix your item_db.txt by merging the Job value from item_db.txt of rAthena to the yours.

Edited by Ragno
  • Upvote 2
  • 0
Posted (edited)

Iam already using the SQL format. But i modified some itens already. So is there no way to reapair this Equipment stuff without importing a new SQL file? Because then I will lose all the changes i made till now...

 

 

 

you can try to convert it to sql and then apply a query to change it with the ones in item_db.txt provided by rAthena.

 

@Ragno Can you be more specific about this? Im kinda new with databases.

Edited by Tywin Lannister
  • 0
Posted (edited)

Sure, here is a few steps using query_sql command in a little script:

 

1. First at all make a backup of your item_db table.

 

2. Create the table "rA_item_db" in your ragnarok Database using the file I'm sending to you, or take the original one from rAthena's github and change all the "item_db" for "rA_item_db", this is to avoid replace your actual item_db with another item_db.

 

rA_item_db.sql

 

To create the table copy the file i'm sending to C:\ and use this command in your sql console:

 

source C:\rA_item_db.sql

 

3. Use the next npc to make all the changes:

prontera,50,50,0	script	equip_jobs	1002,{
	mes "Hi, I will update your job values in item_db.";
	query_sql "SHOW TABLES LIKE 'rA_item_db'",.@tbl$;
	if (.@tbl$ == ""){
		mes "However, you need to create the rA_item_db table to proceed.";
		mes "Please execute the rA_item_db.sql file provided with this script.";
		close;
	}
	mes "Would you like to proceed?";
	if (select("No:Yes") == 1)
		close;
	next;
	mes "Working...";
	query_sql("SELECT id, equip_jobs FROM rA_item_db", .@id, .@equip_jobs);
	freeloop(1);
	for (.@i = 0; .@i < getarraysize(.@id); ++.@i){
		query_sql("UPDATE `item_db` SET `equip_jobs` = " + .@equip_jobs[.@i] + " WHERE `id` = "+.@id[.@i]);
	}
	freeloop(0);
	mes "I have update the item_db values with the ones from rA_item_db table.";
	mes "Hope this was helpful :)";
	close;
}

When this has finished your sql item_db will have all the equip_job values changed to their defaults according to rAthena db.

 

4. When you have finished use this command to erase the rA_item_db table created only for this:

 

drop table rA_item_db;

 

Hope this helps :)

Edited by Ragno
  • Upvote 1
  • 0
Posted (edited)

Well. I will try this when i get home and update this answer.

 

But for now, thank you very much @Ragno

 

 

@pachupappy yea! lets hope it works

 

 

@EDIT

 

It worked. Thank you again, @Ragno!

 

Topic can be closed.

Edited by Tywin Lannister

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...