Jump to content

Search the Community

Showing results for tags 'including'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • RuneLocus
    • News & Announcements
    • Information Booth
    • Website Support
    • Introductions
    • Chat
    • Forum Games
  • RuneScape Development
    • RSPS General
    • RuneScape Private Server (RS2)
    • RuneScape Private Server (503+)
    • RuneScape Private Server (EoC 742+)
  • Other
    • Digital Art
    • Gaming
    • Webdevelopment
    • Computers
  • Marketplace
    • RuneScape Market
    • RSPS Market
    • Others Market
    • Freelance Middleman Services
  • Super Secret Club's Topics

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Found 2 results

  1. [CENTER][B][U]MySQL with PHP - The Basics[/U][/B][/CENTER] Incase you missed it, here's the introduction/part 1 for these tutorials that includes the class. [url]http://www.runelocus.com/forums/showthread.php?84642-MySQL-with-PHP-Introduction&p=699529#post699529[/url] In part 2 we are going to cover: [LIST] [*]How to include the MySQL Class [*]How to connect to a database [*]Use the select query/function to retrieve data from the database [/LIST] [B][U]Including the class:[/U][/B] For these tutorials the location to our files will be "tutorials/mysql". In that main folder I'm going to have an index.php page and a folder named "includes" which will have the MySQL class (MySQL.php). Open index.php and modify it so it looks like: [PHP]<?php require_once("includes/MysqlDB.php"); ?>[/PHP] Note: You may want to use an IDE such as Netbeans. It will help you a lot. [U][B]Making the Database:[/B][/U] Now that you have your web server installed and running go to [url]http://localhost/phpmyadmin[/url]. You'll either be logged in automatically or use the credentials you used when setting up Wamp to login. Try the user "root" and leave the password empty. Click the button "Databases" up in the top menu and create a new database called tutorial_mysql [B]Username:[/B] root [B]Host:[/B] localhost (leave blank when in "Add user") [B]Database Name:[/B] tutorial_mysql [B]Password:[/B] Also check the box that says "Create database with same name and grant all privileges". This will just create the database and name it the same as the username (tutorial_mysql). Navigate to your tutorial_mysql database (should be in the left hand, side menu), click on "SQL" and execute the following script: [CODE]CREATE TABLE IF NOT EXISTS `users` ( `id` int(4) NOT NULL AUTO_INCREMENT, `username` varchar(24) NOT NULL, `password` varchar(48) NOT NULL, `email` varchar(100) NOT NULL, `age` int(3) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ; -- -- Dumping data for table `users` -- INSERT INTO `users` (`id`, `username`, `password`, `email`, `age`) VALUES (1, 'Surreal', 'password', '[email protected]', 20);[/CODE] This script will create a table named "users" with a structure including a unique ID, username, password, email and age. I've made an example user already and this should already be in your database. [B][U]Initialize the connection/class:[/U][/B] Now we want to open or initialize the MySQL class and construct it. To do this we will add the following line under require_once...... [PHP]$Db = new MySqlDb('localhost', 'root', '', 'tutorial_mysql');[/PHP] Navigate to the page [url]http://localhost/tutorials/mysql/index.php[/url] and you should have a blank page. If it says "There was a problem connecting to the database" then you've done one of the steps wrong and it can't connect to the database we just made. [B][U]The Select Query:[/U][/B] This function can be used to select and export/get data from a database. This can be used to get all details about someone with the username "Surreal" such as their age and password. Here's an example of what it would look like using our MysqlDB Class. [PHP]$Db->where('id', 1); $results = $Db->get('users');[/PHP] You can add this code under the $Db = .... line. Refresh the index.php page and what do we have..? Nothing! Why? These two lines basically mean to look where the id is equal to 1 in the table called users. The $results variable is now an array that has all the data about the user where id = 1. [I][B]How do I show the data?[/B][/I] Under the $results = .... line add the following code: [PHP]?> <pre> <?php print_r($results); ?></pre><?php[/PHP] But what does it mean? The pre tags are html (they keep the array in a state where white space isn't removed. In other words, it looks nicer.) so we keep them out of the PHP hence the reason we close and open the tags. print_r is a PHP function which, for an array will present the values in a format that shows keys and elements. Refresh your index.php page now. Fancy, eh? Your page should look something like this: [CODE] Array ( [0] => Array ( [id] => 1 [username] => Surreal [password] => password [email] => [email protected] [age] => 20 ) ) [/CODE] This is much easier to read now but not very helpful for a functional site, right? Let's display the username, email and age only on the page. We can use a foreach loop to display only the data we want. We only have one result (unique IDs) so it'll only loop once. If we didn't specify the ID or had multiple users with the same ID, it would display the information for each row/user. [PHP]foreach($results as $row): echo "<h2>Username: ".$row['username']."</h2>"; echo "<div>Email: ".$row['email']."</div>"; echo "<div>Age: ".$row['age']."</div>"; endforeach; [/PHP] You can use this code where the previous code was (this one): [PHP]?> <pre> <?php print_r($results); ?></pre><?php[/PHP] Ahh.... much nicer now: [CODE]Username: Surreal Email: [email protected] Age: 20[/CODE] So, that's about all for the select query/function. If you want to fetch all users all you have to do is remove the $Db->where.... line and the foreach loop will just repeat itself for each user. Handy, right? [B][U]For the next step:[/U][/B] You have to do nothing! Next time we'll be looking at the delete and insert functions. [B][U]To sum up:[/U][/B] We can now manually "insert" data via PHPMyAdmin and display it on our site with just a few lines! Pretty cool, right? This script can be used to build a user login system by making a form in HTML and then using the post variables and seeing if the username exists, if yes, check if the password is correct where username = $_POST['username']. Remember to encrypt your passwords! After following the next tutorial you'll be able to add a registration form and have a complete system in place!
  2. I noticed that, the emotes we're pretty messed up and that they had only up to like ROFL added so I did some editing and all the emotes are working fine now + almost every emote is added. There is a problem with the last 5 ones, like Nature's might and stuff. Those are added but when u click them nothing happends. And the cmd won't return a slotid so they just won't work. The rest will, I believe Dissappear is the only one not added and the clan citadel ones. Ah well, lets start. In EmotesManager.java find: [code]public static int getId(int slotId, int packetId) {[/code] replace that whole method with: [code]public static int getId(int slotId, int packetId) { if(slotId >= 108 && slotId <= 110) { return slotId; } switch(slotId) { case 0: return 2; case 1: return 3; case 2: if(packetId == WorldPacketsDecoder.ACTION_BUTTON1_PACKET) return 4; else return -1; //TODO new bow emote case 3: return 5; case 4: return 6; case 5: return 7; case 6: return 8; case 7: return 9; case 8: return 10; case 9: return 12; case 10: return 11; case 11: return 13; case 12: return 14; case 13: return 15; case 14: return 16; case 15: return 17; case 16: return 18; case 17: return 19; case 18: return 20; case 19: return 21; case 20: return 22; case 21: return 23; case 22: return 24; case 23: return 25; case 24: return 26; case 25: return 27; case 26: return 28; case 27: return 29; case 28: return 30; case 29: return 31; case 30: return 32; case 31: return 33; case 32: return 34; case 33: return 35; case 34: return 36; case 35: return 37; case 36: return 38; case 37: return 39; case 38: return 40; case 39: return 41; case 40: return 42; case 41: return 43; case 42: return 44; case 43: return 45; case 44: return 46; case 45: return 47; case 46: return 48; case 47: return 49; case 48: return 50; case 49: return 51; case 50: return 52; case 51: return 53; case 52: return 54; case 53: return 55; case 54: return 56; case 55: return 57; case 56: return 58; case 57: return 59; case 58: return 60; case 59: return 61; case 60: return 62; case 61: return 63; case 62: return 64; case 63: return 65; case 64: return 66; case 65: return 67; case 66: return 68; case 67: return 69; case 68: return 70; case 69: return 71; case 70: return 72; case 71: return 73; case 72: return 74; case 73: return 75; case 74: return 76; case 75: return 77; case 76: return 78; case 77: return 79; case 78: return 80; case 79: return 81; case 80: return 82; case 81: return 83; case 82: return 84; case 83: return 85; case 84: return 86; case 85: return 87; case 86: return 88; case 87: return 89; case 88: return 90; case 89: return 91; case 90: return 92; case 91: return 93; case 92: return 94; case 93: return 95; case 94: return 96; case 95: return 97; case 96: return 98; case 97: return 99; case 98: return 100; case 99: return 101; case 100: return 102; case 101: return 103; case 102: return 104; case 103: return 105; case 104: return 106; case 105: return 107; case 106: return 108; case 107: return 109; case 108: return 110; default: return -1; } }[/code] Then right under that find this method: [code]public void useBookEmote(int id) {[/code] And replace the whole method with this: [code]public void useBookEmote(int id) { if (player.getAttackedByDelay() + 10000 > Utils.currentTimeMillis()) { player.getPackets().sendGameMessage( "You can't do this while you're under combat."); return; } else if (Utils.currentTimeMillis() < nextEmoteEnd) { player.getPackets().sendGameMessage( "You're already doing an emote!"); return; } if (id == 2) {//Yes player.setNextAnimation(new Animation(855)); } else if (id == 3) {//No player.setNextAnimation(new Animation(856)); } else if (id == 4) {//Bow player.setNextAnimation(new Animation(858)); } else if (id == 5) {//Angry player.setNextAnimation(new Animation(859)); } else if (id == 6) {//Think player.setNextAnimation(new Animation(857)); } else if (id == 7) {//Wave player.setNextAnimation(new Animation(863)); } else if (id == 8) {//Shrug player.setNextAnimation(new Animation(2113)); } else if (id == 9) {//Cheer player.setNextAnimation(new Animation(862)); } else if (id == 10) {//Beckon player.setNextAnimation(new Animation(864)); } else if (id == 12) {//Laugh player.setNextAnimation(new Animation(861)); } else if (id == 11) {//Jump For Joy player.setNextAnimation(new Animation(2109)); } else if (id == 13) {//Yawn player.setNextAnimation(new Animation(2111)); } else if (id == 14) {//Dance player.setNextAnimation(new Animation(866)); } else if (id == 15) {//Jig player.setNextAnimation(new Animation(2106)); } else if (id == 16) {//Twirl player.setNextAnimation(new Animation(2107)); } else if (id == 17) {//Headbang player.setNextAnimation(new Animation(2108)); } else if (id == 18) {//Cry player.setNextAnimation(new Animation(860)); } else if (id == 19) {//Blow kiss player.setNextAnimation(new Animation(1374)); player.setNextGraphics(new Graphics(1702)); } else if (id == 20) {//Panic player.setNextAnimation(new Animation(2105)); } else if (id == 21) {//RaspBerry player.setNextAnimation(new Animation(2110)); } else if (id == 22) {//Clap player.setNextAnimation(new Animation(865)); } else if (id == 23) {//Salute player.setNextAnimation(new Animation(2112)); } else if (id == 24) {//Goblin Bow player.setNextAnimation(new Animation(0x84F)); } else if (id == 25) {//Goblin Salute player.setNextAnimation(new Animation(0x850)); } else if (id == 26) {//Glass Box player.setNextAnimation(new Animation(1131)); } else if (id == 27) {//Climb Rope player.setNextAnimation(new Animation(1130)); } else if (id == 28) {//Lean player.setNextAnimation(new Animation(1129)); } else if (id == 29) {//Glass Wall player.setNextAnimation(new Animation(1128)); } else if (id == 30) {//Idea player.setNextAnimation(new Animation(4275)); } else if (id == 31) {//Stomp player.setNextAnimation(new Animation(1745)); } else if (id == 32) {//Flap player.setNextAnimation(new Animation(4280)); } else if (id == 33) {//Slap Head player.setNextAnimation(new Animation(4276)); } else if (id == 34) {//Zombie Walk player.setNextAnimation(new Animation(3544)); } else if (id == 35) {//Zombie Dance player.setNextAnimation(new Animation(3543)); } else if (id == 36) {//Zombie Hand player.setNextAnimation(new Animation(7272)); player.setNextGraphics(new Graphics(1244)); } else if (id == 37) {//Scared player.setNextAnimation(new Animation(2836)); } else if (id == 38) {//Bunny-hop player.setNextAnimation(new Animation(6111)); } else if (id == 39) {//Skillcapes final int capeId = player.getEquipment().getCapeId(); switch (capeId) { case 9747: case 9748: case 10639: // Attack cape player.setNextAnimation(new Animation(4959)); player.setNextGraphics(new Graphics(823)); break; case 9753: case 9754: case 10641: // Defence cape player.setNextAnimation(new Animation(4961)); player.setNextGraphics(new Graphics(824)); break; case 9750: case 9751: case 10640: // Strength cape player.setNextAnimation(new Animation(4981)); player.setNextGraphics(new Graphics(828)); break; case 9768: case 9769: case 10647: // Hitpoints cape player.setNextAnimation(new Animation(14242)); player.setNextGraphics(new Graphics(2745)); break; case 9756: case 9757: case 10642: // Ranged cape player.setNextAnimation(new Animation(4973)); player.setNextGraphics(new Graphics(832)); break; case 9762: case 9763: case 10644: // Magic cape player.setNextAnimation(new Animation(4939)); player.setNextGraphics(new Graphics(813)); break; case 9759: case 9760: case 10643: // Prayer cape player.setNextAnimation(new Animation(4979)); player.setNextGraphics(new Graphics(829)); break; case 9801: case 9802: case 10658: // Cooking cape player.setNextAnimation(new Animation(4955)); player.setNextGraphics(new Graphics(821)); break; case 9807: case 9808: case 10660: // Woodcutting cape player.setNextAnimation(new Animation(4957)); player.setNextGraphics(new Graphics(822)); break; case 9783: case 9784: case 10652: // Fletching cape player.setNextAnimation(new Animation(4937)); player.setNextGraphics(new Graphics(812)); break; case 9798: case 9799: case 10657: // Fishing cape player.setNextAnimation(new Animation(4951)); player.setNextGraphics(new Graphics(819)); break; case 9804: case 9805: case 10659: // Firemaking cape player.setNextAnimation(new Animation(4975)); player.setNextGraphics(new Graphics(831)); break; case 9780: case 9781: case 10651: // Crafting cape player.setNextAnimation(new Animation(4949)); player.setNextGraphics(new Graphics(818)); break; case 9795: case 9796: case 10656: // Smithing cape player.setNextAnimation(new Animation(4943)); player.setNextGraphics(new Graphics(815)); break; case 9792: case 9793: case 10655: // Mining cape player.setNextAnimation(new Animation(4941)); player.setNextGraphics(new Graphics(814)); break; case 9774: case 9775: case 10649: // Herblore cape player.setNextAnimation(new Animation(4969)); player.setNextGraphics(new Graphics(835)); break; case 9771: case 9772: case 10648: // Agility cape player.setNextAnimation(new Animation(4977)); player.setNextGraphics(new Graphics(830)); break; case 9777: case 9778: case 10650: // Thieving cape player.setNextAnimation(new Animation(4965)); player.setNextGraphics(new Graphics(826)); break; case 9786: case 9787: case 10653: // Slayer cape player.setNextAnimation(new Animation(4967)); player.setNextGraphics(new Graphics(1656)); break; case 9810: case 9811: case 10611: // Farming cape player.setNextAnimation(new Animation(4963)); player.setNextGraphics(new Graphics(825)); break; case 9765: case 9766: case 10645: // Runecrafting cape player.setNextAnimation(new Animation(4947)); player.setNextGraphics(new Graphics(817)); break; case 9789: case 9790: case 10654: // Construction cape player.setNextAnimation(new Animation(4953)); player.setNextGraphics(new Graphics(820)); break; case 12169: case 12170: case 12524: // Summoning cape player.setNextAnimation(new Animation(8525)); player.setNextGraphics(new Graphics(1515)); break; case 9948: case 9949: case 10646: // Hunter cape player.setNextAnimation(new Animation(5158)); player.setNextGraphics(new Graphics(907)); break; case 9813: case 10662: // Quest cape player.setNextAnimation(new Animation(4945)); player.setNextGraphics(new Graphics(816)); break; case 18508: case 18509: // Dungeoneering cape final int rand = (int) (Math.random() * (2 + 1)); player.setNextAnimation(new Animation(13190)); player.setNextGraphics(new Graphics(2442)); WorldTasksManager.schedule(new WorldTask() { int step; [MENTION=15855]Over[/MENTION]ride public void run() { if (step == 1) { player.getAppearence().transformIntoNPC( (rand == 0 ? 11227 : (rand == 1 ? 11228 : 11229))); player.setNextAnimation(new Animation( ((rand > 0 ? 13192 : (rand == 1 ? 13193 : 13194))))); } if (step == 3) { player.getAppearence().transformIntoNPC(-1); stop(); } step++; } }, 0, 1); break; case 19709: case 19710: // Master dungeoneering cape WorldTasksManager.schedule(new WorldTask() { int step; private NPC dung1, dung2, dung3, dung4; [MENTION=15855]Over[/MENTION]ride public void run() { if (step == 1) { player.getAppearence().transformIntoNPC(11229); player.setNextAnimation(new Animation(14608)); dung1 = new NPC(-1, new WorldTile(player.getX(), player.getY() -1, player.getPlane()), -1, true); player.setNextFaceEntity(dung1); dung1.setLocation(dung1); dung1.setNextGraphics(new Graphics(2777)); dung2 = new NPC(-1, new WorldTile(player.getX()+1, player.getY()-1, player.getPlane()), -1, true); } if (step == 2) { player.setNextFaceEntity(null); dung1.finish(); player.getAppearence().transformIntoNPC(11228); dung2.setLocation(dung2); player.setNextAnimation(new Animation(14609)); player.setNextGraphics(new Graphics(2782)); dung2.setNextGraphics(new Graphics(2778)); dung3 = new NPC(-1, new WorldTile(player.getX(), player.getY()-1, player.getPlane()), -1, true); dung4 = new NPC(-1, new WorldTile(player.getX(), player.getY()+1, player.getPlane()), -1, true); } if (step == 3) { dung2.finish(); player.getAppearence().transformIntoNPC(11227); dung3.setLocation(dung3); dung4.setLocation(dung4); dung4.setNextFaceEntity(player); player.setNextAnimation(new Animation(14610)); dung3.setNextGraphics(new Graphics(2779)); dung4.setNextGraphics(new Graphics(2780)); } if (step > 4) { dung4.setNextFaceEntity(null); player.getAppearence().transformIntoNPC(-1); dung3.finish(); dung4.finish(); stop(); } step++; } }, 0, 1); break; case 20763: // Veteran cape if (player.getControlerManager().getControler() != null) { player.getPackets().sendGameMessage("You cannot do this here!"); return; } player.setNextAnimation(new Animation(352)); player.setNextGraphics(new Graphics(1446)); break; case 20765: // Classic cape if (player.getControlerManager().getControler() != null) { player.getPackets().sendGameMessage("You cannot do this here!"); return; } int random = Utils.getRandom(2); player.setNextAnimation(new Animation(122)); player.setNextGraphics(new Graphics(random == 0 ? 1471 : 1466)); break; case 20767: // Max cape if (player.getControlerManager().getControler() != null) { player.getPackets().sendGameMessage("Dont annoy other players!"); return; } int size = NPCDefinitions.getNPCDefinitions(1224).size; WorldTile spawnTile = new WorldTile( new WorldTile(player.getX() + 1, player.getY(), player.getPlane())); if (!World.canMoveNPC(spawnTile.getPlane(), spawnTile.getX(), spawnTile.getY(), size)) { spawnTile = null; int[][] dirs = Utils.getCoordOffsetsNear(size); for (int dir = 0; dir < dirs[0].length; dir++) { final WorldTile tile = new WorldTile(new WorldTile( player.getX() + dirs[0][dir], player.getY() + dirs[1][dir], player.getPlane())); if (World.canMoveNPC(tile.getPlane(), tile.getX(), tile.getY(), size)) { spawnTile = tile; break; } } } if (spawnTile == null) { player.getPackets() .sendGameMessage( "Need more space to perform this skillcape emote."); return; } nextEmoteEnd = Utils.currentTimeMillis() + (25 * 600); final WorldTile npcTile = spawnTile; WorldTasksManager.schedule(new WorldTask() { private int step; private NPC npc; [MENTION=15855]Over[/MENTION]ride public void run() { if (step == 0) { npc = new NPC(1224, npcTile, -1, true); npc.setNextAnimation(new Animation(1434)); npc.setNextGraphics(new Graphics(1482)); player.setNextAnimation(new Animation(1179)); npc.setNextFaceEntity(player); player.setNextFaceEntity(npc); } else if (step == 2) { npc.setNextAnimation(new Animation(1436)); npc.setNextGraphics(new Graphics(1486)); player.setNextAnimation(new Animation(1180)); } else if (step == 3) { npc.setNextGraphics(new Graphics(1498)); player.setNextAnimation(new Animation(1181)); } else if (step == 4) { player.setNextAnimation(new Animation(1182)); } else if (step == 5) { npc.setNextAnimation(new Animation(1448)); player.setNextAnimation(new Animation(1250)); } else if (step == 6) { player.setNextAnimation(new Animation(1251)); player.setNextGraphics(new Graphics(1499)); npc.setNextAnimation(new Animation(1454)); npc.setNextGraphics(new Graphics(1504)); } else if (step == 11) { player.setNextAnimation(new Animation(1291)); player.setNextGraphics(new Graphics(1686)); player.setNextGraphics(new Graphics(1598)); npc.setNextAnimation(new Animation(1440)); } else if (step == 16) { player.setNextFaceEntity(null); npc.finish(); stop(); } step++; } }, 0, 1); break; case 20769: case 20771: // Completionist cape if (!World.canMoveNPC(player.getPlane(), player.getX(), player.getY(), 3)) { player.getPackets() .sendGameMessage( "Need more space to perform this skillcape emote."); return; } else if (player.getControlerManager().getControler() != null) { player.getPackets().sendGameMessage("Dont annoy other players!"); return; } nextEmoteEnd = Utils.currentTimeMillis() + (20 * 600); WorldTasksManager.schedule(new WorldTask() { private int step; [MENTION=15855]Over[/MENTION]ride public void run() { if (step == 0) { player.setNextAnimation(new Animation(356)); player.setNextGraphics(new Graphics(307)); } else if (step == 2) { player.getAppearence().transformIntoNPC( capeId == 20769 ? 1830 : 3372); player.setNextAnimation(new Animation(1174)); player.setNextGraphics(new Graphics(1443)); } else if (step == 4) { player.getPackets().sendCameraShake(3, 25, 50, 25, 50); } else if (step == 5) { player.getPackets().sendStopCameraShake(); } else if (step == 8) { player.getAppearence().transformIntoNPC(-1); player.setNextAnimation(new Animation(1175)); stop(); } step++; } }, 0, 1); break; default: player.getPackets() .sendGameMessage( "You need to be wearing a skillcape in order to perform this emote."); break; } return; } else if (id == 40) {//Snowman Dance player.setNextAnimation(new Animation(7531)); } else if (id == 41) {//Air Guitar player.setNextAnimation(new Animation(2414)); player.setNextGraphics(new Graphics(1537)); player.getPackets().sendMusicEffect(302); } else if (id == 42) {//Safety First player.setNextAnimation(new Animation(8770)); player.setNextGraphics(new Graphics(1553)); } else if (id == 43) {//Explore player.setNextAnimation(new Animation(9990)); player.setNextGraphics(new Graphics(1734)); } else if (id == 44) {//Trick player.setNextAnimation(new Animation(10530)); player.setNextGraphics(new Graphics(1864)); } else if (id == 45) {//Freeze player.setNextAnimation(new Animation(11044)); player.setNextGraphics(new Graphics(1973)); } else if (id == 46) {//Give Thanks WorldTasksManager.schedule(new WorldTask() { [MENTION=15855]Over[/MENTION]ride public void run() { if (step == 0) { player.setNextAnimation(new Animation(10994)); player.setNextGraphics(new Graphics(86)); } else if (step == 1) { player.setNextAnimation(new Animation(10996)); player.getAppearence().transformIntoNPC(8499); } else if (step == 6) { player.setNextAnimation(new Animation(10995)); player.setNextGraphics(new Graphics(86)); player.getAppearence().transformIntoNPC(-1); stop(); } step++; } private int step; }, 0, 1); } else if (id == 47) {//Around the world in Eggy days player.setNextAnimation(new Animation(11542)); player.setNextGraphics(new Graphics(2037)); } else if (id == 48) {//Dramatic Point player.setNextAnimation(new Animation(12658)); player.setNextGraphics(new Graphics(780)); } else if (id == 49) {//Faint player.setNextAnimation(new Animation(14165)); } else if(id == 50) {//Puppet Master player.setNextAnimation(new Animation(14869)); player.setNextGraphics(new Graphics(2837)); } else if (id == 51) {//Taskmaster player.setNextAnimation(new Animation(15033)); //Male //player.setNextAnimation(new Animation(15034)); //Female player.setNextGraphics(new Graphics(2930)); } else if (id == 52) {// Seal Of Approval WorldTasksManager.schedule(new WorldTask() { int random = (int) (Math.random() * (2 + 1)); [MENTION=15855]Over[/MENTION]ride public void run() { if (step == 0) { player.setNextAnimation(new Animation(15104)); player.setNextGraphics(new Graphics(1287)); } else if (step == 1) { player.setNextAnimation(new Animation(15106)); player.getAppearence().transformIntoNPC( random == 0 ? 13255 : (random == 1 ? 13256 : 13257)); } else if (step == 2) { player.setNextAnimation(new Animation(15108)); } else if (step == 3) { player.setNextAnimation(new Animation(15105)); player.setNextGraphics(new Graphics(1287)); player.getAppearence().transformIntoNPC(-1); stop(); } step++; } private int step; }, 0, 1); } else if (id == 53) {//Cat fight player.setNextAnimation(new Animation(2252)); } else if (id == 54) {//Talk to the Hand player.setNextAnimation(new Animation(2416)); } else if (id == 55) {//Shake Hands player.setNextAnimation(new Animation(2303)); } else if (id == 56) {//High Five player.setNextAnimation(new Animation(2312)); } else if (id == 57) {//Face-palm player.setNextAnimation(new Animation(2254)); } else if (id == 58) {//Surrender player.setNextAnimation(new Animation(2360)); } else if (id == 59) {//Levitate player.setNextAnimation(new Animation(2327)); } else if (id == 60) {//Muscle-man Pose player.setNextAnimation(new Animation(2566)); } else if (id == 61) {//ROFL player.setNextAnimation(new Animation(2347)); } else if (id == 62) {//Breathe Fire player.setNextAnimation(new Animation(2238)); player.setNextGraphics(new Graphics(358)); } else if (id == 63) {//Storm player.setNextAnimation(new Animation(2563)); player.setNextGraphics(new Graphics(365)); } else if (id == 64) {//Snow player.setNextAnimation(new Animation(2417)); player.setNextGraphics(new Graphics(364)); } else if (id == 65) {//Invoke Spring player.setNextAnimation(new Animation(15357)); player.setNextGraphics(new Graphics(1391)); } else if (id == 66) {//Head in sand player.setNextAnimation(new Animation(12926)); player.setNextGraphics(new Graphics(1761)); } else if (id == 67) {//Hula-hoop player.setNextAnimation(new Animation(12928)); } else if (id == 68) {//Disappear } else if (id == 69) {//Ghost player.setNextAnimation(new Animation(12932)); player.setNextGraphics(new Graphics(1762)); } else if (id == 70) {//Bring It! player.setNextAnimation(new Animation(12934)); } else if (id == 71) {//Palm-fist player.setNextAnimation(new Animation(12931)); } else if (id == 72) {//Kneel } else if (id == 73) {//Begging } else if (id == 74) {//Stir Cauldron } else if (id == 75) {//Cheer } else if (id == 76) {//Tantrum } else if (id == 77) {//Dramatic Death } else if (id == 78) {//Jump & Yell } else if (id == 79) {//Point } else if (id == 80) {//Punch } else if (id == 81) {//Raise Hand } else if (id == 82) {//Make Speach } else if (id == 83) {//Sword Fight } else if (id == 84) {//Raise Hand (Sitting) } else if (id == 85) {//Wave (Sitting) } else if (id == 86) {//Cheer (Sitting) } else if (id == 87) {//Throw Tomato (Sitting) } else if (id == 88) {//Throw Flowers (Sitting) } else if (id == 89) {//Agree (Sitting) } else if (id == 90) {//Point (Sitting) } else if (id == 91) {//Whistle (Sitting) } else if (id == 92) {//Thumbs-Up (Sitting) } else if (id == 93) {//Thumbs-Down (Sitting) } else if (id == 94) {//Clap (Sitting) } else if (id == 95) {//Living on borrowed time if (!World.canMoveNPC(player.getPlane(), player.getX(), player.getY(), 3)) { player.getPackets() .sendGameMessage( "Need more space to perform this skillcape emote."); return; } else if (player.getControlerManager().getControler() != null) { player.getPackets().sendGameMessage("Dont annoy other players!"); return; } final NPC n = new NPC(14388, new WorldTile(player.getX(), player.getY() + 2, player.getPlane()), 0, false); n.setLocation(n); n.setNextFaceEntity(player); player.setNextFaceEntity(n); WorldTasksManager.schedule(new WorldTask() { int emote = 10; [MENTION=15855]Over[/MENTION]ride public void run() { if (emote <= 0 || player.hasFinished()) { this.stop(); } if (emote == 10) { n.setNextAnimation(new Animation(13964)); player.setNextGraphics(new Graphics(1766)); player.setNextAnimation(new Animation(13965)); } if (emote == 1) { n.setFinished(true); World.removeNPC(n); n.setNextFaceEntity(null); } if (emote == 0) { player.setNextForceTalk(new ForceTalk("Phew! Close call.")); player.setNextFaceEntity(null); emote = 0; } if (emote > 0) { emote--; } } }, 1, 1); } else if (id == 96) {//Troubadour dance player.setNextAnimation(new Animation(15424)); } else if (id == 97) {//Evil Laugh player.setNextAnimation(new Animation(15535));//Male //player.setNextAnimation(new Animation(15536));//Female } else if (id == 98) {//Golf Clap player.setNextAnimation(new Animation(15520)); } else if (id == 99) {//LOLcano player.setNextAnimation(new Animation(15532));//Male //player.setNextAnimation(new Animation(15533));//Female player.setNextGraphics(new Graphics(2191)); } else if (id == 100) {//Infernal power player.setNextAnimation(new Animation(15529)); player.setNextGraphics(new Graphics(2197)); } else if (id == 101) {//Divine power player.setNextAnimation(new Animation(15524)); player.setNextGraphics(new Graphics(2195)); } else if (id == 102) {//You're dead player.setNextAnimation(new Animation(14195)); } else if (id == 103) {//Scream player.setNextAnimation(new Animation(15526));//Male //player.setNextAnimation(new Animation(15527));//Female } else if (id == 104) {//Tornado player.setNextAnimation(new Animation(15530)); player.setNextGraphics(new Graphics(2196)); } else if (id == 105) {//Chaotic cookery player.setNextAnimation(new Animation(15604)); player.setNextGraphics(new Graphics(2239)); } else if (id == 106) {//ROFLCopter player.setNextAnimation(new Animation(16373)); //Male //player.setNextAnimation(new Animation(16374)); //Female player.setNextGraphics(new Graphics(3010)); } else if (id == 107) {//Nature's Might player.setNextAnimation(new Animation(16376)); player.setNextGraphics(new Graphics(3011)); } else if (id == 108) {//Inner Power player.setNextAnimation(new Animation(16382)); player.setNextGraphics(new Graphics(3014)); } else if (id == 109) { //Werewolf transformation player.setNextAnimation(new Animation(16380)); player.setNextGraphics(new Graphics(3013)); player.setNextGraphics(new Graphics(3016)); } else if (id == 110) {//Celebrate player.setNextAnimation(new Animation(16913)); } setNextEmoteEnd(); }[/code] Now in Player.java find the Run method and in that add: [code]for (int i = 0; i < 150; i++) getPackets().sendIComponentSettings(590, i, 0, 190, 2150);[/code] And that's it. Save & compile and u got an almost fully working emote tab. ANOTHER EDIT: Note that this does not unlock the emotes, they are still dark coloured but you can perform them. Thanks Tyler Hurst from R-s for the fix on the unclickable emotes. Thanks Korasi pr0dx for the last gfx on the werewolf transformation
×