Jump to content
  • 0

Help to edit random option item drop by mob


Litro Endemic

Question


  • Group:  Members
  • Topic Count:  25
  • Topics Per Day:  0.01
  • Content Count:  283
  • Reputation:   79
  • Joined:  06/13/13
  • Last Seen:  

i want to have all equipment drop by mob have random item, as of now it need to be listed by id

and I want it to categorized by equip location, i have trying to make it my self by editing mob_readdb_drop multiple time and it failed and the last try give me Segmentation fault

well here my edited code, well i have no knowledge i'm just trying to make it by my self to learn but it always fail

static bool mob_readdb_drop(char* str[], int columns, int current) {
	unsigned short i;

	for (i = 0; i <= MAX_MOB_DB; i++) {
		int j, size;
		struct mob_db *mob;
		struct s_mob_drop *drop;
		struct item_data *id;
	
		if ((mob = mob_db(i)) == mob_dummy) {
			continue;
		}
	
		drop = mob->dropitem;
		size = ARRAYLENGTH(mob->dropitem);
		
		for (j = 0; j < size; j++) {
			switch(id->equip) {
				case EQP_ARMOR:    drop[j].randomopt_group = RDMOPTG_Armor; break;
				//case EQP_HAND_L:   drop[i].randomopt_group = RDMOPTG_None;
				//case EQP_HAND_R:   drop[i].randomopt_group = RDMOPTG_None;
				//case EQP_GARMENT:  db->dropitem[i].randomopt_group = RDMOPTG_None;
				case EQP_SHOES:    drop[j].randomopt_group = RDMOPTG_Shoes; break;
				//case EQP_ACC_L:    db->dropitem[i].randomopt_group = RDMOPTG_None;
				//case EQP_ACC_R:    db->dropitem[i].randomopt_group = RDMOPTG_Acc;
			}
		}
	}

	return true;
}

please help me...

Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

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.

×
×
  • Create New...