Jump to content
  • 0

@alootid autoloots multiple items


Question

Posted

Can someone help me regarding @alootid? I want a @alootid command that autoloots multiple items
Example @alootid 607 608 609 ( 3 Specific Autoloots ) emulator 3ceam.

4 answers to this question

Recommended Posts

Posted

Can someone help me regarding @alootid? I want a @alootid command that autoloots multiple items

Example @alootid 607 608 609 ( 3 Specific Autoloots ) emulator 3ceam.

 

open your /doc/atcommands.txt

@alootid <+/- item name/ID>
@alootid reset

Starts or stops autolooting a specified item.
Typing "reset" will clear the autoloot item list.
By default, 10 items can be autolooted at one time.

the emulator already supports that in the latest rev/git

Posted (edited)

@Stolao Here's mine


/*==========================================
 * @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;
}
Edited by Emistry
codebox
Posted (edited)

 

Can someone help me regarding @alootid? I want a @alootid command that autoloots multiple items

Example @alootid 607 608 609 ( 3 Specific Autoloots ) emulator 3ceam.

 

open your /doc/atcommands.txt

@alootid <+/- item name/ID>
@alootid reset

Starts or stops autolooting a specified item.
Typing "reset" will clear the autoloot item list.
By default, 10 items can be autolooted at one time.

the emulator already supports that in the latest rev/git

 

 

 

Here's mine

 

@Stolao Here's mine


/*==========================================
 * @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;
}
Edited by Emistry
codebox

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