eKoh Posted July 20, 2014 Group: Members Topic Count: 46 Topics Per Day: 0.01 Content Count: 206 Reputation: 13 Joined: 01/07/12 Last Seen: July 12, 2020 Share Posted July 20, 2014 Is it possible to make that?? Quote Link to comment Share on other sites More sharing options...
Pneuma Posted July 20, 2014 Group: Members Topic Count: 82 Topics Per Day: 0.02 Content Count: 846 Reputation: 138 Joined: 02/26/14 Last Seen: March 7, 2018 Share Posted July 20, 2014 Is it possible to make that?? set .map$, mapname; getmapxy(@map$, @xb, @yb, 0 ); if (@map$ != .map$) { dispbottom "You have left "+.map$+"."; end; } Set the set .map$ higher up in the script to the map that you want to check for Quote Link to comment Share on other sites More sharing options...
eKoh Posted July 20, 2014 Group: Members Topic Count: 46 Topics Per Day: 0.01 Content Count: 206 Reputation: 13 Joined: 01/07/12 Last Seen: July 12, 2020 Author Share Posted July 20, 2014 (edited) Hello man, I am only able to run the script if I use OnPCLoadMapEvent, otherwise it doesn't show. Also the script_command.txt says this: OnPCLoadMapEvent:This special label will trigger once a player steps in a map marked with the'loadevent' mapflag and attach its RID. The fact that this label requires amapflag for it to work is because, otherwise, it'd be server-wide and triggerevery time a player would change maps. Imagine the server load with 1,000 players(oh the pain...) I don't know what does this mean, will the server go extremely slow? P.S. I have a dought Why use .map$ instead of @map$, what is the difference? one is temporary and another npc variable, but whatt?? I don't understand . Btw, this is the script that I am testing: prontera mapflag loadevent morocc mapflag loadevent - script Test -1,{ OnPCLoadMapEvent: set .map$,"prontera"; getmapxy(@map$, @xb, @yb, 0 ); if (@map$ != .map$) { dispbottom "You have left "+.map$+"."; mes "Hello "+.map$+"."; close; } end; } Edited July 20, 2014 by eKoh Quote Link to comment Share on other sites More sharing options...
Pneuma Posted July 20, 2014 Group: Members Topic Count: 82 Topics Per Day: 0.02 Content Count: 846 Reputation: 138 Joined: 02/26/14 Last Seen: March 7, 2018 Share Posted July 20, 2014 Hello man, I am only able to run the script if I use OnPCLoadMapEvent, otherwise it doesn't show. Also the script_command.txt says this: I don't know what does this mean, will the server go extremely slow? P.S. I have a dought Why use .map$ instead of @map$, what is the difference? one is temporary and another npc variable, but whatt?? I don't understand . .map$ is what is being compared to @map$. set .map$, mapname; ^Sets .map$ to the map you are checking that they are in getmapxy(@map$, @xb, @yb, 0 ); if (@map$ != .map$) { dispbottom "You have left "+.map$+"."; end; } ^Gets their current map which is @map$ and then compares to see if it is different than .map$; If it is, it displays the message. Quote Link to comment Share on other sites More sharing options...
eKoh Posted July 20, 2014 Group: Members Topic Count: 46 Topics Per Day: 0.01 Content Count: 206 Reputation: 13 Joined: 01/07/12 Last Seen: July 12, 2020 Author Share Posted July 20, 2014 But it doesn't work, I have already setted .map$ to prontera set .map$,"prontera"; I leave prontera and I don't get any message... The only way to make it work, was using OnPCLoadMapEvent... That's why my question about the "loadevent" mapflag, if it causes a lot of lag or that, so I can make that mapflag to all the maps in my server. Quote Link to comment Share on other sites More sharing options...
Pneuma Posted July 20, 2014 Group: Members Topic Count: 82 Topics Per Day: 0.02 Content Count: 846 Reputation: 138 Joined: 02/26/14 Last Seen: March 7, 2018 Share Posted July 20, 2014 But it doesn't work, I have already setted .map$ to prontera set .map$,"prontera"; I leave prontera and I don't get any message... The only way to make it work, was using OnPCLoadMapEvent... That's why my question about the "loadevent" mapflag, if it causes a lot of lag or that, so I can make that mapflag to all the maps in my server. The only way the map check will work is if you have a script continuously running that checks for mapchange. If you could provide me with the full script I might beable to help you more Quote Link to comment Share on other sites More sharing options...
eKoh Posted July 20, 2014 Group: Members Topic Count: 46 Topics Per Day: 0.01 Content Count: 206 Reputation: 13 Joined: 01/07/12 Last Seen: July 12, 2020 Author Share Posted July 20, 2014 Well, I have this problem because I am developing a pvp room, it uses @battleignore to make a "safe zone" and toggles to make the "pvp zone", but if the player for some reason leaves (like being ecalled) and he is on the safe zone, he is still having @battleignore on. And well, it is a bug: - script pvp_on_try2 -1,{ OnTouch: atcommand "@battleignore"; set @ig,0; set @bignore,1; end; } And the OnPCLoadMap: prontera mapflag loadevent morocc mapflag loadevent - script Test -1,{ OnPCLoadMapEvent: set .map$, "prontera"; getmapxy(@map$, @xb, @yb, 0 ); if (@map$ != .map$) { dispbottom "You have left "+.map$+"."; end; } end; } There could be also another solution instead of detecting if a player leaves a map. Thank you Pneuma, for helping me so much =)! Quote Link to comment Share on other sites More sharing options...
Question
eKoh
Is it possible to make that??
Link to comment
Share on other sites
6 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.