use //endolympiad
Make a true hero
Forum rules
READ NOW: L2j Forums Rules of Conduct
READ NOW: L2j Forums Rules of Conduct
- Naonah
- Posts: 357
- Joined: Sun Apr 04, 2010 11:12 pm
Re: Make a true hero
oops sry, I confused commands
use //endolympiad
use //endolympiad
public void l2jserver ()
{
if (you want l2j server == no problems)
use Linux;
else
use Windows;
}
{
if (you want l2j server == no problems)
use Linux;
else
use Windows;
}
-
GizZ
- Posts: 53
- Joined: Thu May 13, 2010 5:00 pm
Re: Make a true hero
Perfect
The error was the 1,0
Have to be 1, 1
The error was the 1,0
Have to be 1, 1
- SolidSnake
- Posts: 865
- Joined: Wed Jan 20, 2010 6:54 pm
- Location: Italy
Re: Make a true hero
Anyway for the 'Hero status in item' code, you should wait a little

-
wonderweiss
- Posts: 16
- Joined: Mon Aug 02, 2010 9:23 pm
Re: Make a true hero
you need characters no loggued too
- SolidSnake
- Posts: 865
- Joined: Wed Jan 20, 2010 6:54 pm
- Location: Italy
-
GizZ
- Posts: 53
- Joined: Thu May 13, 2010 5:00 pm
Re: Make a true hero
Thanks alot Solidsnake
I am sorry that i cant help with that code but im going to a curse of java soon .
Maybe i learn something usefull there so i can help ppl aswell
I am sorry that i cant help with that code but im going to a curse of java soon .
Maybe i learn something usefull there so i can help ppl aswell
- SolidSnake
- Posts: 865
- Joined: Wed Jan 20, 2010 6:54 pm
- Location: Italy
Re: Make a true hero
Now I'm working on the 'hero status in item' code, but after that I can post you a patch to set heroes with a new admin command 

- SolidSnake
- Posts: 865
- Joined: Wed Jan 20, 2010 6:54 pm
- Location: Italy
Re: Make a true hero
Here it is a little new patch (untested, I've worked on it 10 minutes
)
It should work only on a cleaned Olympiad system without heroes.. Try it with //realhero
Code: Select all
Index: gameserver/data/scripts/handlers/admincommandhandlers/AdminAdmin.java===================================================================--- gameserver/data/scripts/handlers/admincommandhandlers/AdminAdmin.java (revision 7664)+++ gameserver/data/scripts/handlers/admincommandhandlers/AdminAdmin.java (working copy)@@ -37,1 +37,67 @@import com.l2jserver.gameserver.model.L2Multisell;import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;+import com.l2jserver.gameserver.model.entity.Hero;import com.l2jserver.gameserver.model.olympiad.Olympiad;import com.l2jserver.gameserver.network.SystemMessageId;@@ -83,3 +83,19 @@ "admin_manualhero", "admin_sethero",+ "admin_realhero", "admin_endolympiad", "admin_setconfig",@@ -159,3 +159,4 @@ target.broadcastUserInfo(); }+ else if (command.startsWith("admin_realhero"))+ {+ if (activeChar.getTarget() instanceof L2PcInstance)+ {+ Hero.setRealHero;+ }+ } else if (command.startsWith("admin_diet")) {Index: java/com/l2jserver/gameserver/model/entity/Hero.java===================================================================--- java/com/l2jserver/gameserver/model/entity/Hero.java (revision 4415)+++ java/com/l2jserver/gameserver/model/entity/Hero.java (working copy)@@ -973,2 +973,3 @@ L2DatabaseFactory.close(con); } }+ + public synchronized void setRealHero(List<StatsSet> newHeroes)+ {+ L2PcInstance player = L2World.getInstance().getPlayer(charId);+ L2PcInstance target = null;+ int charId = target.getInteger(Olympiad.CHAR_ID);+ if (player != null && player.getTarget() instanceof L2PcInstance)+ {+ target = (L2PcInstance) player.getTarget();+ StatsSet newRealHero = new StatsSet();+ newRealHero.set(Olympiad.CHAR_NAME, target.getString(Olympiad.CHAR_NAME));+ newRealHero.set(Olympiad.CLASS_ID, target.getInteger(Olympiad.CLASS_ID));+ newRealHero.set(COUNT, 1);+ newRealHero.set(PLAYED, 1);+ + heroes.put(charId, newRealHero);+ }+ else+ {+ target = player;+ StatsSet newRealHero = new StatsSet();+ newRealHero.set(Olympiad.CHAR_NAME, target.getString(Olympiad.CHAR_NAME));+ newRealHero.set(Olympiad.CLASS_ID, target.getInteger(Olympiad.CLASS_ID));+ newRealHero.set(COUNT, 1);+ newRealHero.set(PLAYED, 1);+ + heroes.put(charId, newRealHero);+ }+ target.broadcastUserInfo();+ } public void setHeroGained(int charId) {
-
GizZ
- Posts: 53
- Joined: Thu May 13, 2010 5:00 pm
Re: Make a true hero
Thanks solid think its working ... atleaste with me 
-
GizZ
- Posts: 53
- Joined: Thu May 13, 2010 5:00 pm
Re: Make a true hero
Solid i tryed aswell the auto reward system from the votes i did the patch but the messege dosent shows many times , only wean i start the server then i dont see anymore the messege.
You have tested the autovote reward system?
You have tested the autovote reward system?