|
|
|
 |
 |
 |
 |
|
 |
 |
|
 |
 |
|
 |
|
| Development::Feature Requests Post suggestions/feature requests here. |

11-02-2007, 05:51 PM
|
|
Discordant
|
|
Join Date: Aug 2006
Posts: 394
|
|
Ok this:
Code:
command_add("showdrops"," Usage #showdrops [itemID]", 100, command_showdrops)
...needs to be this...
Code:
command_add("showdrops"," Usage #showdrops [itemID]", 100, command_showdrops) ||
__________________
--
Keelyeh
Owner, ServerOp and Developer
Jest 4 Server
Linux (Jest3 runs on Fedora, our Dev servers usually run on Ubuntu and/or Gentoo), OC-12 Connection = Hella Fast
|

11-02-2007, 06:37 PM
|
|
Discordant
|
|
Join Date: Aug 2006
Posts: 394
|
|
It's also showing the loot table name instead of the NPC name for some reason.
Please see screenshot:

__________________
--
Keelyeh
Owner, ServerOp and Developer
Jest 4 Server
Linux (Jest3 runs on Fedora, our Dev servers usually run on Ubuntu and/or Gentoo), OC-12 Connection = Hella Fast
|
 |
|
 |

11-02-2007, 09:31 PM
|
|
Discordant
|
|
Join Date: Jun 2003
Posts: 345
|
|
If you want to see the name of the NPC showed instead of the name of the Lootable, then change the 2.3 of my previous answer to:
2.3/At the end of the file (command.cpp), add the function's code
Code:
void command_showdrops(Client *c, const Seperator *sep)
{
if(sep->arg[1][0] == '\0'){
c->Message(10, "Bad argument, usage #showdrops [itemID].");
return;
}
int itemID = atoi(sep->arg[1]);
char errbuf[MYSQL_ERRMSG_SIZE];
char *query = 0;
MYSQL_RES *result_lootdrop_id;
MYSQL_RES *result_lootdtable_id;
MYSQL_RES *result_npc_name;
MYSQL_ROW row_lootdrop;
MYSQL_ROW row_loottable;
MYSQL_ROW row_npc_name;
int npc_numbers=0;
c->Message(0,"Item %i drops:", itemID);
if (database.RunQuery(query, MakeAnyLenString(&query, "SELECT lootdrop_id from lootdrop_entries where item_id=%i",itemID), errbuf, &result_lootdrop_id))
{
while ((row_lootdrop = mysql_fetch_row(result_lootdrop_id)))
{
if (database.RunQuery(query, MakeAnyLenString(&query, "SELECT loottable_id from loottable_entries where lootdrop_id=%i",atoi(row_lootdrop[0])), errbuf, &result_lootdtable_id))
{
while ((row_loottable = mysql_fetch_row(result_lootdtable_id)))
{
if (database.RunQuery(query, MakeAnyLenString(&query, "SELECT name from npc_types where loottable_id=%i",atoi(row_loottable[0])), errbuf, &result_npc_name))
{
while ((row_npc_name = mysql_fetch_row(result_npc_name)))
{
c->Message(0, "NPC- %s -- Loottable: %i",row_npc_name[0],atoi(row_loottable[0]));
npc_numbers++;
}
}
}
}
}
}
if(npc_numbers == 0)
c->Message(0,"0 NPC found. 0 Loottable found.");
else
c->Message(0,"%i NPC(s) found.",npc_numbers);
}
Mag
|
 |
|
 |

11-02-2007, 09:44 PM
|
|
Discordant
|
|
Join Date: Aug 2006
Posts: 394
|
|
Thank you very much!!
This is perfect
No clue how I could ever live without this now. I hope it makes it into the tree.
__________________
--
Keelyeh
Owner, ServerOp and Developer
Jest 4 Server
Linux (Jest3 runs on Fedora, our Dev servers usually run on Ubuntu and/or Gentoo), OC-12 Connection = Hella Fast
|

11-17-2007, 12:54 AM
|
|
Discordant
|
|
Join Date: Aug 2006
Posts: 394
|
|
Been using this for two weeks now, it's incredible, still  SO useful.
Please, someone, stick it in the tree hehe.
Just set the command for 200+ status or whatever.
__________________
--
Keelyeh
Owner, ServerOp and Developer
Jest 4 Server
Linux (Jest3 runs on Fedora, our Dev servers usually run on Ubuntu and/or Gentoo), OC-12 Connection = Hella Fast
|
| Thread Tools |
|
|
| Display Modes |
Hybrid Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -4. The time now is 04:35 AM.
|
|
 |
|
 |
|
|
|
 |
|
 |
|
 |