Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4141,3 +4141,7 @@ When setting a property like MORE to the a spell or skill defname, trying to rea
19-05-2026, nightNR
- Fixed: pre-AOS armor rating (AR) calculation (#1550).
- Fixed NPCs can't cast spells from spellbook after respawn (#1551).

02-06-2026, Caner
- Added: CV_NUKEITEM command to delete only items in the region.
- Changed: CV_NUKE command now deletes both items and characters instead of just items.
8 changes: 8 additions & 0 deletions src/game/clients/CClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1463,6 +1463,14 @@ bool CClient::r_Verb( CScript & s, CTextConsole * pSrc ) // Execute command from
m_tmTile.m_Code = CV_NUKE; // set nuke code.
addTarget( CLIMODE_TARG_TILE, g_Cfg.GetDefaultMsg( DEFMSG_SELECT_NUKE_AREA ), true );
break;

case CV_NUKEITEM:
m_Targ_Text = s.GetArgRaw();
m_tmTile.m_ptFirst.InitPoint(); // Clear this first
m_tmTile.m_Code = CV_NUKEITEM; // set nuke code.
addTarget( CLIMODE_TARG_TILE, g_Cfg.GetDefaultMsg( DEFMSG_SELECT_NUKE_AREA ), true );
break;

case CV_NUKECHAR:
m_Targ_Text = s.GetArgRaw();
m_tmTile.m_ptFirst.InitPoint(); // Clear this first
Expand Down
60 changes: 59 additions & 1 deletion src/game/clients/CClientTarg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -661,7 +661,65 @@ bool CClient::OnTarg_Tile( CObjBase * pObj, const CPointMap & pt )
}
break;

case CV_NUKE: // NUKE all items in the region.
case CV_NUKE: // NUKE all items and chars in the region.
{
// Items
auto AreaItem = CWorldSearchHolder::GetInstance(ptCtr, iRadius);
AreaItem->SetAllShow(IsPriv(PRIV_ALLSHOW));
AreaItem->SetSearchSquare(true);
for (;;)
{
CItem *pItem = AreaItem->GetItem();
if (pItem == nullptr)
break;
if (!rect.IsInside2d(pItem->GetTopPoint()))
continue;

if (m_Targ_Text.IsEmpty())
{
pItem->Delete();
}
else
{
CScript script(m_Targ_Text);
if (!pItem->r_Verb(script, this))
continue;
}
iCount++;
}

// Chars
auto AreaChar = CWorldSearchHolder::GetInstance(ptCtr, iRadius);
AreaChar->SetAllShow(IsPriv(PRIV_ALLSHOW));
AreaChar->SetSearchSquare(true);
for (;;)
{
CChar *pChar = AreaChar->GetChar();
if (pChar == nullptr)
break;
if (!rect.IsInside2d(pChar->GetTopPoint()))
continue;
if (pChar->m_pPlayer)
continue;

if (m_Targ_Text.IsEmpty())
{
pChar->Delete();
}
else
{
CScript script(m_Targ_Text);
if (!pChar->r_Verb(script, this))
continue;
}
iCount++;
}

SysMessagef("%d %s", iCount, g_Cfg.GetDefaultMsg(DEFMSG_NUKED_ENTITIES));
}
break;

case CV_NUKEITEM: // NUKE all items in the region.
{
auto AreaItem = CWorldSearchHolder::GetInstance( ptCtr, iRadius );
AreaItem->SetAllShow( IsPriv( PRIV_ALLSHOW ));
Expand Down
1 change: 1 addition & 0 deletions src/tables/CClient_functions.tbl
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ ADD(MIDILIST, "MIDILIST")
ADD(NUDGE, "NUDGE")
ADD(NUKE, "NUKE")
ADD(NUKECHAR, "NUKECHAR")
ADD(NUKEITEM, "NUKEITEM")
ADD(OPENPAPERDOLL, "OPENPAPERDOLL")
ADD(OPENTRADEWINDOW,"OPENTRADEWINDOW")
ADD(REMOVEBUFF, "REMOVEBUFF")
Expand Down
1 change: 1 addition & 0 deletions src/tables/defmessages.tbl
Original file line number Diff line number Diff line change
Expand Up @@ -1163,6 +1163,7 @@ MSG(WEB_DESTROY, "You destroy the web")
MSG(WEB_WEAKEN, "You weaken the web")
MSG(NUKED_ITEMS, "Items Nuked!")
MSG(NUKED_CHARS, "Chars Nuked!")
MSG(NUKED_ENTITIES, "Entities Nuked!")
MSG(TILED_ITEMS, "Items Created!")
MSG(NUDGED_OBJECTS, "Objects Nudged!")
MSG(TILE_SAME_POINT, "Thats the same point")
Expand Down
Loading