-
Posts
67 -
Credits
0 -
Joined
-
Last visited
-
Feedback
0%
Everything posted by admirolas3
-
Shows an error : Parse error: syntax error, unexpected 'ob_start' (T_STRING) in C:\xampp\htdocs\phptext.php on line 21
-
That doc file will be included in a website. So it could be saved in folder or next to a index.php
-
Yes, you are right. $host = ''; //Hosting $user = ''; //Username $pass = ''; //Password $db = ''; //DatabaseName $top = '100'; //Top Number $countpvp = 1; try { $conn = new PDO("mysql:host=$host;dbname=$db", $user, $pass); $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $conn->query("SET NAMES 'utf8'"); } catch(PDOException $e) { echo "Connection failed: " . $e->getMessage(); } header("Content-type: application/vnd.ms-word"); header("Content-Disposition: attachment;Filename=test.doc"); echo " <table> <tr> <th align='left'>Name</th> <th align='right'> </th> <th align='right'>PvP</th> </tr> "; $pvp = "SELECT char_name, pvpkills FROM characters WHERE pvpkills > 0 AND accesslevel <= 0 ORDER by pvpkills DESC LIMIT $top "; $pvp = $conn->prepare($pvp); $pvp->execute(); while($row = $pvp->fetch() ) { $countpvp++; echo " <tr> <td align='left'><span>".$row['char_name']."</span></td> <td align='right'><span> </span></td> <td align='right'>".$row['pvpkills']."</td> </tr> "; } echo " </table> ";
-
Hi, could someone help with .doc file saving to a website ftp. My code is only downloading it to my pc. Can't find any exaples in internet. I want that php would save it to a some folder and if file allready exist it would be reuploaded.
-
Thanks for advice, i am going to search it
-
Hello, maybe someone has a script with Lineage2 rankings, like top pvp, with data update at certain time? I want to use this script ant website, i need that info from databese whould bo stored to website at every 60s? Maybe someone that understands coding really well could give an advice?
-
Help All private stores in one npc
admirolas3 replied to admirolas3's question in Request Server Development Help [L2J]
Still that did not fix the problem. When there is no private stores npc does not show those words. But when i make a shop with character it appears. Maybe it could be a problem with all world players filtrate. When script goes throw all players and dont found at least one with a shop it stops. -
Help All private stores in one npc
admirolas3 replied to admirolas3's question in Request Server Development Help [L2J]
Acis. Last rev shared source -
Help All private stores in one npc
admirolas3 replied to admirolas3's question in Request Server Development Help [L2J]
Ahh, not working, this line checks : if (storeChar.isInStoreMode() && storeChar.getStoreType() == StoreType.SELL) The player who is reading a code is not in a shop, and it cant be shown. What i could edit? Dont know how to get info from all characters that is in world with shops. -
Help All private stores in one npc
admirolas3 replied to admirolas3's question in Request Server Development Help [L2J]
Any ideas? Maybe i should youse other method? -
Help All private stores in one npc
admirolas3 posted a question in Request Server Development Help [L2J]
Hey, i am working on custom npc, that will show private store list of players, by selected category. Example if i select category dagger weapons, npc will show list of available shops with dagger type weapons. I have a little problem, when there is no shops in world, the "No items to show" msg is not shown in npc htm. Maybe someone would know what is bad? For me it's pretty hard. else if (currentCommand.startsWith("category")) { String categoryName = st.nextToken(); final StringBuilder sb = new StringBuilder(200); for (Player storeChar : World.getInstance().getPlayers()) { if (storeChar.isInStoreMode() && storeChar.getStoreType() == StoreType.SELL) { for (TradeItem i : storeChar.getSellList().getItems()) { if (categoryName.startsWith("dagger")) { if(i.getItem().getItemType() == WeaponType.DAGGER){ sb.append("<table width=240 height=42><tr>"); sb.append("<td width=32 height=32 align=center><img src=Icon.item"+i.getItem().getItemId()+" width=32 height=32></td>"); sb.append("<td>" + i.getItem().getName() + "</td>"); sb.append("</tr><tr><td height=7></td></tr></table>"); } else{ sb.append("No items to show"); } } } } final NpcHtmlMessage html = new NpcHtmlMessage(getObjectId()); html.setFile("data/html/auctioneerManager/categoryView.htm"); html.replace("%objectId%", getObjectId()); html.replace("%items%", sb.toString()); player.sendPacket(html); } -
No one knows?
-
I didin't know too :D Tried many different variants ;/
-
It doesn't change website languaage. I am using e107 web system. With the tbox language select, as i posted in first comment it works great, but i want to make that my languages salection would be shown as buttons, not as a list. I need to figure it out, how i can change code that it will work with button type :D
-
Changed to sitelanguage, still no action when pressing button ;/ <button class="btn btn-default button" type="submit" name="sitelanguage" value="'.$languageFolder.'">'.$languageFolder.'</button>
-
i have sitelanguage. Just i dont know how to edit my code for button type selecting language.
-
hi. I have a website, and i want to restyle my language change. Now its picked up by tbov, from list. I want that it would be showed only buttons with language name. Original ( that i tried to convert): $languageList = explode(',', e_LANLIST); sort($languageList); $action = (e_QUERY && ! $_GET['elan']) ? e_SELF.'?'.e_QUERY : e_SELF; $text = ' <form method="post" action="'.$action.'"> <div class="center"> <select name="sitelanguage" class="tbox form-control">'; foreach($languageList as $languageFolder) { $selected = ($languageFolder == e_LANGUAGE) ? ' selected="selected"' : ''; $text .= ' <option value="'.$languageFolder.'"'.$selected.'>'.$languageFolder.'</option>'.$selected.' '.$languageFolder.''; } $text .= ' </select> <br /> <br /> <button class="btn btn-default button" type="submit" name="setlanguage" value="no-value"><span>'.UTHEME_MENU_L1.'</span></button>'; $text .= ' </div> </form>'; And here is mine. Buttons are showed with correct names, but when i press it nothing hapens. $action = (e_QUERY && ! $_GET['elan']) ? e_SELF.'?'.e_QUERY : e_SELF; $text = ' <form method="post" action="'.$action.'"> <div class="center">'; foreach($languageList as $languageFolder) { $text .= ' <button class="btn btn-default button" type="submit" name="setlanguage" value="'.$languageFolder.'">'.$languageFolder.'</button> '; } $text .= ' </div> </form>'; I will aprieciate any help! Thanks :)
-
Help Instance Problem
admirolas3 replied to alextoti13's question in Request Server Development Help [L2J]
What server pack are you using? ClassNotFound - i think imports are bad -
Help Augumentation
admirolas3 replied to ernis12345's question in Request Server Development Help [L2J]
Hi, you can make prices lower or just delete this lines. RequestRefineCancel.java // get the price int price = 0; switch (targetItem.getItem().getCrystalType()) { case L2Item.CRYSTAL_C: if (targetItem.getCrystalCount() < 1720) price = 95000; else if (targetItem.getCrystalCount() < 2452) price = 150000; else price = 210000; break; case L2Item.CRYSTAL_B: if (targetItem.getCrystalCount() < 1746) price = 240000; else price = 270000; break; case L2Item.CRYSTAL_A: if (targetItem.getCrystalCount() < 2160) price = 330000; else if (targetItem.getCrystalCount() < 2824) price = 390000; else price = 420000; break; case L2Item.CRYSTAL_S: price = 480000; break; // any other item type is not augmentable default: activeChar.sendPacket(new ExVariationCancelResult(0)); return; } // try to reduce the players adena - if (!activeChar.reduceAdena("RequestRefineCancel", price, null, true)) - { - activeChar.sendPacket(new ExVariationCancelResult(0)); - return; - } -
Like this? public static void LoadEm() { int z; for (z = 0; z < 31; z++) { Evasion[z] = loadStat("ev",88 + z); Speed[z] = loadStat("walk",z + 88); MAtk[z] = loadStat("matk",z + 88); PAtk[z] = loadStat("patk",z + 88); PDef[z] = loadStat("pdef",z + 88); MDef[z] = loadStat("mdef",z + 88); HP[z] = loadStat("hp",z + 88); CP[z] = loadStat("cp",z + 88); MP[z] = loadStat("mp",z + 88); MAtkSpd[z] = loadStat("matksp",z + 88); PAtkSpd[z] = loadStat("patksp",z + 88); } } public static void sendBalanceWindow(int classId, L2PcInstance p) { NpcHtmlMessage htm = new NpcHtmlMessage(0); htm.setFile("./data/html/admin/balance/balance.htm"); htm.replace("%classId%", classId + ""); htm.replace("%Patk%", BalanceLoad.loadStat("patk",classId) + ""); htm.replace("%Matk%", BalanceLoad.loadStat("matk",classId) + ""); htm.replace("%Pdef%", BalanceLoad.loadStat("pdef",classId) + ""); htm.replace("%Mdef%", BalanceLoad.loadStat("mdef",classId) + ""); htm.replace("%Acc%", BalanceLoad.loadStat("acc",classId) + ""); htm.replace("%Eva%", BalanceLoad.loadStat("ev",classId) + ""); htm.replace("%AtkSp%", BalanceLoad.loadStat("patksp",classId) + ""); htm.replace("%CastSp%", BalanceLoad.loadStat("matksp",classId) + ""); htm.replace("%Cp%", BalanceLoad.loadStat("cp",classId) + ""); htm.replace("%Hp%", BalanceLoad.loadStat("hp",classId) + ""); htm.replace("%Mp%", BalanceLoad.loadStat("mp",classId) + ""); htm.replace("%Speed%", BalanceLoad.loadStat("walk",classId) + ""); p.sendPacket(htm); }
-
Help Acis Staticobjects And Npc Nick Height
admirolas3 replied to admirolas3's question in Request Server Development Help [L2J]
Found DrChaos in lineagenpc2.u. I decrypted this file and opened with UE Explorer. But i can't edit it. /******************************************************************************* * doctor_chaos generated by Eliot.UELib using UE Explorer. * Eliot.UELib © 2009-2013 Eliot van Uytfanghe. All rights reserved. * http://eliotvu.com * * All rights belong to their respective owners. *******************************************************************************/ class doctor_chaos extends LineagePawn; -
Help Acis Staticobjects And Npc Nick Height
admirolas3 replied to admirolas3's question in Request Server Development Help [L2J]
Oh, now i understant, thanks i will try to open lineagenpc2.u file :) -
Help Acis Staticobjects And Npc Nick Height
admirolas3 replied to admirolas3's question in Request Server Development Help [L2J]
Ok, what you think, i find that file or i need to look like yours? This one is lineagenpc2.int -
Help Acis Staticobjects And Npc Nick Height
admirolas3 replied to admirolas3's question in Request Server Development Help [L2J]
I find this [doctor_chaos] WaitAnimName[0]=wait_Hand AtkWaitAnimName[0]=AtkWait_Hand RunAnimName[0]=run_Hand WalkAnimName[0]=walk_Hand NpcSocialAnimName[0]=social01 NpcSocialAnimName[1]=social02 NpcSocialAnimName[2]=spwait01 -
Help Acis Staticobjects And Npc Nick Height
admirolas3 replied to admirolas3's question in Request Server Development Help [L2J]
You are talking about DrChaos.java?