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
Enhanced .info for statics and map
Author Message
wuffel
Apprentice
*

Posts: 28
Likes Given: 0
Likes Received: 4 in 2 posts
Joined: Mar 2012
Reputation: 1



Post: #1
Enhanced .info for statics and map
Hi.
It was always a bit annoying to get the color of a static item. The Info-command delivers a few informations about map and statics, even there is the possibilty to get the color of a static item. It will deliver to much informations when two identical Statics (same ID and Z-Level) are on the same spot.
Code:
[function f_oncommand]
if !strcmpi(info,<strarg <args>>)
    f_info
    return 1
endif

[function f_info]
if <findid.i_info_target>
    findid.i_info_target.remove
    sysmessage @04ea Old target-cursor removed, try again.
    return 1
endif
serv.newitem i_info_target
new.timer -1
equip <new>

[itemdef i_info_target]
ID=i_memory
name=Targettile for Info
TYPE=t_eq_script
layer=30

on=@equip
targetg @04ea Get the Target.

on=@TargOn_Ground
local.amount = <serv.map(<src.targp.x>,<src.targp.y>).statics>
if !<local.amount>
    src.sysmessage [No static tile], Terrain=<serv.map(<src.targp.x>,<src.targp.y>).terrain>, Z=<serv.map(<src.targp.x>,<src.targp.y>).terrain.z>, TYPE=<serv.map(<src.targp.x>,<src.targp.y>).type>
    remove
    return 1
endif
for x 0 <local.amount>
    if (<serv.map(<src.targp.x>,<src.targp.y>).statics.<local.x>.z> == <src.targp.z>) && (<argn1> == <serv.map(<src.targp.x>,<src.targp.y>).statics.<local.x>.id>)
        src.sysmessage [Statics at Z=<src.targp.z>:
        src.sysmessage <hval <argn1>>=<serv.itemdef.<argn1>.defname>-><serv.itemdef.<argn1>.type>-><serv.map(<src.targp.x>,<src.targp.y>).statics.<local.x>.color>]
        src.sysmessage Terrain=<serv.map(<src.targp.x>,<src.targp.y>).terrain>, Z=<serv.map(<src.targp.x>,<src.targp.y>).terrain.z>, TYPE=<serv.map(<src.targp.x>,<src.targp.y>).type>
    endif
endfor
remove
return 1

on=@TargOn_Item
src.act=<argo.uid>
src.info
src.last
remove
return 1

on=@TargOn_Char
src.act=<argo.uid>
src.info
src.last
remove
return 1

on=@TargOn_Cancel
remove
return 1
(This post was last modified: 04-08-2014 09:15 AM by wuffel.)
04-04-2014 02:07 AM
Find all posts by this user Like Post Quote this message in a reply
[+] 2 users Like wuffel's post
amonvangrell
Banned

Posts: 337
Likes Given: 17
Likes Received: 32 in 20 posts
Joined: Aug 2012

britannia shard

Post: #2
RE: Enhanced .info for statics and map
thanks!
05-07-2014 11:11 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


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