Make sure this line:
Code: Select all
else /if n $searchspawn(@corpseName)==0
Looks like this instead: (Always surround the name in $searchspawn with quotes)
Code: Select all
else /if n $searchspawn("@corpseName")==0
You can do alot of things with $searchspawn to limit your searches as well. For instance you could $searchspawn(corpse,"Mob Name Whatever") and it should only return corpse id's of mobs with a similar name to the one you are looking for.
To display actual names of mobs via the ID that gets returned from $searchspawn just do this (Where id# is the number that is returned from $searchspawn):
$spawn(id#,name) (This leaves on the _00 etc on the end of names)
$spawn(id#,name,clean) (This is the name as you see it above a mobs head)