The following warnings occurred:
Warning [2] Use of undefined constant SAPI_NAME - assumed 'SAPI_NAME' (this will throw an Error in a future version of PHP) - Line: 3388 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3388 errorHandler->error
/showthread.php 116 build_archive_link
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/inc/functions.php 3324 build_forum_breadcrumb
/showthread.php 195 build_forum_breadcrumb
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/showthread.php 195 build_forum_breadcrumb






Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Removing an npc??
Author Message
Catalan_mistral
Journeyman
*

Posts: 54
Likes Given: 2
Likes Received: 6 in 5 posts
Joined: Jan 2017
Reputation: 0



Post: #1
Removing an npc??
Ok was playing around trying to get defname/id from the morex of a corpse, so I figured create npc grab the info then remove it before it's placed in the world

Code:
[Function Get_ID]
serv.newnpc=<ARGN>
remove
Return <new.ID>

So a nice simple function, but how do I remove the NPC cleanly?

The One and Only......
02-05-2017 10:35 AM
Find all posts by this user Like Post Quote this message in a reply
xwerswoodx
Journeyman
*

Posts: 86
Likes Given: 4
Likes Received: 7 in 4 posts
Joined: Jun 2012
Reputation: 0

UoMMO

Post: #2
RE: Removing an npc??
Code:
[FUNCTION GET_ID]
RETURN <SERV.CHARDEF.<ARGN>.BASEID>
(This post was last modified: 02-05-2017 12:13 PM by xwerswoodx.)
02-05-2017 12:04 PM
Find all posts by this user Like Post Quote this message in a reply
Catalan_mistral
Journeyman
*

Posts: 54
Likes Given: 2
Likes Received: 6 in 5 posts
Joined: Jan 2017
Reputation: 0



Post: #3
RE: Removing an npc??
Thanks xwerswoodx, knew there would be an easier way Smile

The One and Only......
02-05-2017 08:35 PM
Find all posts by this user Like Post Quote this message in a reply
Coruja
Sphere Developer
*****

Posts: 987
Likes Given: 5
Likes Received: 226 in 187 posts
Joined: Jul 2012
Reputation: 7

Dimension Shard

Post: #4
RE: Removing an npc??
you can get the chardef using the numeric ID
Code:
[FUNCTION GetCharID]
return <SERV.CHARDEF.<ARGN>.DISPID>
result: <GetCharID 058>=c_goat

or the numeric ID using chardef
Code:
[FUNCTION GetCharID]
return <hval <DEF0.<ARGS>> &~ 08c000000>
result: <GetCharID c_goat>=058
02-10-2017 01:57 PM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)