hello everyone :D this is my 1st release so flame me if u want :x
okay what these commands warps you to pvp map and warps you back to where you come from o_O but the leavepvp command runs on .js file :S
okay here are the commands
gopvp
In commandprocessor.java or w/e, add:
dont forget to change the pvpmaphere to your pvp mapidCode:else if (splitted[0].equals("@pvp")) { if (player.getMapId() != pvpmapidhere) { player.saveLocation(SavedLocationType.WORLDTOUR); MapleMap t = cserv.getMapFactory().getMap(pvpmapidhere); MaplePortal tp = t.getPortal(0); player.changeMap(t, tp); } else { mc.dropMessage("You're already inside the PVP map."); } }
leavepvp.js
paste it into notepad and save as lpvp.js then put inside script/commands folder. if you don't have, don't use it for now 1st.
Code:importPackage(net.sf.odinms.client); importPackage(net.sf.odinms.client.messages); importPackage(net.sf.odinms.server); importPackage(net.sf.odinms.server.maps); importPackage(net.sf.odinms.net.channel); function getDefinition () { var ret = java.lang.reflect.Array.newInstance(CommandDefinition, 1); ret[0] = new CommandDefinition("leavepvp", "", "", "100"); return ret; } function execute (c, mc, splitted) { var map = c.getPlayer().getSavedLocation(SavedLocationType.WORLDTOUR); var t = c.getPlayer().getClient().getChannelServer().getMapFactory().getMap(map); var tp = t.getPortal(0); c.getPlayer().changeMap(t, tp); c.getPlayer().clearSavedLocation(SavedLocationType.WORLDTOUR); }



Reply With Quote

