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? Quote
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 Quote
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. Quote
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 Quote
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.................... Quote
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. Quote
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. Quote
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 Quote
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. Quote
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.. Quote
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. Quote
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. Quote
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). Quote
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) Quote
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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.