Jump to content
  • 0

Multiple alootid Mod


Question

Posted (edited)

Is there anyone shares an multiple alootid Mod compatible with RAthena latest versions?, cuz I try the past version Just for eathena and it causes some errors on my src/map when I compile..

Version : alootid_array_r14697.diff
Original Topic : http://www.eathena.ws/board/lofiversion/index.php/t246490.html

Thanks in advance..

Edited by Mjoo13

14 answers to this question

Recommended Posts

Posted

Only bump once per 24 hours.

From Tozorman : http://board.frathen...?showtopic=2796

poporing.gif

pc.h

Search -----------------------------------

CODE

unsigned short autolootid; // [Zephyrus]

--------------------------------------------

Replace-----------------------------------

unsigned short autolootid[10]; // [Zephyrus]

--------------------------------------------

atcommand.c

Search -----------------------------------

{ "alootid", 10,10, atcommand_autolootitem },

--------------------------------------------

Add after -------------------------

{ "alootids", 10,10, atcommand_autolootitems },

--------------------------------------------

Search -----------------------------------

@autolootitem

--------------------------------------------

Modify -----------------------------------

The 3 'sd->state.autolootid' to 'sd->state.autolootid[0]' in the function @autolootitem

--------------------------------------------

Add under -------------------------

/*==========================================
* @autolootitems
*------------------------------------------*/
int atcommand_autolootitems(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
struct item_data *item_data[10];
char chaine[200];
const char *pointeur;
char *separateur = { " " };
int i,k=0;

if (!message || !*message) {
if (sd->state.autolootid[0]) {
for(i=0;i<10;i++)
sd->state.autolootid[i] = 0;
clif_displaymessage(fd, "Autolootitem have been turned OFF.");
} else
clif_displaymessage(fd, "usage: @autolootitem <ID> x 10.");

return -1;
}

for(i=0;i<200;i++)
if(message[i] != '0')
chaine[i] = message[i];

for(i=0;i<10;i++)
item_data[i] = NULL;

pointeur = strtok( chaine, separateur );
item_data[k++] = itemdb_exists(atoi(pointeur));

while( pointeur != NULL )
{
if(k == 10)
break;
pointeur = strtok( NULL, separateur );
if ( pointeur != NULL )
item_data[k++] = itemdb_exists(atoi(pointeur));
}

for(i=0;i<k;i++)
{
if (!item_data[i]) {
// No items founds in the DB with Id or Name
clif_displaymessage(fd, "Item not found.");
return -1;
}
}

for(i=0;i<k;i++)
{
sd->state.autolootid[i] = item_data[i]->nameid; // Autoloot Activated

sprintf(atcmd_output, "Autolooting Item: '%s'/'%s' {%d}",
item_data[i]->name, item_data[i]->jname, item_data[i]->nameid);
clif_displaymessage(fd, atcmd_output);
}

return 0;
}

mob.c

Search -----------------------------------

&& (drop_rate <= sd->state.autoloot || ditem->item_data.nameid == sd->state.autolootid)

--------------------------------------------

Replace ----------------------------------

&& (drop_rate <= sd->state.autoloot
|| ditem->item_data.nameid == sd->state.autolootid[0]
|| ditem->item_data.nameid == sd->state.autolootid[1]
|| ditem->item_data.nameid == sd->state.autolootid[2]
|| ditem->item_data.nameid == sd->state.autolootid[3]
|| ditem->item_data.nameid == sd->state.autolootid[4]
|| ditem->item_data.nameid == sd->state.autolootid[5]
|| ditem->item_data.nameid == sd->state.autolootid[6]
|| ditem->item_data.nameid == sd->state.autolootid[7]
|| ditem->item_data.nameid == sd->state.autolootid[8]
|| ditem->item_data.nameid == sd->state.autolootid[9])

Posted (edited)
The dev team are actually looking at adding one to the SVN.

this is great !!! xD

hope fully it will come with a tiny configuration setting..xD

#define MaxSlot  ?? 

so that users can define how many slot for their alootid easily ?

( coz i failed to apply diff and suck in SRC Damn.. )

Edited by Emistry
Posted (edited)

Only bump once per 24 hours.

Sorry if I was on a Rush !!, won't happen again..

BTW thanks for the share, i'll test it on my test server, if it does have errors I will let you know..

The dev team are actually looking at adding one to the SVN. Stay tuned.

That would be cool :D More power to you guys : )

{ "alootid", 10,10, atcommand_autolootitem }, <---- Can't find this one at my atcommand.c

Edited by Angry Mjoo
Posted (edited)

what are you bump for ? ==''

At my recent Spoiler above my Bump ~~

{ "alootid", 10,10, atcommand_autolootitem }, <---- Can't find this one at my atcommand.c

Edited by Angry Mjoo
Posted

Yeah same here.. well it seems that Aerie is not more often active here.. we'll still be waiting.. and I've seen Brian did process already this multiple looting.. it would be released soon..

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...