Athris Posted October 3, 2016 Report Share Posted October 3, 2016 Hello, i just update my core from a very old 3.2.2 to 3.3.5. Now i miss the npc command .npc setdeathstate on/off. Do you rename the command or whats happen with this command? I need the npc death on/off. Link to comment Share on other sites More sharing options...
CDawg Posted October 3, 2016 Report Share Posted October 3, 2016 I don't remember off top of my head, but I set the flag of the npc in the DB so that they are dead, for cosmetic purposes. - Is this a temporary NPC? Is this for a quest? is the dead NPC designed to be loot-able? As for the command. I honestly don't remember that command. mysql> select name, permission from command where name like "npc%" order by name asc; +-------------------+------------+ | name | permission | +-------------------+------------+ | npc | 570 | | npc add | 571 | | npc add formation | 572 | | npc add item | 573 | | npc add move | 574 | | npc add temp | 575 | | npc delete | 576 | | npc delete item | 577 | | npc evade | 837 | | npc follow | 578 | | npc follow stop | 579 | | npc info | 593 | | npc move | 595 | | npc near | 594 | | npc playemote | 596 | | npc say | 597 | | npc set | 580 | | npc set allowmove | 581 | | npc set data | 592 | | npc set entry | 582 | | npc set factionid | 583 | | npc set flag | 584 | | npc set level | 585 | | npc set link | 586 | | npc set model | 587 | | npc set movetype | 588 | | npc set phase | 589 | | npc set spawndist | 590 | | npc set spawntime | 591 | | npc tame | 601 | | npc textemote | 598 | | npc whisper | 599 | | npc yell | 600 | +-------------------+------------+ Link to comment Share on other sites More sharing options...
Athris Posted October 4, 2016 Author Report Share Posted October 4, 2016 Mhm in 3.2.2 the command exist: npc setdeathstate Syntax: npc setdeathstate on/off Set default death state (dead/alive) for npc at spawn Its possible to set it into the database but for spawn gamemaster its very difficult. In 3.2.2a it was very easy with this command. Link to comment Share on other sites More sharing options...
Athris Posted November 7, 2016 Author Report Share Posted November 7, 2016 Okay i try to create my own set deathstate command but it does not work. Ingame the nsc respawn but still alive... static bool HandleNpcSetDeathStateCommand(ChatHandler* handler, char const* args) { Creature* target = handler->getSelectedCreature(); if (!target) { return false; } if (!*args) { return false; } std::string argStr = strtok((char*)args, " "); if (argStr == "on") { target->setDeathState(DEAD); target->SaveToDB(); target->Respawn(); } if (argStr == "off") { target->setDeathState(ALIVE); target->SaveToDB(); target->Respawn(); return true; } handler->SendSysMessage(LANG_USE_BOL); handler->SetSentErrorMessage(true); return false; } Link to comment Share on other sites More sharing options...
Recommended Posts