Newbie Spellweaver
- Joined
- Aug 8, 2011
- Messages
- 45
- Reaction score
- 0
How can i disallow skills in certain maps?
Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!
Join Today!If I remember correctly, in the WZ files, you can choose whether or not to block skills.
I think the only way to do this is to make the client think that the skills you want to block are the movement skills that would be blocked by JQ maps. So change the fieldLimit of the map to the same as a JQ map, and look around at the values for skills.
Then again, it might just be easier to temporarily remove the skill from them.
client sided br0
As far as i tested, i can use movement skills in JQ maps too, i'm using MoopleDEV.
Could be because i'm a GM?
This depends on what kind of skill it is that you want to block.
Attack Skill, Buff Skill, Move Skill (IE: FJ), etc..
---------- Post added at 07:27 PM ---------- Previous post was at 06:56 PM ----------
Blocking attack skills:
Ranged Attacks (RangedAttackHandler.java):
Magic Attacks (MagicDamageHandler.java):
Melee Attacks (CloseRangeDamageHandler):
Code:if (player.getMap().getId() == <MAPID> && attack.skill == <SKILLIDHERE>) { player.dropMessage("You were warpped out for using a banned skill."); MapleMap map = ChannelServer.getInstance(c.getChannel()).getMapFactory().getMap(100000000); //Henesys player.changeMap(map, map.getPortal(0)); return; }
Skill Buffs (MapleStatEffect.java : applyTo(MapleCharacter chr) Method):
Code:if (chr.getMap().getId() == <MAPID> && skill && sourceid == <MAPID>) { chr.dropMessage("You were warpped out for using a banned skill."); MapleMap map = ChannelServer.getInstance(chr.getClient().getChannel()).getMapFactory().getMap(100000000); //Henesys chr.changeMap(map, map.getPortal(0)); return false; }
Special Skill Movement: FJ/Float/Shot-Back-Jump thingy/Assaulter/Assasinate/Teleport/Rush/Sitting... (AbstractMovementPacketHandler and MovePlayerHandler):
This is a little tricky, in MovePlayerHandler, you should see something like: "List<LifeMovementFragment> res = parseMovement(slea);"
You want to change parseMovement to also accept a MapleClient c variable. In AbstractMovementPacketHandler, make the beginning of parseMovement say
Code:protected List<LifeMovementFragment> parseMovement(LittleEndianAccessor lea, MapleClient c) {
If you change this, you'll need to change all the places this method is used as well (Which should be in: MovePlayerHandler, MovePetHandler, MoveLifeHandler, and MoveSummonHandler)
You'll need to change
toCode:parseMovement(slea)
In this way, you can pass the client to the parseMovement function.Code:parseMovement(slea,c)
Now, in AbstractMovementPacketHandler.java : parseMovement Method, You'll see a switch code block and a whole bunch of Cases (that should be labelled with the corresponding skill) to disable a skill, under the Case you want:
Code:if (c.getPlayer().getMap().getId() == <MAPID>) { c.getPlayer().dropMessage("You were warpped out for using a banned skill."); MapleMap map = ChannelServer.getInstance(c.getChannel()).getMapFactory().getMap(100000000); //Henesys c.getPlayer().changeMap(map, map.getPortal(0)); return null; }
GL with your coding =P
This might be wrong, since I'm writing all of this from the top of my head, but it should work.
Make sure to fix all imports to: Netbeans: Cntrl + Shift + I, I think.
That was posted in 09, dunno if it still works, but I hope it helps.