RanXerox 
Master
 
Posts: 550
Likes Given: 1
Likes Received: 12 in 9 posts
Joined: Dec 2010
Reputation: 19
![]()
|
RE: Spawn Gems
Here are two functions... the first one REMOVES all the already spawned monsters on whichever map you are standing on when you run it. The second one alters each spawn gem, setting MORE2 (to activate it) and TIMER (to get one of the creatures to spawn.)
Code:
[FUNCTION respawnmap]
//GO 1,1,0,<ARGN1>
FORCHARS <ARGN1> //8000
OBJ=<MEMORYFINDTYPE.memory_ispawned>
IF (<OBJ>)
SRC.SYSMESSAGE @032 Respawning <OBJ.CONT.NAME>
REMOVE
OBJ.TIMER=<EVAL {<OBJ.MOREX> <OBJ.MOREY>}*60>
ENDIF
OBJ=
ENDFOR
[FUNCTION respawnspawner]
//GO 1,1,0,<ARGN1>
FORITEMS <ARGN1> //8000
IF (<TYPE>==t_spawn_char)
SRC.SYSMESSAGE @032 Respawning <NAME>
IF <MORE2>==1
MORE2=0
ENDIF
TIMER=1
ENDIF
ENDFOR
PS: You might want to comment out the SYSMESSAGE lines... it can crash your client if your maps have a lot of creatures/spawners.
|
|
| 04-13-2012 06:26 AM |
|
|