TsIpIzTiK® Posted April 18, 2011 Posted April 18, 2011 hello mxc am need your help i want a java code to become hero 4 ever i have use searche and i diden't find it maybe some1 have it?
0 TsIpIzTiK® Posted April 18, 2011 Author Posted April 18, 2011 u search on wrong section! i didn't search on section i search on all forum
0 Trance Posted April 21, 2011 Posted April 21, 2011 What kind of code? If player have a number of pvps or //sethero? Explain us.
0 TsIpIzTiK® Posted April 21, 2011 Author Posted April 21, 2011 What kind of code? If player have a number of pvps or //sethero? Explain us. not with admin command set him hero for ever like donate hero
0 vampir Posted April 21, 2011 Posted April 21, 2011 player.setHero(true) done. it gives hero until restart.. The easiest and shortest way is just writing something like: if(activeChar.getName().equals("Nick")){ activeChar.setHero(true); } in enterworld.java and if u want more ppl, then just write || acitveChar....................
0 Trance Posted April 21, 2011 Posted April 21, 2011 player.setHero(true) done. It is not already at sethero? ^.^ I can't understand what he want or maybe his sethero is until restart.
0 An4rchy Posted April 21, 2011 Posted April 21, 2011 You have to make a connection to the database, and execute an sql file that will set the character name and info to heroes.sql table, but via java. It's not difficult. Just search for other stuff that connect to database and edit them.
0 vampir Posted April 21, 2011 Posted April 21, 2011 You have to make a connection to the database, and execute an sql file that will set the character name and info to heroes.sql table, but via java. It's not difficult. Just search for other stuff that connect to database and edit them. yeah you can make that or sethero in enterworld as i said since its kinda same
0 Azumaril$ Posted April 21, 2011 Posted April 21, 2011 activeChar.setHero(true); just in enterworld.java so when a players login, he is always hero.
0 vampir Posted April 21, 2011 Posted April 21, 2011 activeChar.setHero(true); just in enterworld.java so when a players login, he is always hero. it would make every player hero..
0 An4rchy Posted April 21, 2011 Posted April 21, 2011 Yes, but maybe he can't every time write player's name when he wants someone to be hero forever. Dude, if i have time later or tomorrow, i will share it for you.
0 Matim Posted April 21, 2011 Posted April 21, 2011 Some simple ways: a) - expand 'characters' table and add new boolean field, for example 'is_hero' (true/false) - onLogin / enterworld packet - add proper check and make player hero if there is true. b) - create new table for permanent heroes. - the same step as before. Your choice.
0 Tryskell Posted April 21, 2011 Posted April 21, 2011 As said higher, setHero have been made in link with the Hero table, it put hero ppl in this table, but only for the play's session time. Matim's solutions are fine. The b) has the advantage to don't touch to L2PcInstance, when the a) is simplier to do (when you know what to do).
0 TsIpIzTiK® Posted April 21, 2011 Author Posted April 21, 2011 i just want a java code to make 1 active player hero for ever if admin press //set(somthinik)
Question
TsIpIzTiK®
hello mxc am need your help i want a java code to become hero 4 ever i have use searche and i diden't find it maybe some1 have it?
18 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now