mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-18 08:18:27 +00:00
merge upstream
This commit is contained in:
+75
-20
@@ -153,6 +153,8 @@ int command_init(void) {
|
||||
command_add("version","- Display current version of EQEmu server",0,command_version) ||
|
||||
command_add("setfaction","[faction number] - Sets targeted NPC's faction in the database",170,command_setfaction) ||
|
||||
command_add("wc","[wear slot] [material] - Sends an OP_WearChange for your target",200,command_wc) ||
|
||||
command_add("heromodel", "[hero model] [slot] - Full set of Hero's Forge Armor appearance. If slot is set, sends exact model just to slot.", 200, command_heromodel) ||
|
||||
command_add("hm", "[hero model] [slot] - Full set of Hero's Forge Armor appearance. If slot is set, sends exact model just to slot.)", 200, command_heromodel) ||
|
||||
command_add("setanim","[animnum] - Set target's appearance to animnum",200,command_setanim) ||
|
||||
command_add("connectworldserver","- Make zone attempt to connect to worldserver",200,command_connectworldserver) ||
|
||||
command_add("connectworld",nullptr,0,command_connectworldserver) ||
|
||||
@@ -787,6 +789,47 @@ void command_wc(Client *c, const Seperator *sep)
|
||||
}
|
||||
}
|
||||
|
||||
void command_heromodel(Client *c, const Seperator *sep)
|
||||
{
|
||||
if (sep->argnum < 1)
|
||||
{
|
||||
c->Message(0, "Usage: #heromodel [hero forge model] [ [slot] ] (example: #heromodel 63)");
|
||||
}
|
||||
else if (c->GetTarget() == nullptr)
|
||||
{
|
||||
c->Message(13, "You must have a target to do a wear change for Hero's Forge Models.");
|
||||
}
|
||||
else
|
||||
{
|
||||
uint32 hero_forge_model = atoi(sep->arg[1]);
|
||||
|
||||
if (sep->argnum > 1)
|
||||
{
|
||||
uint8 wearslot = (uint8)atoi(sep->arg[2]);
|
||||
c->GetTarget()->SendTextureWC(wearslot, 0, hero_forge_model, 0, 0, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (hero_forge_model > 0)
|
||||
{
|
||||
// Conversion to simplify the command arguments
|
||||
// Hero's Forge model is actually model * 1000 + texture * 100 + wearslot
|
||||
// Hero's Forge Model slot 7 is actually for Robes, but it still needs to use wearslot 1 in the packet
|
||||
hero_forge_model *= 100;
|
||||
|
||||
for (uint8 wearslot = 0; wearslot < 7; wearslot++)
|
||||
{
|
||||
c->GetTarget()->SendTextureWC(wearslot, 0, (hero_forge_model + wearslot), 0, 0, 0);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
c->Message(13, "Hero's Forge Model must be greater than 0.");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void command_setanim(Client *c, const Seperator *sep)
|
||||
{
|
||||
if (c->GetTarget() && sep->IsNumber(1)) {
|
||||
@@ -5509,18 +5552,20 @@ void command_summonitem(Client *c, const Seperator *sep)
|
||||
|
||||
if (item_status > c->Admin())
|
||||
c->Message(13, "Error: Insufficient status to summon this item.");
|
||||
else if (sep->argnum==2 && sep->IsNumber(2)) {
|
||||
c->SummonItem(itemid, atoi(sep->arg[2]) );
|
||||
} else if (sep->argnum==3) {
|
||||
c->SummonItem(itemid, atoi(sep->arg[2]), atoi(sep->arg[3]) );
|
||||
} else if (sep->argnum==4)
|
||||
c->SummonItem(itemid, atoi(sep->arg[2]), atoi(sep->arg[3]), atoi(sep->arg[4]) );
|
||||
else if (sep->argnum==2 && sep->IsNumber(2))
|
||||
c->SummonItem(itemid, atoi(sep->arg[2]));
|
||||
else if (sep->argnum==3)
|
||||
c->SummonItem(itemid, atoi(sep->arg[2]), atoi(sep->arg[3]));
|
||||
else if (sep->argnum==4)
|
||||
c->SummonItem(itemid, atoi(sep->arg[2]), atoi(sep->arg[3]), atoi(sep->arg[4]));
|
||||
else if (sep->argnum==5)
|
||||
c->SummonItem(itemid, atoi(sep->arg[2]), atoi(sep->arg[3]), atoi(sep->arg[4]), atoi(sep->arg[5]) );
|
||||
c->SummonItem(itemid, atoi(sep->arg[2]), atoi(sep->arg[3]), atoi(sep->arg[4]), atoi(sep->arg[5]));
|
||||
else if (sep->argnum==6)
|
||||
c->SummonItem(itemid, atoi(sep->arg[2]), atoi(sep->arg[3]), atoi(sep->arg[4]), atoi(sep->arg[5]), atoi(sep->arg[6]) );
|
||||
c->SummonItem(itemid, atoi(sep->arg[2]), atoi(sep->arg[3]), atoi(sep->arg[4]), atoi(sep->arg[5]), atoi(sep->arg[6]));
|
||||
else if (sep->argnum==7)
|
||||
c->SummonItem(itemid, atoi(sep->arg[2]), atoi(sep->arg[3]), atoi(sep->arg[4]), atoi(sep->arg[5]), atoi(sep->arg[6]), atoi(sep->arg[7]) );
|
||||
c->SummonItem(itemid, atoi(sep->arg[2]), atoi(sep->arg[3]), atoi(sep->arg[4]), atoi(sep->arg[5]), atoi(sep->arg[6]), atoi(sep->arg[7]));
|
||||
else if (sep->argnum==8)
|
||||
c->SummonItem(itemid, atoi(sep->arg[2]), atoi(sep->arg[3]), atoi(sep->arg[4]), atoi(sep->arg[5]), atoi(sep->arg[6]), atoi(sep->arg[7]), atoi(sep->arg[8]));
|
||||
else {
|
||||
c->SummonItem(itemid);
|
||||
}
|
||||
@@ -5546,18 +5591,20 @@ void command_giveitem(Client *c, const Seperator *sep)
|
||||
|
||||
if (item_status > c->Admin())
|
||||
c->Message(13, "Error: Insufficient status to summon this item.");
|
||||
else if (sep->argnum==2 && sep->IsNumber(2)) {
|
||||
t->SummonItem(itemid, atoi(sep->arg[2]) );
|
||||
} else if (sep->argnum==3) {
|
||||
t->SummonItem(itemid, atoi(sep->arg[2]), atoi(sep->arg[3]) );
|
||||
} else if (sep->argnum==4)
|
||||
t->SummonItem(itemid, atoi(sep->arg[2]), atoi(sep->arg[3]), atoi(sep->arg[4]) );
|
||||
else if (sep->argnum==2 && sep->IsNumber(2))
|
||||
t->SummonItem(itemid, atoi(sep->arg[2]));
|
||||
else if (sep->argnum==3)
|
||||
t->SummonItem(itemid, atoi(sep->arg[2]), atoi(sep->arg[3]));
|
||||
else if (sep->argnum==4)
|
||||
t->SummonItem(itemid, atoi(sep->arg[2]), atoi(sep->arg[3]), atoi(sep->arg[4]));
|
||||
else if (sep->argnum==5)
|
||||
t->SummonItem(itemid, atoi(sep->arg[2]), atoi(sep->arg[3]), atoi(sep->arg[4]), atoi(sep->arg[5]) );
|
||||
t->SummonItem(itemid, atoi(sep->arg[2]), atoi(sep->arg[3]), atoi(sep->arg[4]), atoi(sep->arg[5]));
|
||||
else if (sep->argnum==6)
|
||||
t->SummonItem(itemid, atoi(sep->arg[2]), atoi(sep->arg[3]), atoi(sep->arg[4]), atoi(sep->arg[5]), atoi(sep->arg[6]) );
|
||||
t->SummonItem(itemid, atoi(sep->arg[2]), atoi(sep->arg[3]), atoi(sep->arg[4]), atoi(sep->arg[5]), atoi(sep->arg[6]));
|
||||
else if (sep->argnum==7)
|
||||
t->SummonItem(itemid, atoi(sep->arg[2]), atoi(sep->arg[3]), atoi(sep->arg[4]), atoi(sep->arg[5]), atoi(sep->arg[6]), atoi(sep->arg[7]) );
|
||||
t->SummonItem(itemid, atoi(sep->arg[2]), atoi(sep->arg[3]), atoi(sep->arg[4]), atoi(sep->arg[5]), atoi(sep->arg[6]), atoi(sep->arg[7]));
|
||||
else if (sep->argnum == 7)
|
||||
t->SummonItem(itemid, atoi(sep->arg[2]), atoi(sep->arg[3]), atoi(sep->arg[4]), atoi(sep->arg[5]), atoi(sep->arg[6]), atoi(sep->arg[7]), atoi(sep->arg[8]));
|
||||
else {
|
||||
t->SummonItem(itemid);
|
||||
}
|
||||
@@ -5594,7 +5641,11 @@ void command_itemsearch(Client *c, const Seperator *sep)
|
||||
if (Seperator::IsNumber(search_criteria)) {
|
||||
item = database.GetItem(atoi(search_criteria));
|
||||
if (item)
|
||||
if (c->GetClientVersion() >= EQClientRoF)
|
||||
if (c->GetClientVersion() >= EQClientRoF2)
|
||||
{
|
||||
c->Message(0, " %i: %c%06X00000000000000000000000000000000000000000000000000%s%c", (int)item->ID, 0x12, item->ID, item->Name, 0x12);
|
||||
}
|
||||
else if (c->GetClientVersion() >= EQClientRoF)
|
||||
{
|
||||
c->Message(0, " %i: %c%06X0000000000000000000000000000000000000000000000000%s%c",(int) item->ID,0x12, item->ID, item->Name, 0x12);
|
||||
}
|
||||
@@ -5623,7 +5674,11 @@ void command_itemsearch(Client *c, const Seperator *sep)
|
||||
strupr(sName);
|
||||
pdest = strstr(sName, sCriteria);
|
||||
if (pdest != nullptr) {
|
||||
if (c->GetClientVersion() >= EQClientRoF)
|
||||
if (c->GetClientVersion() >= EQClientRoF2)
|
||||
{
|
||||
c->Message(0, " %i: %c%06X00000000000000000000000000000000000000000000000000%s%c", (int)item->ID, 0x12, item->ID, item->Name, 0x12);
|
||||
}
|
||||
else if (c->GetClientVersion() >= EQClientRoF)
|
||||
{
|
||||
c->Message(0, " %i: %c%06X0000000000000000000000000000000000000000000000000%s%c",(int) item->ID,0x12, item->ID, item->Name, 0x12);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user