Stewie Posted December 5, 2012 Share Posted December 5, 2012 I have question, i have pvp reward system but i wanna add it, "if player is in "ArenaZone" to get reward. Is it possible? Ofc it is :D How? I think i just need something like if player.ZoneArenazone(); Wierd ;) please help :D + + // reward 2 + if (ALLOW_QUAKE_PVP) + { + String[] propertySplit = QuakeSettings.getProperty("PvPQuakeReward2", "0,0").split(";"); + for (String rewarditem2 : propertySplit) + { + String[] reward2Split = rewarditem2.split(","); + if (reward2Split.length != 2) + { + ALLOW_QUAKE_PVP = false; + System.out.println("RewardItem2[Config.load()]: invalid config property -> Reward items \"" + rewarditem2 + "\""); + } + else + { + try + { + QUAKE_REWARD_2.add(new int[] + { + Integer.valueOf(reward2Split[0]), Integer.valueOf(reward2Split[1]) + }); + } + catch (NumberFormatException nfe) + { + if (!rewarditem2.equals("")) + { + ALLOW_QUAKE_PVP = false; + System.out.println("RewardItem2[Config.load()]: invalid config property -> Reward items \"" + rewarditem2 + "\""); + } + } + } + } + } + // end reward 2 Part of my reward system I need players to get reward only in specific zone as an "ArenaZone" Link to comment Share on other sites More sharing options...
0 Stewie Posted December 5, 2012 Author Share Posted December 5, 2012 If you need something more just tell... Link to comment Share on other sites More sharing options...
0 `NeverMore Posted December 5, 2012 Share Posted December 5, 2012 if(player.isInsideZone(ZoneId.PVP)) { //bla bla } This is for H5 tho (unstable) Link to comment Share on other sites More sharing options...
0 Stewie Posted December 5, 2012 Author Share Posted December 5, 2012 if(player.isInsideZone(ZoneId.PVP)) { //bla bla } This is for H5 tho (unstable) k thanks, i will test and +1 if it works. Link to comment Share on other sites More sharing options...
0 SweeTs Posted December 5, 2012 Share Posted December 5, 2012 You should take a look at MutliFunctionZony by Wyatt, but generally it's like NeverMore said :) Link to comment Share on other sites More sharing options...
0 Stewie Posted December 5, 2012 Author Share Posted December 5, 2012 So i have to add before each " like " + { + case 1: if(player.isInsideZone(ZoneId.PVP)) } + for (int[] reward1 : Config.QUAKE_REWARD_1) + { + addItem("Loot", reward1[0], reward1[1], this, true); + } + PlaySound _snd1 = new PlaySound(1, "firstblood", 0, 0, 0, 0, 0); + sendPacket(_snd1); + sendMessage("You will be rewarded for 1,pvp kill!"); + ExShowScreenMessage _msg1 = new ExShowScreenMessage("Frist Blood", 3333); + sendPacket(_msg1); + break; + case 2: ? Link to comment Share on other sites More sharing options...
0 Tryskell Posted December 5, 2012 Share Posted December 5, 2012 ? Gods... if (ALLOW_QUAKE_PVP && player.isInsideZone(ZoneId.PVP)) Link to comment Share on other sites More sharing options...
0 Stewie Posted December 5, 2012 Author Share Posted December 5, 2012 ? Gods... if (ALLOW_QUAKE_PVP && player.isInsideZone(ZoneId.PVP)) :D Link to comment Share on other sites More sharing options...
0 Stewie Posted December 5, 2012 Author Share Posted December 5, 2012 mm problem.... (ALLOW_QUAKE_PVP && player.isInsideZone(L2ArenaZone.PVP)) Link to comment Share on other sites More sharing options...
0 Tryskell Posted December 6, 2012 Share Posted December 6, 2012 From your case 1, it's obvious than your code is in L2PcInstance, so you don't need "player." part. For the arena id, just search in your pack. Take more than 1min to test things by yourself... Link to comment Share on other sites More sharing options...
0 `NeverMore Posted December 6, 2012 Share Posted December 6, 2012 mm problem.... what pack are you using ? (chronicle and version) Link to comment Share on other sites More sharing options...
0 Stewie Posted December 6, 2012 Author Share Posted December 6, 2012 From your case 1, it's obvious than your code is in L2PcInstance, so you don't need "player." part. For the arena id, just search in your pack. Take more than 1min to test things by yourself... yup correct, i'm lazy at all ;D Link to comment Share on other sites More sharing options...
0 `NeverMore Posted December 6, 2012 Share Posted December 6, 2012 this is your check if (Config.ALLOW_QUAKE_PVP && (isInsideZone(ZONE_PVP))) in L2PcInstance.java Link to comment Share on other sites More sharing options...
0 Stewie Posted December 6, 2012 Author Share Posted December 6, 2012 this is your check if (Config.ALLOW_QUAKE_PVP && (isInsideZone(ZONE_PVP))) in L2PcInstance.java Tested & working, +1 for you. Link to comment Share on other sites More sharing options...
0 `Rοmeο Posted December 6, 2012 Share Posted December 6, 2012 Tested & working, +1 for you. Locked. Link to comment Share on other sites More sharing options...
Question
Stewie
I have question, i have pvp reward system but i wanna add it, "if player is in "ArenaZone" to get reward.
Is it possible? Ofc it is :D
How?
I think i just need something like
Wierd ;) please help :D
Part of my reward system
I need players to get reward only in specific zone as an "ArenaZone"
Link to comment
Share on other sites
14 answers to this question
Recommended Posts