Jump to content
Sign in to follow this  
Lua

IsInMap function

Recommended Posts

Where you did find the function?

I guess it checks if player is in some map


Share this post


Link to post
Share on other sites
function IsRandInMap( character, npc, rate, mapname, x, y, w, h )
    if rate == nil or mapname == nil or x == nil or y == nil then
        PRINT( "IsRandInMap: parameter error!" )
        SystemNotice( character, "IsRandInMap:Function parameter error!rate, mapname, x, y", rate, mapname, x, y )
        return LUA_ERROR
    end
    if rate > Rand( 100 ) then
        return LUA_FALSE
    end
    return IsInMap( character, mapname, x, y, w, h )
end

 

Seems like its checking if the player is real, exists, and has a location, character, and in a map O.o

Idk if it has a use, but that's my best guess!

Edited by Jones

Share this post


Link to post
Share on other sites
В 07.04.2016в19:02, Jones сказал:

another question that comes up..

what is : 

LUA_TRUE
LUA_FALSE
?

LUA_TRUE = 1 (boolean true)

LUA_FALSE = 0 (boolean false)

 


Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...