Jump to content
Sign in to follow this  
rilex

HelpInfo Function

Recommended Posts

@rilex Hello. I think...

Example, open fold leiting2 file "ctrl.lua"

We can see function "after_create_entry". She have "Notice..".

I think, if change "Notice" to "HelpInfo" - you can do "HelpInfo dialogue that will show on every person online when a map opens up"

 

Example:

We have:

function after_create_entry(entry) 
    local copy_mgr = GetMapEntryCopyObj(entry, 0)

	local EntryName = " leitin2 "
    SetMapEntryEventName( entry, EntryName )
	
    map_name, posx, posy, tmap_name = GetMapEntryPosInfo(entry)
    Notice("lalala ["..posx..","..posy.."] open portal lalala.") --this string

end

and change to..

Notice(role, 0, "lfllff ["..posx..","..posy.."] open portla lalala.")

BUT i not tested..

Edited by Graf
  • Thanks 1

Share this post


Link to post
Share on other sites
Quote

** Function.lua

function MapOpenWindow(role)
    local NowTime = os.date("%H:%M")
    if CheckPortalChaosArgent() == 1 then
        HelpInfoX(role,0,"Chaos Argent is open! Portal at Icicle_Castle [1368,532]")
    end
end

 

function CheckPortalChaosArgent()
    local NowTime= os.date("%H%M%S")
    local Hour = NowTime + 0
    local OpenTime = {}
    OpenTime[1] = 010000 -- 10:00
    OpenTime[2] = 050000 -- 5:00
    OpenTime[3] = 090000 -- 9:00
    OpenTime[4] = 130000 -- 13:00
    OpenTime[5] = 170000 -- 17:00
    OpenTime[6] = 210000 -- 21:00
    for Time = 1,6 do
        if Hour == OpenTime[Time] then
            return 1
        end
    end
end

** Cha_timer



if IsPlayer(role) == 1 then 

MapOpenWindow(role)

end

 

Edited by 1g0rS1lv4
  • Like 1

Being better than others is for those who are weak; what matters is to be true to yourself.         

 

Share this post


Link to post
Share on other sites

hi tnx for your replies.
but i still cant seems to make it work. do you have any other way to call it. cuz i cant even bring the helpinfo dialogue out

Share this post


Link to post
Share on other sites
On 5/29/2020 at 7:52 AM, rilex said:

hi tnx for your replies.
but i still cant seems to make it work. do you have any other way to call it. cuz i cant even bring the helpinfo dialogue out

Hello @rilex!

Do you can give more information regarding the problem?


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...