EdenEternal Posted July 22, 2010 Posted July 22, 2010 hello maxcheaters! i wanna to create java code. Prize to Duel winner. and some1 if can to test please help. go to gameserver/model/entity/duel.java find this: // inform players of the result SystemMessage sm = null; switch (result) { case Team1Win: restorePlayerConditions(false); // send SystemMessage if (_partyDuel) sm = new SystemMessage(SystemMessageId.S1S_PARTY_HAS_WON_THE_DUEL); else sm = new SystemMessage(SystemMessageId.S1_HAS_WON_THE_DUEL); sm.addString(_playerA.getName()); broadcastToTeam1(sm); broadcastToTeam2(sm); break; case Team2Win: restorePlayerConditions(false); // send SystemMessage if (_partyDuel) sm = new SystemMessage(SystemMessageId.S1S_PARTY_HAS_WON_THE_DUEL); else sm = new SystemMessage(SystemMessageId.S1_HAS_WON_THE_DUEL); sm.addString(_playerB.getName()); broadcastToTeam1(sm); broadcastToTeam2(sm); break; and change to this: case Team1Win: restorePlayerConditions(false); // send SystemMessage if (_partyDuel) sm = new SystemMessage(SystemMessageId.S1S_PARTY_HAS_WON_THE_DUEL); else sm = new SystemMessage(SystemMessageId.S1_HAS_WON_THE_DUEL); sm.addString(_playerA.getName()); _playerA.getInventory().addItem(6673,1,0,null); broadcastToTeam1(sm); broadcastToTeam2(sm); break; case Team2Win: restorePlayerConditions(false); // send SystemMessage if (_partyDuel) sm = new SystemMessage(SystemMessageId.S1S_PARTY_HAS_WON_THE_DUEL); else sm = new SystemMessage(SystemMessageId.S1_HAS_WON_THE_DUEL); sm.addString(_playerB.getName()); _playerB.getInventory().addItem(6673,1,0,null); broadcastToTeam1(sm); broadcastToTeam2(sm); break; if someone test it please post :) p.s winned must gain 1 FA
0 Pinaepple Posted July 22, 2010 Posted July 22, 2010 hope to find something mate. but u are sure for this? its easy one player open dualbox and make all day duels with bot or make it with his friend ;)
0 EdenEternal Posted July 22, 2010 Author Posted July 22, 2010 hope to find something mate. but u are sure for this? its easy one player open dualbox and make all day duels with bot or make it with his friend ;) you just tell me if it works
0 xAddytzu Posted July 22, 2010 Posted July 22, 2010 Won't work because getInventory().addItem method is followed by (process, item, actor, reference) I suggest you to use "activeChar.addItem(process, itemId, count, reference, sendMessage)"
0 EdenEternal Posted July 22, 2010 Author Posted July 22, 2010 Won't work because getInventory().addItem method is followed by (process, item, actor, reference) I suggest you to use "activeChar.addItem(process, itemId, count, reference, sendMessage)" if like this: _playerA.getInventory().addItem("DuelWin", 6673, 1, null, true) it's better choice?
0 xAddytzu Posted July 22, 2010 Posted July 22, 2010 if like this: _playerA.getInventory().addItem("DuelWin", 6673, 1, null, true) it's better choice? You can't use getInventory().addItem, count is missing. Use activeChar.addItem("Duel", 57, 7777, null, true)
0 EdenEternal Posted July 22, 2010 Author Posted July 22, 2010 [javac] D:\zborkebi\L2J-Geo\java\net\sf\l2j\gameserver\model\entity\Duel.jav a:694: cannot find symbol [javac] symbol : variable activeChar [javac] location: class net.sf.l2j.gameserver.model.entity.Duel [javac] activeChar.addItem("Duel", 57, 7777, nul l, true); [javac] ^ [javac] D:\zborkebi\L2J-Geo\java\net\sf\l2j\gameserver\model\entity\Duel.jav a:708: cannot find symbol [javac] symbol : variable activeChar [javac] location: class net.sf.l2j.gameserver.model.entity.Duel [javac] activeChar.addItem("Duel", 57, 7777, nul l, true); [javac] ^ [javac] 2 errors how to fix?
0 EdenEternal Posted July 23, 2010 Author Posted July 23, 2010 Thx now works! case Team1Win: restorePlayerConditions(false); // send SystemMessage if (_partyDuel) sm = new SystemMessage(SystemMessageId.S1S_PARTY_HAS_WON_THE_DUEL); else sm = new SystemMessage(SystemMessageId.S1_HAS_WON_THE_DUEL); sm.addString(_playerA.getName()); if (Config.DUEL_PRIZE) { _playerA.addItem("Duel", 57, 7777, null, true); } broadcastToTeam1(sm); broadcastToTeam2(sm); break; case Team2Win: restorePlayerConditions(false); // send SystemMessage if (_partyDuel) sm = new SystemMessage(SystemMessageId.S1S_PARTY_HAS_WON_THE_DUEL); else sm = new SystemMessage(SystemMessageId.S1_HAS_WON_THE_DUEL); sm.addString(_playerB.getName()); if (Config.DUEL_PRIZE) { _playerB.addItem("Duel", 57, 7777, null, true); } broadcastToTeam1(sm); broadcastToTeam2(sm); break;
Question
EdenEternal
hello maxcheaters!
i wanna to create java code.
Prize to Duel winner.
and some1 if can to test please help.
go to gameserver/model/entity/duel.java
find this:
and change to this:
if someone test it please post :)
p.s winned must gain 1 FA
10 answers to this question
Recommended Posts