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
MAP.Z
Author Message
xwerswoodx
Journeyman
*

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

UoMMO

Post: #1
MAP.Z
How can I check items on map where is Z ise 1 or more

For example at house I want to check IF <serv.map(X,Y,20).region.terrain> etc.

Second question, how can I check the items which is on the coordinate, example, at 10,10,0 position I want to check how many items are there and what are their UIDs, Ps, IDs, BASEIDs etc...

And lastly I want to do second question for static without uid (if it is possible)
07-21-2013 01:50 AM
Find all posts by this user Like Post Quote this message in a reply
Rattlehead
Master
**

Posts: 290
Likes Given: 3
Likes Received: 8 in 6 posts
Joined: Jun 2012
Reputation: 8



Post: #2
RE: MAP.Z
well first of all, you wouldnt check the region for Z as regions dont have a Z, they embody the entire Z plane both positive and negative, what you would check for is the items Z, so you should use a foritems and check to see if their Z is raised 1

also with the foritems loop you can reference all their attributes

http://wiki.sphere.torfo.org/index.php/C...7#FORITEMS

as for static objects, im really not sure, tbh im not sure why anyone would need to, maybe share with us what u are trying to do and if i cant give you a solution im sure dark or someone else could

[Image: matts_siggy.gif]
(This post was last modified: 07-21-2013 04:37 AM by Rattlehead.)
07-21-2013 04:36 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: #3
RE: MAP.Z
Firstly yes I didn't find anything about Z.

But I don't want to use foritems, for example on fishing sphere place world gem where is your target and check resource on it. I want something like it because I don't know where is it uid saved or not. I can do samething with this but sometimes I want to use placed object with other fishing poles so I don't want to use foritems and I am not sue whether we use foritems with target or not.

Lastly I want it for teleport. Because teleport can use some wall in the game and they go to roof. I want to check if his target's X,Y,Z has wall fizzle. Hovewer, if I check without Z I can't check the wall because game saw the item which is on X,Y,0.
07-21-2013 06:31 AM
Find all posts by this user Like Post Quote this message in a reply
Gil Amarth
Journeyman
*

Posts: 189
Likes Given: 2
Likes Received: 1 in 1 posts
Joined: May 2012
Reputation: 0



Post: #4
RE: MAP.Z
Recently I had used something similar for my scripts.

With: SERV.MAP(X,Y).STATICS, you can access the statics in one tile of the map.

FOR X 0 <EVAL <SERV.MAP(<REF1.P.X>,<REF1.P.Y>).STATICS> - 1>
LOCAL.HEIGHT = <SERV.MAP(<REF1.P.X>,<REF1.P.Y>).STATICS.<dLOCAL.X>.Z>
SERV.LOG <dLOCAL.HEIGHT>
ENDFOR

You can access in a loop, to every statics at one tile, check the value or type you want, and store the maximum value or anything you want.
07-21-2013 06:40 AM
Find all posts by this user Like Post Quote this message in a reply
Rattlehead
Master
**

Posts: 290
Likes Given: 3
Likes Received: 8 in 6 posts
Joined: Jun 2012
Reputation: 8



Post: #5
RE: MAP.Z
im not sure i understand what u are trying to do tbh

but i thought u were talking about checking the entire map, now i think u are talking about targeting a place on the ground or on an item?

http://wiki.sphere.torfo.org/index.php/@...gOn_Ground
http://wiki.sphere.torfo.org/index.php/@ItemTargOn_Item

must go on an events on ur player, those links tell you how to access P (px, py, and pz)

if i am misunderstanding what you are trying to do please correct me

[Image: matts_siggy.gif]
07-21-2013 06:54 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: #6
RE: MAP.Z
@Gil Amarth
Thanks very much I will try it

@Rattlehead
He understand what I mean but I try to explain. First of all, thank you very much for trying to help. Secondly, I want to fix teleporting from ground to roof. But if I don't check items height I can't control it. He gives it.

And lastly can I check the items on ground, which is created by fishing or mining?

For example when I use fishing pole, world gem bit created on water, and after I use fishing pole it takes information from it. And I want to check it without foritems.
07-21-2013 07:52 AM
Find all posts by this user Like Post Quote this message in a reply
Mordaunt
Super Moderator
****

Posts: 1,237
Likes Given: 26
Likes Received: 55 in 43 posts
Joined: Mar 2012
Reputation: 35



Post: #7
RE: MAP.Z
For fixing teleport from ground to roof...
There shouldn't be any LoS for that so it shouldn't allow it anyway.
If you are having a problem with that I'd perhaps suggest creating an invisible item (coin, gembit) at the location the player clicked and check the Z of that item.

For checking items on the ground...
Are you looking at making your own fishing/mining system?

I'd suggest you go take a look at RanXerox's Lumberjacking which looks to see what is in the location the player has selected to create wood of the correct type. A principal you should easily be able to adapt to fishing/mining.

[Image: 2nis46r.jpg]
07-21-2013 08:52 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Rattlehead
Master
**

Posts: 290
Likes Given: 3
Likes Received: 8 in 6 posts
Joined: Jun 2012
Reputation: 8



Post: #8
RE: MAP.Z
sorry man, im trying to help you, if you specifically want to get info from a gem bit

http://wiki.sphere.torfo.org/index.php/@...ourceFound

unless you were just using the gem bit as an example.

[Image: matts_siggy.gif]
07-21-2013 10:02 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: #9
RE: MAP.Z
(07-21-2013 08:52 AM)Mordaunt Wrote:  For fixing teleport from ground to roof...
There shouldn't be any LoS for that so it shouldn't allow it anyway.
If you are having a problem with that I'd perhaps suggest creating an invisible item (coin, gembit) at the location the player clicked and check the Z of that item.

For checking items on the ground...
Are you looking at making your own fishing/mining system?

I'd suggest you go take a look at RanXerox's Lumberjacking which looks to see what is in the location the player has selected to create wood of the correct type. A principal you should easily be able to adapt to fishing/mining.

(07-21-2013 10:02 AM)Rattlehead Wrote:  sorry man, im trying to help you, if you specifically want to get info from a gem bit

http://wiki.sphere.torfo.org/index.php/@...ourceFound

unless you were just using the gem bit as an example.

Not totally, I know his lumberjacking system but I can do like it. But fishing is only the example, I wanted to learn how they check the world gem bit when he use pole second time or anyone else use fishing pole same position. This is the question, how is know it's more Smile

And I have been using sphere coding since 55i. And I know many things but sometimes I want to do something in easy way. For example I can do new fishing system with or without use regiontype or regionresource but I want to do it more easy, like when I use fishing pole I want to check items at that position.

I am not sure explain clearly, but only I want to know how can I check items on some position without create item. Smile
(This post was last modified: 07-21-2013 02:00 PM by xwerswoodx.)
07-21-2013 02:00 PM
Find all posts by this user Like Post Quote this message in a reply
RanXerox
Master
**

Posts: 550
Likes Given: 1
Likes Received: 12 in 9 posts
Joined: Dec 2010
Reputation: 19



Post: #10
RE: MAP.Z
Z indicates the bottom (or ground position) of an item and Z+HEIGHT indicates the top of that item.

For things like teleport you normally go to the Z position of the item (or static) that was targeted (assuming it is not flagged impassable)... but if that item can be walked on (typically flagged as a surface, stair, or bridge), then it puts you on top of the item.

I suspect there are other flag(s) in the tile data that indicate whether an item can have stuff stacked on top of it.

When stuff is dropped, I think it automatically gets a "fix" (essentially z=z+1) so that it doesn't fall out of sight.
07-22-2013 01:56 AM
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)