megablox Posted May 30, 2012 Group: Members Topic Count: 30 Topics Per Day: 0.01 Content Count: 81 Reputation: 10 Joined: 04/08/12 Last Seen: December 14, 2020 Share Posted May 30, 2012 I want WoE to be allowed only for non third classes, how can I do that? Quote Link to comment Share on other sites More sharing options...
Euphy Posted May 30, 2012 Group: Members Topic Count: 72 Topics Per Day: 0.02 Content Count: 2997 Reputation: 1132 Joined: 05/27/12 Last Seen: June 1, 2017 Share Posted May 30, 2012 There are two methods that would work, both require about the same amount of work: Change all the warp portals to normal NPCs, with warp sprites (#45) and OnTouch labels. Warp players if (Upper != 8). Add "Loadevent" mapflags inside all WOE castles. The next step depends on whether or not you have "loadevent" flags on other maps - if it's not too many, you could write something like this: OnPCLoadMapEvent: if (!agitcheck() && !agitcheck2()) end; // Enable these lines if there are other "loadevent" maps { setarray .@maps$[0],"prontera","payon","etc."; for (set .@i,0; .@i<getarraysize(.@maps$); set .@i,.@i+1) if (strcharinfo(3)==.@maps$[.@i]) end; } if (Upper == 8) warp "SavePoint",0,0; Quote Link to comment Share on other sites More sharing options...
F0xxy Posted May 30, 2012 Group: Members Topic Count: 3 Topics Per Day: 0.00 Content Count: 224 Reputation: 22 Joined: 03/23/12 Last Seen: April 21, 2020 Share Posted May 30, 2012 There's also another way that is making an npc that blocks an array of class ID's and duplicate at the entrance of every castle with the npc ID 139...this way 3rd classes will be pulled out if they try to enter: prtg_cas01,99,32,0 script nopass#h1-1::nothirds 139,3,3,{ if (class >= 4054 && class <= 4079) || (class >= 4096 && class <= 4108) { goto L_nopass; end; } else { end; } L_nopass: message strcharinfo(0),"3rd Classes aren't allowed in here."; warp "SavePoint",0,0; end; } //Duplicates //Working examples: //Add your desired blockages here prtg_cas04,86,13,0 duplicate(nothirds) nopass#h1-2 139,3,3 prtg_cas02,43,229,0 duplicate(nothirds) nopass#h1-3 139,3,3 Quote Link to comment Share on other sites More sharing options...
Euphy Posted May 30, 2012 Group: Members Topic Count: 72 Topics Per Day: 0.02 Content Count: 2997 Reputation: 1132 Joined: 05/27/12 Last Seen: June 1, 2017 Share Posted May 30, 2012 @F0xxy: It would work, but it's just as much work as my first suggestion with twice the server load~ XD Quote Link to comment Share on other sites More sharing options...
F0xxy Posted May 30, 2012 Group: Members Topic Count: 3 Topics Per Day: 0.00 Content Count: 224 Reputation: 22 Joined: 03/23/12 Last Seen: April 21, 2020 Share Posted May 30, 2012 @F0xxy: It would work, but it's just as much work as my first suggestion with twice the server load~ XD Actually the server load would be the same due to changing portals into npc's...I don't think your suggestion is that appealing, especially cause a lot of people would rather keep that kind of stuff as untouched as possible. And regarding that, you don't really need an OnTouch label if the npc ID is 45, since the client will recognize it as a warp portal anyway, what really matters is the cell range of the npc...like 45,2,2 <--- regular portal behaviour and it won't be clickable. Quote Link to comment Share on other sites More sharing options...
Euphy Posted May 30, 2012 Group: Members Topic Count: 72 Topics Per Day: 0.02 Content Count: 2997 Reputation: 1132 Joined: 05/27/12 Last Seen: June 1, 2017 Share Posted May 30, 2012 @F0xxy: It would work, but it's just as much work as my first suggestion with twice the server load~ XD Actually the server load would be the same due to changing portals into npc's...I don't think your suggestion is that appealing, especially cause a lot of people would rather keep that kind of stuff as untouched as possible. But you're still keeping the original warps... Warps + Invisible NPCs is twice the load of modified warps. o.o; Quote Link to comment Share on other sites More sharing options...
megablox Posted May 30, 2012 Group: Members Topic Count: 30 Topics Per Day: 0.01 Content Count: 81 Reputation: 10 Joined: 04/08/12 Last Seen: December 14, 2020 Author Share Posted May 30, 2012 (edited) Thanks both. I think I will go for Euphy's suggestion as players aren't allowed to warp directly inside WoE maps, but have to pass through warps. I will just replace the entrances of the maps with NPCs, change their sprite to the warp one, and then, when a player touches the NPC, I'll check the class. If it's a third job then the player will receive a message and will be warped somewhere else, otherwise he/she will just be warped insde the WoE map. Is that correct? Wait, did you mean ALL the server's warps? o.O Edited May 30, 2012 by megablox Quote Link to comment Share on other sites More sharing options...
QQfoolsorellina Posted May 30, 2012 Group: Members Topic Count: 40 Topics Per Day: 0.01 Content Count: 587 Reputation: 105 Joined: 11/19/11 Last Seen: July 7, 2019 Share Posted May 30, 2012 (edited) To use OnPCLoadMapEvent + check limit condition would be better coz if player was a guild leader, he/she can use skill to recall all guild members(include 3rd job) Edited May 30, 2012 by QQfoolsorellina Quote Link to comment Share on other sites More sharing options...
F0xxy Posted May 30, 2012 Group: Members Topic Count: 3 Topics Per Day: 0.00 Content Count: 224 Reputation: 22 Joined: 03/23/12 Last Seen: April 21, 2020 Share Posted May 30, 2012 (edited) @F0xxy: It would work, but it's just as much work as my first suggestion with twice the server load~ XD Actually the server load would be the same due to changing portals into npc's...I don't think your suggestion is that appealing, especially cause a lot of people would rather keep that kind of stuff as untouched as possible. But you're still keeping the original warps... Warps + Invisible NPCs is twice the load of modified warps. o.o; If you mean loading npc's will be slower, you won't notice the difference really. As for resources wasting, don't forget that in this case every player will have to go through it, and in both cases they'll be warping people, while in my script it's merely in order for players to aknowledge there's no way they ll get through by using a 3rd class char. In 99% of the cases the script will just end when triggered...and of course, warps and npc's are different...as you can see when you load the server it will tell you the ammount of warps, npc's, mobs, shops and spawn sets that were loaded. Wait, did you mean ALL the server's warps? o.O He meant the castle warps, but if you wanna go through that you'll end up having a different script for every warp, since the places you're supposed to warp to will be different. To use OnPCLoadMapEvent + check limit condition was more better coz if player are guild leader, he/she can use skill to recall all guild members(include 3rd job) And that's true, but since his server is not supposed to allow 3rd classes to woe, then I believe he'll also set his own rule saying 3rd classes won't be allowed in woe...warp/entry blockages can serve as a warning, and others will eventually report whoever tries to defy that rule, besides gm's can also monitor those things if they want to. Edited May 30, 2012 by F0xxy Quote Link to comment Share on other sites More sharing options...
Euphy Posted May 30, 2012 Group: Members Topic Count: 72 Topics Per Day: 0.02 Content Count: 2997 Reputation: 1132 Joined: 05/27/12 Last Seen: June 1, 2017 Share Posted May 30, 2012 If you mean loading npc's will be slower, you won't notice the difference really. As for resources wasting, don't forget that in this case every player will have to go through it, and in both cases they'll be warping people, while in my script it's merely in order for players to aknowledge there's no way they ll get through by using a 3rd class char.In 99% of the cases the script will just end when triggered...and of course, warps and npc's are different...as you can see when you load the server it will tell you the ammount of warps, npc's, mobs, shops and spawn sets that were loaded. I don't mean to prolong this argument, but there are several flaws in what you stated. First, it certainly doesn't add any additional checks to replace warps, since there are no less "if" statements in your idea than in mine. Ending a script after a conditional consumes just as much resources as warping after it. And all of the things you stated are still scripts, so it's a misleading statement, really. @QQfoolsorellina: That's a good point, and it would probably be easier to implement, too. Quote Link to comment Share on other sites More sharing options...
F0xxy Posted May 30, 2012 Group: Members Topic Count: 3 Topics Per Day: 0.00 Content Count: 224 Reputation: 22 Joined: 03/23/12 Last Seen: April 21, 2020 Share Posted May 30, 2012 (edited) If you mean loading npc's will be slower, you won't notice the difference really. As for resources wasting, don't forget that in this case every player will have to go through it, and in both cases they'll be warping people, while in my script it's merely in order for players to aknowledge there's no way they ll get through by using a 3rd class char.In 99% of the cases the script will just end when triggered...and of course, warps and npc's are different...as you can see when you load the server it will tell you the ammount of warps, npc's, mobs, shops and spawn sets that were loaded. I don't mean to prolong this argument, but there are several flaws in what you stated. First, it certainly doesn't add any additional checks to replace warps, since there are no less "if" statements in your idea than in mine. Ending a script after a conditional consumes just as much resources as warping after it. And all of the things you stated are still scripts, so it's a misleading statement, really. @QQfoolsorellina: That's a good point, and it would probably be easier to implement, too. "...all of the things you stated are still scripts..." Never said otherwise. Warps do not have checks, that's the point here, there's no doubt it will consume more resources by replacing it with a script. Of course if the script ends or warps you you won't feel any difference since it's a matter of milliseconds anyways, but there's always a difference(just saying). I guess we can both agree to the fact that your 2nd suggestion is a lot more plausible in the long run, enough. Edited May 30, 2012 by F0xxy Quote Link to comment Share on other sites More sharing options...
Euphy Posted May 31, 2012 Group: Members Topic Count: 72 Topics Per Day: 0.02 Content Count: 2997 Reputation: 1132 Joined: 05/27/12 Last Seen: June 1, 2017 Share Posted May 31, 2012 Warps do not have checks, that's the point here, there's no doubt it will consume more resources by replacing it with a script. Of course if the script ends or warps you you won't feel any difference since it's a matter of milliseconds anyways, but there's always a difference(just saying). That is still incredibly faulty logic. I'd suggested replacing a warp with a script, and you're suggesting keeping the warps and adding a script. You think the latter is more efficient? o_o Also, an invisible "blocker" that "ends" consumes resources equally as a script check. if (Upper != 8) end; // Warp by portal if (Upper != 8) end; // Warp by script Quote Link to comment Share on other sites More sharing options...
F0xxy Posted May 31, 2012 Group: Members Topic Count: 3 Topics Per Day: 0.00 Content Count: 224 Reputation: 22 Joined: 03/23/12 Last Seen: April 21, 2020 Share Posted May 31, 2012 Warps do not have checks, that's the point here, there's no doubt it will consume more resources by replacing it with a script. Of course if the script ends or warps you you won't feel any difference since it's a matter of milliseconds anyways, but there's always a difference(just saying). That is still incredibly faulty logic. I'd suggested replacing a warp with a script, and you're suggesting keeping the warps and adding a script. You think the latter is more efficient? o_o Also, an invisible "blocker" that "ends" consumes resources equally as a script check. if (Upper != 8) end; // Warp by portal if (Upper != 8) end; // Warp by script "a warp with a script" - Lol There's also another way that is making an npc that blocks an array of class ID's and duplicate at the entrance of every castle with the npc ID 139...this way 3rd classes will be pulled out if they try to enter: Efficiency, it gets the job done and it's an alternative to changing portals, dunno where you're going with that. Then according to your logic your 2nd suggestion would suck too since you're keeping the warps and adding a script anyways. Obviously blocking certain parameters requires checks, pointless statement but do you really think that just cause the [ammount] of npc's is somewhat higher, the resources will necessarily need to be twice as much compared to another script? <.<' I'd say comparing mine and your 2nd suggestion, yours would be more efficient since it'll end up loading as often as mine and will end up stopping some abuse just in case, that's good and I accept that fact. If by any chance someone would rather use my script then it would be fine as well now...wouldn't it? Point of this argument: None. Quote Link to comment Share on other sites More sharing options...
MarkZD Posted May 31, 2012 Group: Members Topic Count: 6 Topics Per Day: 0.00 Content Count: 134 Reputation: 35 Joined: 02/27/12 Last Seen: April 5, 2022 Share Posted May 31, 2012 (edited) An optimized code from the Euphy's code piece, to a normal server which a lot maps, much more than guild maps are accessed, would be: OnPCLoadMapEvent: if (!agitcheck() && !agitcheck2()) end; // Enable these lines if there are other "loadevent" maps { setarray .@castleMaps$[0],"aldeg_cas02","payg_cas05","castleEtc."; set .@Size,getarraysize(.@castleMaps$); // We make a variable so the function doesn't need to calculate array size all the time as it won't increase for (set .@i,0; .@i<.@Size; set .@i,.@i+1) if (strcharinfo(3)==.@castleMaps$[.@i])//make strcharinfo a variable if in wanting of an optimal perfomance if (Upper == 8) warp "SavePoint",0,0; } end; // Not sure if this end is needed. or a better one that I adapted, this is better at all: OnPCLoadMapEvent: if (!agitcheck() && !agitcheck2()) end; // Enable these lines if there are other "loadevent" maps { if (getcastlename(strcharinfo(3))!="") if (Upper == 8) warp "SavePoint",0,0; } end; // Not sure if this end is needed. but I still didn't test them, if the strcharinfo(3) is just a /where(without coord.) so it should fit. Edited May 31, 2012 by MarkZD Quote Link to comment Share on other sites More sharing options...
Euphy Posted May 31, 2012 Group: Members Topic Count: 72 Topics Per Day: 0.02 Content Count: 2997 Reputation: 1132 Joined: 05/27/12 Last Seen: June 1, 2017 Share Posted May 31, 2012 (edited) @MarkZD: "OnPCLoadMapEvent" isn't triggered unless a "loadevent" mapflag is added to each map. By default, no maps have that mapflag. It would be far more efficient, therefore, to loop through maps that are not the castles, assuming the only reason a user would add the mapflag is for a few custom scripts. Edit: Your second script would work, though. Very clever. XD Edited May 31, 2012 by Euphy Quote Link to comment Share on other sites More sharing options...
clydelion Posted May 31, 2012 Group: Members Topic Count: 17 Topics Per Day: 0.00 Content Count: 754 Reputation: 186 Joined: 05/22/12 Last Seen: October 15, 2022 Share Posted May 31, 2012 Try this one, it blocks warping of all 3rd class characters to gvg_castle flagged maps. (warps, ecalls, etc) pc.c.patch Quote Link to comment Share on other sites More sharing options...
megablox Posted May 31, 2012 Group: Members Topic Count: 30 Topics Per Day: 0.01 Content Count: 81 Reputation: 10 Joined: 04/08/12 Last Seen: December 14, 2020 Author Share Posted May 31, 2012 (edited) @clyde, I am probably wrong, but isn't "JOB_SUPER_NOVICE_E" Super Novice Extended? Edited May 31, 2012 by megablox Quote Link to comment Share on other sites More sharing options...
clydelion Posted May 31, 2012 Group: Members Topic Count: 17 Topics Per Day: 0.00 Content Count: 754 Reputation: 186 Joined: 05/22/12 Last Seen: October 15, 2022 Share Posted May 31, 2012 (edited) yeah it is the start for 3-1 in rathena. you can change it to what's the job_id of the lowest job id in the third jobs. Edited May 31, 2012 by clydelion Quote Link to comment Share on other sites More sharing options...
megablox Posted May 31, 2012 Group: Members Topic Count: 30 Topics Per Day: 0.01 Content Count: 81 Reputation: 10 Joined: 04/08/12 Last Seen: December 14, 2020 Author Share Posted May 31, 2012 Okay, thanks ! Btw, how are .patch files meant to be used? Quote Link to comment Share on other sites More sharing options...
clydelion Posted May 31, 2012 Group: Members Topic Count: 17 Topics Per Day: 0.00 Content Count: 754 Reputation: 186 Joined: 05/22/12 Last Seen: October 15, 2022 Share Posted May 31, 2012 (edited) the same as .diff. Just diff them manually though. To make sure that it doesn't get messed up. Also, please make sure that gvg castle gave the mapflag gvg_castle on them to make this work. to check, use @mapinfo while your are on one of the castles Edited May 31, 2012 by clydelion Quote Link to comment Share on other sites More sharing options...
megablox Posted May 31, 2012 Group: Members Topic Count: 30 Topics Per Day: 0.01 Content Count: 81 Reputation: 10 Joined: 04/08/12 Last Seen: December 14, 2020 Author Share Posted May 31, 2012 @clyde, I checked every castles flags, they all were flagged as GvG castles. Then I tried using the pc.c patch, (manually added those two lines) and then recompiled the server. Tried warping inside the castle (can a GM account bypass this patch?), but I still were able to enter. Was on a Glt. Cross char Quote Link to comment Share on other sites More sharing options...
clydelion Posted May 31, 2012 Group: Members Topic Count: 17 Topics Per Day: 0.00 Content Count: 754 Reputation: 186 Joined: 05/22/12 Last Seen: October 15, 2022 Share Posted May 31, 2012 (edited) use this instead. pc.c.patch Edited May 31, 2012 by clydelion Quote Link to comment Share on other sites More sharing options...
megablox Posted June 1, 2012 Group: Members Topic Count: 30 Topics Per Day: 0.01 Content Count: 81 Reputation: 10 Joined: 04/08/12 Last Seen: December 14, 2020 Author Share Posted June 1, 2012 Works like a charm! Quote Link to comment Share on other sites More sharing options...
Question
megablox
I want WoE to be allowed only for non third classes, how can I do that?
Link to comment
Share on other sites
22 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.