Lumberjacking and mining

Get Help on scripting in POL with configurations, config setups, script trouble shooting, etc.
Post Reply
phao
Grandmaster Poster
Posts: 129
Joined: Fri Aug 31, 2007 2:25 pm

Lumberjacking and mining

Post by phao »

How are those two skills implemented?

I'm interested to know how you guys recognize the player is clicking in a mining floor and the player is clicking on tree?

Do you use target() and check if the graphic of the target is one of a tree, or the object type?

Do you use regions for mining, or also graphic/object type of the target?

That requires a big list of graphics/object types to check, if that's the case... is there any already done?

Is there anything on CORE that does part of this process of checking?
kevin
POL Developer
Posts: 53
Joined: Wed Sep 29, 2010 3:47 pm

Re: Lumberjacking and mining

Post by kevin »

phao wrote:Do you use target() and check if the graphic of the target is one of a tree, or the object type?
Use TargetCoordinates(), then check the resulting value's objtype. You can't Target() a maptile, you will get "What you selected does not seem to exist."

phao wrote:That requires a big list of graphics/object types to check, if that's the case... is there any already done?
Yes, look at include file :mining:mining's IsMinable() function in distro scripts 097.

phao wrote:Is there anything on CORE that does part of this process of checking?
It is not handled by the core.
Post Reply