Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Sets @Players for in-room PCs/Mobs
- #VAR Players %gmcp.room.players
- //Makes @MOB_TARGETS a DB Var for Mobs in Room
- #IF %vartype("MOB_TARGETS")=%null
- {#VAR MOB_TARGETS %null %null {GMCP|ROOM}
- #CALL %vartype("MOB_TARGETS",5)}
- {//Elseif MOB_TARGETS %vartype NOT %null
- MOB_TARGETS=%null
- }
- #IF %vartype("PC_TARGETS")=%null
- {#VAR PC_TARGETS %null {GMCP|ROOM}
- #CALL %vartype("PC_TARGETS",5)}
- {//ElseIf Pc_Targets %vartype NOT %null
- PC_TARGETS=%null
- }
- //Looks for VNUMS (Mobs) with loop. Puts mobs in @MobTargets
- #CLASS MOBS
- #LOOPDB @Players {
- #IF %isnumber(%key) {#ADDKEY Mob_Targets %key %val
- //
- // Area Name as DB variable for MOB# Logging..
- // Gets Zone name from GMCP and replaces spaces with underscores:
- // %replace(%copy(@info.zone,18)," ","_")
- //
- $area_name=%replace(%replace(%copy(@info.zone,18)," ","_"),"'","")
- #IF %vartype(%string(%replace(%replace(%copy(@info.zone,18)," ","_"),"'","")))=%null {
- //#ECHO DEBUG -- Creating $area_name DB
- #VAR %replace(%replace(%copy(@info.zone,18)," ","_"),"'","") %null
- #CALL %vartype(%replace(%replace(%copy(@info.zone,18)," ","_"),"'",""),5)}
- //
- //Check if %key is already in DB?
- //
- //ADDS Mob to Areaname as DB
- #IF %iskey(@%string($area_name),%key) {}
- #ADDKEY %replace(%replace(%copy(@info.zone,18)," ","_"),"'","") %key %string(%val)
- }
- {#ADDKEY Pc_Targets %key %val}
- }
- #CLASS 0
- //BUG FIX! -- Loops to remove cache of room.players to maintain @Players for LIVE tracking (Fix)
- #LOOPDB %gmcp.Room.Players {#DELKEY %gmcp.Room.Players %key}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement