HomePortalFAQSearchMemberlistUsergroupsRegisterLog in
Meet the new KITO admins & hear their plans here.
You can use google search to find threads and posts here now. Example

Share | 
 

 prevent 'go home' command

View previous topic View next topic Go down 
AuthorMessage
Hamilton

avatar

Game username : Hamilton
Server : Myatar Legends // Dragon's Den
Female Posts : 380
Join date : 2011-10-20
Age : 31
Location : everywhere

PostSubject: prevent 'go home' command   Wed Oct 05, 2016 8:04 pm

I'd like to set a couple maps to prevent players from using the "go home" function.

That's it.

That's all there is to it. Just...if player is in map "X" or map "Y", disable the "go home" command. (maybe a lil chat message like "you cannot go home right now" lol)

Can someone help me with this?

I can pay, if needed. I've got a few bucks left anyways. Or DA points...if absolutely necessary <.<;. Or trade...you like trade? I do for you trade. critter animations, yeah? Wink



EDIT

For anyone else attempting this 'feature' (lol), I've gotten it working and now you can too.


Find this line stuff

Quote :
//Same map & channel
if(tMap == mWorld->getWorldName() && tDimension == mGameStateManager->getDimension())

Add this above it

Quote :
if (mWorld->getWorldName() == "Map Name Here")
{
getMagixGUI()->getAlertBox()->showAlert("You cannot go home yet.",0.5,0.5,3);
}

Then, change this

Quote :
if(tMap == mWorld->getWorldName() && tDimension == mGameStateManager->getDimension())

Into this

Quote :
else if(tMap == mWorld->getWorldName() && tDimension == mGameStateManager->getDimension())


Players attempting to use the home button OR the /gohome command while in the map of your choice, will trigger an alert box instead of the usual teleportation. Make sure to have a portal handy for them unless you are using the map for punishment Wink


Last edited by Hamilton on Wed Oct 12, 2016 5:08 pm; edited 1 time in total (Reason for editing : solved and showing my work lol)
Back to top Go down
Hyper
Admin
avatar

Game username : Hyper
Server : Azoptaos
Male Posts : 489
Join date : 2014-02-09
Age : 19

PostSubject: Re: prevent 'go home' command   Wed Oct 05, 2016 9:56 pm

do you want the button gone completely or just have it not work?

you can hide the button in gui, if you attach world manager you can map restrict it

i could do it for you for a couple bucks but it should be fairly simple

________________________________
Back to top Go down
http://azoptaos.boards.net/
Hamilton

avatar

Game username : Hamilton
Server : Myatar Legends // Dragon's Den
Female Posts : 380
Join date : 2011-10-20
Age : 31
Location : everywhere

PostSubject: Re: prevent 'go home' command   Wed Oct 05, 2016 11:56 pm

Hiding the button is a good idea. But it'd still allow players to use the chat command '/gohome', wouldn't it?
Back to top Go down
Hyper
Admin
avatar

Game username : Hyper
Server : Azoptaos
Male Posts : 489
Join date : 2014-02-09
Age : 19

PostSubject: Re: prevent 'go home' command   Wed Oct 05, 2016 11:57 pm

forgot that existed. could probably put something in the actual function it executes that says if its x map tell the user they cant do that

________________________________
Back to top Go down
http://azoptaos.boards.net/
Hamilton

avatar

Game username : Hamilton
Server : Myatar Legends // Dragon's Den
Female Posts : 380
Join date : 2011-10-20
Age : 31
Location : everywhere

PostSubject: Re: prevent 'go home' command   Wed Oct 12, 2016 5:10 pm

Sorry for seemingly abandoning this thread. lol I got...frustrated X3

Anyways, I've figured it out and this is solved now. I edited my initial post so that anyone else looking for this feature can find it/use it.
Back to top Go down
Sponsored content




PostSubject: Re: prevent 'go home' command   

Back to top Go down
 
prevent 'go home' command
View previous topic View next topic Back to top 
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
Keeping I.T. Open :: DOWNLOADABLE CONTENT :: Programming Features-
Jump to: