Jump to content
  • 0

@alootid,@alooitd1,@alootid2, ...


Question

Posted

Hello can I request a command @alootid but a player can autoloot 3 different item at once. ?

this is the basic alootid, what i must do?

/*==========================================
* @alootid
*------------------------------------------*/
ACMD_FUNC(autolootitem)
{
struct item_data *item_data = NULL;
if (!message || !*message) {
 if (sd->state.autolootid) {
  sd->state.autolootid = 0;
  clif_displaymessage(fd, "Autolootitem has been turned OFF.");
 } else
  clif_displaymessage(fd, "Please, enter item name or it's ID (usage: @alootid <item_name_or_ID>).");
 return -1;
}
if ((item_data = itemdb_exists(atoi(message))) == NULL)
 item_data = itemdb_searchname(message);
if (!item_data) {
 // No items founds in the DB with Id or Name
 clif_displaymessage(fd, "Item not found.");
 return -1;
}
sd->state.autolootid = item_data->nameid; // Autoloot Activated
sprintf(atcmd_output, "Autolooting item: '%s'/'%s' (%d)",
 item_data->name, item_data->jname, item_data->nameid);
clif_displaymessage(fd, atcmd_output);
return 0;
}

11 answers to this question

Recommended Posts

Posted

-Wno-pointer-sign -Wno-switch -DHAVE_SETRLIMIT -Wno-unused -Wno-parentheses -DPCRE_SUPPORT  -I/usr/include/mysql  -I../common -I/usr/include -c -o obj_sql/atcommand.o atcommand.c
atcommand.c: In function âatcommand_autolootitemâ:
atcommand.c:6342: error: âAUTOLOOTITEM_SIZEâ undeclared (first use in this function)
atcommand.c:6342: error: (Each undeclared identifier is reported only once
atcommand.c:6342: error: for each function it appears in.)
atcommand.c:6342: error: subscripted value is neither array nor pointer
atcommand.c:6347: error: subscripted value is neither array nor pointer
atcommand.c:6352: error: subscripted value is neither array nor pointer
atcommand.c:6357: error: subscripted value is neither array nor pointer
atcommand.c:6362: error: subscripted value is neither array nor pointer
atcommand.c:6371: error: subscripted value is neither array nor pointer
atcommand.c:6378: error: subscripted value is neither array nor pointer
atcommand.c:6380: error: subscripted value is neither array nor pointer
atcommand.c:6381: error: subscripted value is neither array nor pointer
atcommand.c:6390: warning: passing argument 1 of âmemsetâ makes pointer from integer without a cast
make[1]: *** [obj_sql/atcommand.o] Error 1
make[1]: Leaving directory `/home/dota4090/3CeaM/src/map'
make: *** [map_sql] Error 2

I've delete and copy the script but I got this error when compiling. Can anyone help me?

Posted

perhaps you have missed some part of the script ....

if you dunno to diff manually..then download it and patch it using TortoiseSVN

@tempo

i have tested it with 3Ceam.. it work perfectly fine with me...

Posted

You didn't use the while patch if you have those error.

âAUTOLOOTITEM_SIZEâ undeclared -> define is in pc.h

subscripted value is neither array nor pointer -> I guess it cry because autolootid ain't an array yet. also setup in pc.h

Posted

@pojiejapan

speficy which version of which svn you use ? rAthena's ? eAthena's ? 3CeAM's ?

then we or i could try to re-arrage the additional source code for Multiple Autoloot from Skullcandy / Rad snippets.

@alootid <itemid> [<slot>]

itemid – obviously the item’s ID

slot – specifies which slot will the item id be stored (optional)

*if no slot is specified, it will be slot 1 by default

*there are 5 slots

e.g.

@alootid 607 //autoloots ygg, stored it in slot 1

@alootid 501 3 //autoloots red potion, stored in slot 3

by the way the changes consist of 4 files i think :

  • /src/map/atcommand.c
  • /src/map/mob.h
  • /src/map/mob.h
  • src/map/pc.h

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