Jump to content
  • 0

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


pojiejapan

Question


  • Group:  Members
  • Topic Count:  37
  • Topics Per Day:  0.01
  • Content Count:  126
  • Reputation:   6
  • Joined:  11/18/11
  • Last Seen:  

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;
}

Link to comment
Share on other sites

11 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  75
  • Topics Per Day:  0.02
  • Content Count:  2223
  • Reputation:   593
  • Joined:  10/26/11
  • Last Seen:  

rAthena already supports this feature! /no1

since r15489, 3 weeks ago.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  26
  • Reputation:   0
  • Joined:  11/19/11
  • Last Seen:  

rAthena already supports this feature! /no1

since r15489, 3 weeks ago.

is this working in 3ceam too? /ok

Edited by Tempo
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  69
  • Topics Per Day:  0.02
  • Content Count:  1315
  • Reputation:   372
  • Joined:  12/10/11
  • Last Seen:  

Copy the changes over to 3ceam source code, compile, then find out.

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  37
  • Topics Per Day:  0.01
  • Content Count:  126
  • Reputation:   6
  • Joined:  11/18/11
  • Last Seen:  

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

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

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

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  737
  • Reputation:   216
  • Joined:  11/29/11
  • Last Seen:  

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

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  12
  • Topics Per Day:  0.00
  • Content Count:  81
  • Reputation:   5
  • Joined:  11/19/11
  • Last Seen:  

@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

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  37
  • Topics Per Day:  0.01
  • Content Count:  126
  • Reputation:   6
  • Joined:  11/18/11
  • Last Seen:  

Thanks you guys. Fixed it already. The src is compatible with 3CeaM

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  318
  • Topics Per Day:  0.07
  • Content Count:  925
  • Reputation:   32
  • Joined:  12/05/11
  • Last Seen:  

got diff files?

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

got diff files?

The download link is below the content...

just read the page and you will found it..

Unified Diff

Zip Archieve

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  17
  • Reputation:   0
  • Joined:  01/28/12
  • Last Seen:  

it's working on 3ceam! Nice! Thank you!

Link to comment
Share on other sites

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