Hardstyle
Members-
Posts
150 -
Joined
-
Last visited
-
Feedback
0%
Content Type
Articles
Profiles
Forums
Store
Everything posted by Hardstyle
-
=======================1st update of the post============================ -added clan name -top online now show time not timestamp -added raidboss status Download links: rbstatus.php toponline.php toppk.php toppvp.php ps:this are my first lines of php:D ==========================Original post================================= Download links : toponline.php toppk.php toppvp.php Guild : I will take top pvp and explain how to use it: 1) you will need a php server: easyphp for windows and lamp for linux will work perfectly 2) locate you www folder and paste the page.php there 3) open the page.php and start the configuration: $dbuser="root"; <= replace root with your mysql username $dbpass="123123"; <= replace with mysql user's password $dbname="l2jdb"; <= your gameserver data base $NumberOfResults="20"; <= replace 20 with the number of results you want 4) test it! like it is set now it will generate a html page with black background and a table in a middle. I don't host my site on the same pc like the server . On my site i've made iframes and just put the src="serverip/toppvp.php" and will work perfectly Now i will explain how this works: $dbuser="root"; $dbpass="123123"; $dbname="l2jdb"; //the name of the database $NumberOfResults="20";// $chandle = mysql_connect("localhost", $dbuser, $dbpass) or die("Connection Failure to Database"); this connects the php server to mysql server if failds returns the message("xxxx") mysql_select_db($dbname, $chandle) selects the db you will work from the connection created above $sql="select characters.char_name,characters.pvpkills,char_templates.ClassName,characters.online from characters,char_templates where characters.classid=char_templates.Classid order by characters.pvpkills DESC LIMIT ".$NumberOfResults; For sql users this is clear but i will explain for others: This scripts "select" the char_name from table characters and pvpkills from table character and classname from char_templates After from it declares the tables it will work on so : characters and char_templates But it will select only the records where char_template id is the same with char...so it will return only the baseclass name it will order by pvp kills so you will get only top recors And finaly the maximum limit of results will be 20 echo"<html><head></head><body bgcolor='#000000' style='color:rgb(200,200,200)'>"; echo "<table border='2' align=center width=500>"; echo "<tr><th>Nr.</th><th>Name</th><th>Pvp Kills</th><th>Main class</th><th>Status</th></tr>\n"; generates the 1st part of the html page and the begining of the table for records $nr=1; if ($result=mysql_query($sql)or die("Bed Sql syntax")) { while ($row=mysql_fetch_row($result)) { echo "<tr><td align=center>".$nr."</td>"; $nr++; echo "<td align=center>".$row[0]."</td>"; echo "<td align=center>".$row[1]."</td>"; echo "<td align=center>".$row[2]."</td>"; if($row[3]) {echo "<td align=center style='color:rgb(0,255,0)'>Online</td></tr>\n"; } else{echo "<td align=center style='color:rgb(255,0,0)'>Offline</td></tr>\n";} } } else { echo "<!-- SQL Error ".mysql_error()." -->"; } if the result of executing "mysql_query($sql)" dosn't faild , while there is a other line in the result creastes a new line in table and if there is a error report it,,, echo "</table></body></html>"; finish the table and the html page (i haven't sleep 3 h in the last 2 days...so don't kill me if my language is broken)
-
[Share] Crystal/Blessed Scrolls Max Enchant
Hardstyle replied to Spidey*'s topic in Server Shares & Files [L2J]
seach for : if (Rnd.get(100) < chance) { synchronized(item) and paste the code above it... -
its mana potion for l2j but it gives more mana if player is not flaged.....
-
sorry...
-
use potions and skills?
Hardstyle replied to darren's question in Request Server Development Help [L2J]
http://www.maxcheaters.com/forum/index.php?topic=196792.0 -
it was finished before i have read the post..
-
Mana Potion problem
Hardstyle replied to Hardstyle's question in Request Server Development Help [L2J]
problem fixed.... http://www.maxcheaters.com/forum/index.php?topic=196792.0 -
its 100% by me if you want to do this you need to open core... and this is not done in core... i think is better this way... i think but still this can be done better ... by modify the manapotion skill to have 2 lvl and when you are flaged to get lvl one and when you are not to get lvl 2... but i didn't manage to do it:):D
-
========================Updated======================================= after a replay on l2j form i have realized how newbie i am in programing and changed the script a little:) and if you want to give 200 mana in siege zone or other things change : if (item.getItemId()==728 && item.getCount()>0&& playable.getPvpFlag() == 0) to: if (item.getItemId()==728 && item.getCount()>0&& playable.getPvpFlag() == 0&&!playable.isInSiege()) you can add whatever you want.. ========================How to add it=================================== this works on latest freya revision ...on older packs the manapotion handler is in core and not handled individualy ...you may need to search it if you want to add this custom for mana potion you need to do this: 1) go to your mana potion at skills 10001 2) the "power" will be the ammount of mana given when is flaged 3) go to \data\scripts\handlers\itemhandlers\manapotion.java and replace it with the code below 4) go at line "playable.setCurrentMp(playable.getCurrentMp()+800);" and change it to the bonus for non flaged ex.)i wanted to give 200 mana for flaged players and 1000 for non flaged and i have changed the power of 10001 to 200 and put 800 for bonus notice: non flaged players will get the the mana from normal mana potion + the number you set ! ========================original post================================= 2 day ago i wanted to make mana potion to give less mana if you are flaged and more if you are not ... and with the last freya revision a lot of things changed , so i can't find anything allready done ... and once again i;ve put my ass to work and after some try's i came up with this: 1)go to your 10001 skill and put power=200 2) go to \data\scripts\handlers\itemhandlers\manapotion.java and replace the code with this /* * This program is free software: you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * this program. If not, see <http://www.gnu.org/licenses/>. */ package handlers.itemhandlers; import com.l2jserver.Config; import com.l2jserver.gameserver.model.entity.TvTEvent; import com.l2jserver.gameserver.model.actor.instance.L2PetInstance; import com.l2jserver.gameserver.model.L2ItemInstance; import com.l2jserver.gameserver.model.actor.L2Playable; import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; import com.l2jserver.gameserver.network.SystemMessageId; import com.l2jserver.gameserver.network.serverpackets.SystemMessage; public class ManaPotion extends ItemSkills { /** * * @see com.l2jserver.gameserver.handler.IItemHandler#useItem(com.l2jserver.gameserver.model.actor.L2Playable, com.l2jserver.gameserver.model.L2ItemInstance, boolean) */ @Override public void useItem(L2Playable playable, L2ItemInstance item, boolean forceUse) { L2PcInstance activeChar=(L2PcInstance) playable; boolean isPet = playable instanceof L2PetInstance; if (isPet) activeChar = ((L2PetInstance) playable).getOwner(); else if (playable instanceof L2PcInstance) activeChar = (L2PcInstance) playable; else return; if (!Config.L2JMOD_ENABLE_MANA_POTIONS_SUPPORT) { playable.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.NOTHING_HAPPENED)); return; } if(activeChar.isInOlympiadMode()||!TvTEvent.onScrollUse(playable.getObjectId())) {return;} super.useItem(playable, item, forceUse); if (item.getItemId()==728 && item.getCount()>0&& playable.getPvpFlag() == 0) { double aux = playable.getCurrentMp(); playable.setCurrentMp(playable.getCurrentMp()+800); playable.sendMessage((playable.getCurrentMp()-aux)+"Mana Bonus restored[Not Flaged]"); } } } In this way if a player is flaged he takes 200 if he is not he takes 1000... I hope this helps you:) edited: Updated the 1st version gived mana in oly and tvt...:D
-
i want to make mana potion to give less mana if player is flaged .. i don't know what i do wrong... so please help me: i use the latest l2j revision.. package handlers.itemhandlers; import com.l2jserver.Config; import com.l2jserver.gameserver.model.L2ItemInstance; import com.l2jserver.gameserver.model.actor.L2Playable; import com.l2jserver.gameserver.network.SystemMessageId; import com.l2jserver.gameserver.network.serverpackets.SystemMessage; import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; import com.l2jserver.gameserver.network.serverpackets.MagicSkillUse; public class ManaPotion extends ItemSkills { public void useItem(L2Playable playable, L2ItemInstance item, boolean forceUse) { if (!Config.L2JMOD_ENABLE_MANA_POTIONS_SUPPORT) { playable.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.NOTHING_HAPPENED)); return; } L2PcInstance player = getClient().getActiveChar(); if (player.getPvpFlag() > 0) { L2Skill skill = SkillTable.getInstance().getInfo(10001, 1); player.useMagic(skill, true, false); } else {L2Skill skill = SkillTable.getInstance().getInfo(10003, 1); player.useMagic(skill, true, false); playable.sendMessage("unflaged"); } } } i've try this as well: playable.broadcastPacket(new MagicSkillUse(player, 10001, 1, 0, 0)); THX:) edited:"playable.sendMessage("unflaged");" i see this message but no mana...
-
eclipse compile error
Hardstyle replied to Hardstyle's question in Request Server Development Help [L2J]
l2j..... [zip] Building zip: C:\Users\tica\workspace\L2_GameServer\build\L2J_Server.zip but the problem is not from l2j... cuz i get this error at eny project ... the exclipse i use is the one from the tutorial on mxc .. Edited : Problem fixed ....reinstaled my os with all programs:) thx anyway -
eclipse compile error
Hardstyle replied to Hardstyle's question in Request Server Development Help [L2J]
i get the same error for dp and clean core/dp .... -
Buildfile: C:\Users\tica\workspace\L2_GameServer\build.xml clean: [delete] Deleting directory C:\Users\tica\workspace\L2_GameServer\build verifyRequirements: init: [mkdir] Created dir: C:\Users\tica\workspace\L2_GameServer\build [mkdir] Created dir: C:\Users\tica\workspace\L2_GameServer\build\classes [mkdir] Created dir: C:\Users\tica\workspace\L2_GameServer\build\dist [mkdir] Created dir: C:\Users\tica\workspace\L2_GameServer\build\dist\login [mkdir] Created dir: C:\Users\tica\workspace\L2_GameServer\build\dist\gameserver version: [color=red][exec] Result: 1[/color] compile: [javac] Compiling 1520 source files to C:\Users\tica\workspace\L2_GameServer\build\classes jar: [jar] Building jar: C:\Users\tica\workspace\L2_GameServer\build\l2jserver.jar [jar] Building jar: C:\Users\tica\workspace\L2_GameServer\build\l2jlogin.jar [copy] Copying 1 file to C:\Users\tica\workspace\L2_GameServer\build\dist\login [copy] Copying 1 file to C:\Users\tica\workspace\L2_GameServer\build\dist\gameserver jarsrc: [mkdir] Created dir: C:\Users\tica\workspace\L2_GameServer\build\dist\libs [jar] Building jar: C:\Users\tica\workspace\L2_GameServer\build\dist\libs\l2jserver-src.jar dist: [copy] Copying 1 file to C:\Users\tica\workspace\L2_GameServer\build\dist\login [copy] Copying 1 file to C:\Users\tica\workspace\L2_GameServer\build\dist\gameserver [copy] Copying 13 files to C:\Users\tica\workspace\L2_GameServer\build\dist\libs [copy] Copying 2 files to C:\Users\tica\workspace\L2_GameServer\build\dist\languages [copy] Copying 3 files to C:\Users\tica\workspace\L2_GameServer\build\dist\images [copy] Copying 2 files to C:\Users\tica\workspace\L2_GameServer\build\dist\doc [copy] Copying 9 files to C:\Users\tica\workspace\L2_GameServer\build\dist\doc [copy] Copying 10 files to C:\Users\tica\workspace\L2_GameServer\build\dist\login [copy] Copying 5 files to C:\Users\tica\workspace\L2_GameServer\build\dist\gameserver [mkdir] Created dir: C:\Users\tica\workspace\L2_GameServer\build\dist\gameserver\log [mkdir] Created dir: C:\Users\tica\workspace\L2_GameServer\build\dist\login\log [mkdir] Created dir: C:\Users\tica\workspace\L2_GameServer\build\dist\login\config [copy] Copying 21 files to C:\Users\tica\workspace\L2_GameServer\build\dist\gameserver\config [copy] Copying 3 files to C:\Users\tica\workspace\L2_GameServer\build\dist\login\config [mkdir] Created dir: C:\Users\tica\workspace\L2_GameServer\build\dist\gameserver\data [copy] Copying 1 file to C:\Users\tica\workspace\L2_GameServer\build\dist\gameserver\data [mkdir] Created dir: C:\Users\tica\workspace\L2_GameServer\build\dist\gameserver\data\geodata [copy] Copying 1 file to C:\Users\tica\workspace\L2_GameServer\build\dist\gameserver\data\geodata [mkdir] Created dir: C:\Users\tica\workspace\L2_GameServer\build\dist\gameserver\data\pathnode [copy] Copying 1 file to C:\Users\tica\workspace\L2_GameServer\build\dist\gameserver\data\pathnode [zip] Building zip: C:\Users\tica\workspace\L2_GameServer\build\L2J_Server.zip BUILD SUCCESSFUL Total time: 1 minute 35 seconds it builds succesfuly but becouse of this error when i try to run the server it write's error "cannont find the main class: com.l2jserver.gamserver.Gameserver."... when i click exec it takes me 2 this line : <exec dir="." executable="svnversion" outputproperty="l2j.revision" failifexecutionfails="false"> the project dosn't have any error ...but i think my magic fingers did something wrong:D help pleasE:D
-
just change the imports ... and it is for freya i think... l2j changed the imports with gracia final or fraya... com.l2jserver =freya ......
-
[Share-Gift] HopZone Vote Reward [IT]
Hardstyle replied to extr3me's topic in Server Shares & Files [L2J]
i get a error on : Collection<L2PcInstance> pls = L2World.getInstance().getAllPlayers(); it says L2World.getInstance().getAllPlayers() is a l2world instance ...not l2pcinstance... can some1 help?:| -
I have a problem. Help me plz
Hardstyle replied to danilo10's question in Request Server Development Help [L2J]
go to database in table npcaidata go to your id and change clan and clan range to null and 0 it will fix it... -
Mobs cann't move!
Hardstyle replied to conheonit's question in Request Server Development Help [L2J]
1st post your server version... in l2j at npcaidata there is a column named canmove...check that... -
i need a little help... im scripting a custom quest in py evrything works perfect but the announce dosent appear ...and i realy dont know why... from com.l2jserver.gameserver import Announcements ...................... Announcements.getInstance().announceToAll("xxxxxxxxxxxxxxxxx") other line of code SO: the "other line of code" is working but the announceament dosn't appear...and i don;t get any error sorry problem solved ...this script works the problem was from other part
-
[share] L2J Dialog Maker 1.011 beta 7
Hardstyle replied to szponiasty's topic in Server Development Discussion [L2J]
one suggestion for now: is hard to finde a icon so i suggest a combobox with a seach on it... to see better go to office 2010 and checkthe font combobox i don't know what program u use to compile this tool but here is how i did this thing in vb 2010 ComboFonts.Sorted = True Dim straCollection() As String For Each family In FontFamily.Families If family.IsStyleAvailable(FontStyle.Strikeout) = True Then ReDim Preserve straCollection(x) straCollection(x) = family.Name x += 1 End If Next family ComboFonts.Items.AddRange(straCollection) ComboFonts.AutoCompleteMode = AutoCompleteMode.SuggestAppend ComboFonts.AutoCompleteSource = AutoCompleteSource.CustomSource ComboFonts.AutoCompleteCustomSource.AddRange(straCollection) ComboFonts its the combobox i use for fonts AND A BIG THX FOR THIS TOOL GOOD WORK!!! -
what is worng with a code like this?:) //at the begining private int heroConsecutiveKillCount = 0; //at incrisepvp if (heroConsecutiveKillCount == 100 && !isHero() ) {this.setHero(true);} //at dodie heroConsecutiveKillCount = 0;
-
[Help]Auguments time
Hardstyle replied to l2evidence's question in Request Server Development Help [L2J]
a more simplyer way: put the augumentated weapon to your hand and see the skill name press alt+g and write the name or a part of the name (case sensitive ) press seach skill go to config>character.proprietes and seach for EnableModifySkillDuration = True # Skill duration list # Format: skillid,newtime;skillid2,newtime2... # Example: # This enable 1h(3600) duration for songs, the "\"indicates new line, # and is only set for formating purposes. # SkillDurationList = 264,3600;265,3600;266,3600;267,3600;268,3600;\ # 269,3600;270,3600;304,3600;305,1200;306,3600;308,3600;349,3600;\ # 363,3600;364,3600 SkillDurationList = write the id and the time... u can do the same for reuse .... but i didn't test this.... u need to test it 1st... -
[reuqest]Top Pvp-Pk Manager [Freya]
Hardstyle replied to JiZ's question in Request Server Development Help [L2J]
use the search button... there are many.. here is one http://www.maxcheaters.com/forum/index.php?topic=136602.0 ... -
i don't think so... some npc's can be spown onle 1 time some of them dont have the client side and they are only in data base , some npcs are used for curse a area ore other things,,, and they dont have a visual texture
