Page 2 of 2

Re: Make a true hero

Posted: Mon Sep 13, 2010 4:19 pm
by Naonah
oops sry, I confused commands :D

use //endolympiad

Re: Make a true hero

Posted: Mon Sep 13, 2010 4:20 pm
by GizZ
Perfect

The error was the 1,0

Have to be 1, 1

Re: Make a true hero

Posted: Mon Sep 13, 2010 4:22 pm
by SolidSnake
:D - solved

Anyway for the 'Hero status in item' code, you should wait a little :) We're currently working on it

Re: Make a true hero

Posted: Mon Sep 13, 2010 11:56 pm
by wonderweiss
you need characters no loggued too

Re: Make a true hero

Posted: Tue Sep 14, 2010 5:43 am
by SolidSnake
problem just solved

Re: Make a true hero

Posted: Tue Sep 14, 2010 10:36 am
by GizZ
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

Re: Make a true hero

Posted: Tue Sep 14, 2010 10:41 am
by SolidSnake
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 :D

Re: Make a true hero

Posted: Tue Sep 14, 2010 11:32 am
by SolidSnake
Here it is a little new patch (untested, I've worked on it 10 minutes :P )

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)    {
It should work only on a cleaned Olympiad system without heroes.. Try it with //realhero

Re: Make a true hero

Posted: Sun Sep 19, 2010 10:51 pm
by GizZ
Thanks solid think its working ... atleaste with me :P

Re: Make a true hero

Posted: Mon Sep 20, 2010 1:07 pm
by GizZ
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?