Thread: Clicking an object does nothing?

Results 1 to 9 of 9
  1. #1 Clicking an object does nothing? 
    Extreme Donator

    King_'s Avatar
    Join Date
    Jul 2010
    Age
    23
    Posts
    278
    Thanks given
    84
    Thanks received
    24
    Rep Power
    88
    Hey guys,

    I've downloaded lost valentinos 108# client and server as I was gunna use it as a base for a side project, only this is when I click an object it doesn't do anything..

    Example: I click the bank and it don't show the interface even though in actionhandler I have the bank ids and the code too show the interface.

    It happens too all object that I try too interact with, anyone have any ideas?
    I've looked over the 10 pages on the post and no one is having the same issue.

    EDIT: I've just tried it with a different source and still nothing so I'm guessing it's client sided?
    Reply With Quote  
     

  2. #2  
    Registered Member
    arch337's Avatar
    Join Date
    Sep 2008
    Posts
    1,896
    Thanks given
    94
    Thanks received
    142
    Rep Power
    113
    Something in your code makes it not go all the way to your object click code.


    "A fail act is something you do regular, but a dumb act is something you can learn from"
    Spoiler for Problem?:
    Reply With Quote  
     

  3. #3  
    Extreme Donator

    King_'s Avatar
    Join Date
    Jul 2010
    Age
    23
    Posts
    278
    Thanks given
    84
    Thanks received
    24
    Rep Power
    88
    Quote Originally Posted by arch337 View Post
    Something in your code makes it not go all the way to your object click code.
    Would you know what that would be? If so can you point me in the right direction?
    Reply With Quote  
     

  4. #4  
    Registered Member
    arch337's Avatar
    Join Date
    Sep 2008
    Posts
    1,896
    Thanks given
    94
    Thanks received
    142
    Rep Power
    113
    Quote Originally Posted by King_ View Post
    Would you know what that would be? If so can you point me in the right direction?
    It will be hard to point you to the issue with no code.


    "A fail act is something you do regular, but a dumb act is something you can learn from"
    Spoiler for Problem?:
    Reply With Quote  
     

  5. #5  
    Extreme Donator

    King_'s Avatar
    Join Date
    Jul 2010
    Age
    23
    Posts
    278
    Thanks given
    84
    Thanks received
    24
    Rep Power
    88
    Quote Originally Posted by arch337 View Post
    It will be hard to point you to the issue with no code.

    What classes do you need?
    Reply With Quote  
     

  6. #6  
    Registered Member
    arch337's Avatar
    Join Date
    Sep 2008
    Posts
    1,896
    Thanks given
    94
    Thanks received
    142
    Rep Power
    113
    Quote Originally Posted by King_ View Post
    What classes do you need?
    Well if it is about first click object then that class file.


    "A fail act is something you do regular, but a dumb act is something you can learn from"
    Spoiler for Problem?:
    Reply With Quote  
     

  7. #7  
    Extreme Donator

    King_'s Avatar
    Join Date
    Jul 2010
    Age
    23
    Posts
    278
    Thanks given
    84
    Thanks received
    24
    Rep Power
    88
    Quote Originally Posted by arch337 View Post
    Well if it is about first click object then that class file.
    I thought it may have been client side :/

    Bank I'm using is 10517, but like I said no objects work at all

    Code:
    package server.model.players;
    
    import server.Config;
    import server.Server;
    import server.model.objects.Object;
    import server.util.Misc;
    import server.util.ScriptManager;
    
    public class ActionHandler {
    
    	private Client c;
    
    	public ActionHandler(Client Client) {
    		this.c = Client;
    	}
    
    	public void firstClickObject(int objectType, int obX, int obY) {
    		c.clickObjectType = 0;
    		// c.sendMessage("Object type: " + objectType);
    		switch (objectType) {
    		case 2492:
    			if (c.killCount >= 20) {
    				c.getDH().sendOption4("Armadyl", "Bandos", "Saradomin",
    						"Zamorak");
    				c.dialogueAction = 20;
    			} else {
    				c.sendMessage("You need 20 kill count before teleporting to a boss chamber.");
    			}
    			break;
    
    		case 2213:
    		case 14367:
    		case 11758:
    		case 3193:
    		case 10517:
    		case 10516:
    			c.getPA().openUpBank();
    			break;
    			
    		case 1765:
    			c.getPA().movePlayer(3067, 10256, 0);
    			break;
    		case 2882:
    		case 2883:
    			if (c.objectX == 3268) {
    				if (c.absX < c.objectX) {
    					c.getPA().walkTo(1, 0);
    				} else {
    					c.getPA().walkTo(-1, 0);
    				}
    			}
    			break;
    		case 272:
    			c.getPA().movePlayer(c.absX, c.absY, 1);
    			break;
    
    		case 273:
    			c.getPA().movePlayer(c.absX, c.absY, 0);
    			break;
    		case 245:
    			c.getPA().movePlayer(c.absX, c.absY + 2, 2);
    			break;
    		case 246:
    			c.getPA().movePlayer(c.absX, c.absY - 2, 1);
    			break;
    		case 1766:
    			c.getPA().movePlayer(3016, 3849, 0);
    			break;
    		case 6552:
    			if (c.playerMagicBook == 0) {
    				c.playerMagicBook = 1;
    				c.setSidebarInterface(6, 12855);
    				c.sendMessage("An ancient wisdomin fills your mind.");
    				c.getPA().resetAutocast();
    			} else {
    				c.setSidebarInterface(6, 1151); // modern
    				c.playerMagicBook = 0;
    				c.sendMessage("You feel a drain on your memory.");
    				c.autocastId = -1;
    				c.getPA().resetAutocast();
    			}
    			break;
    
    		case 410:
    			if (c.playerMagicBook == 0) {
    				c.playerMagicBook = 2;
    				c.setSidebarInterface(6, 29999);
    				c.sendMessage("Lunar wisdom fills your mind.");
    				c.getPA().resetAutocast();
    			} else {
    				c.setSidebarInterface(6, 1151); // modern
    				c.playerMagicBook = 0;
    				c.sendMessage("You feel a drain on your memory.");
    				c.autocastId = -1;
    				c.getPA().resetAutocast();
    			}
    			break;
    
    		case 1816:
    			c.getPA().startTeleport2(2271, 4680, 0);
    			break;
    		case 1817:
    			c.getPA().startTeleport(3067, 10253, 0, "modern");
    			break;
    		case 1814:
    			// ardy lever
    			c.getPA().startTeleport(3153, 3923, 0, "modern");
    			break;
    
    		case 9356:
    			// c.getPA().enterCaves();
    			c.sendMessage("Temporarily removed due to bugs.");
    			break;
    		case 1733:
    			c.getPA().movePlayer(c.absX, c.absY + 6393, 0);
    			break;
    
    		case 1734:
    			c.getPA().movePlayer(c.absX, c.absY - 6396, 0);
    			break;
    
    		case 9357:
    			c.getPA().resetTzhaar();
    			break;
    
    		case 8959:
    			if (c.getX() == 2490 && (c.getY() == 10146 || c.getY() == 10148)) {
    				if (c.getPA().checkForPlayer(2490,
    						c.getY() == 10146 ? 10148 : 10146)) {
    					new Object(6951, c.objectX, c.objectY, c.heightLevel, 1,
    							10, 8959, 15);
    				}
    			}
    			break;
    
    		
    
    		case 10177:
    			c.getPA().movePlayer(1890, 4407, 0);
    			break;
    		case 10230:
    			c.getPA().movePlayer(2900, 4449, 0);
    			break;
    		case 10229:
    			c.getPA().movePlayer(1912, 4367, 0);
    			break;
    		case 2623:
    			if (c.absX >= c.objectX)
    				c.getPA().walkTo(-1, 0);
    			else
    				c.getPA().walkTo(1, 0);
    			break;
    		// pc boat
    		case 14315:
    			c.getPA().movePlayer(2661, 2639, 0);
    			break;
    		case 14314:
    			c.getPA().movePlayer(2657, 2639, 0);
    			break;
    
    		case 1596:
    		case 1597:
    			if (c.getY() >= c.objectY)
    				c.getPA().walkTo(0, -1);
    			else
    				c.getPA().walkTo(0, 1);
    			break;
    
    		case 14235:
    		case 14233:
    			if (c.objectX == 2670)
    				if (c.absX <= 2670)
    					c.absX = 2671;
    				else
    					c.absX = 2670;
    			if (c.objectX == 2643)
    				if (c.absX >= 2643)
    					c.absX = 2642;
    				else
    					c.absX = 2643;
    			if (c.absX <= 2585)
    				c.absY += 1;
    			else
    				c.absY -= 1;
    			c.getPA().movePlayer(c.absX, c.absY, 0);
    			break;
    
    		case 14829:
    		case 14830:
    		case 14827:
    		case 14828:
    		case 14826:
    		case 14831:
    			// Server.objectHandler.startObelisk(objectType);
    			Server.objectManager.startObelisk(objectType);
    			break;
    		case 4387:
    			// Server.castleWars.joinWait(c,1);
    			break;
    
    		case 4388:
    			// Server.castleWars.joinWait(c,2);
    			break;
    
    		case 4408:
    			// Server.castleWars.joinWait(c,3);
    			break;
    
    		case 9369:
    			if (c.getY() > 5175)
    				c.getPA().movePlayer(2399, 5175, 0);
    			else
    				c.getPA().movePlayer(2399, 5177, 0);
    			break;
    
    		case 9368:
    			if (c.getY() < 5169) {
    				Server.fightPits.removePlayerFromPits(c.playerId);
    				c.getPA().movePlayer(2399, 5169, 0);
    			}
    			break;
    		case 4411:
    		case 4415:
    		case 4417:
    		case 4418:
    		case 4419:
    		case 4420:
    		case 4469:
    		case 4470:
    		case 4911:
    		case 4912:
    		case 1747:
    		case 1757:
    			// Server.castleWars.handleObjects(c, objectType, obX, obY);
    			break;
    
    		case 2286:
    		case 154:
    		case 4058:
    		case 2295:
    		case 2285:
    		case 2313:
    		case 2312:
    		case 2314:
    			c.getAgility().handleGnomeCourse(objectType, obX, obY);
    			break;
    
    			/*
    			 * Barrows Chest
    			 */
    		case 10284:
    			if (c.barrowsKillCount < 5) {
    				c.sendMessage("You haven't killed all the brothers");
    			}
    			if (c.barrowsKillCount == 5
    					&& c.barrowsNpcs[c.randomCoffin][1] == 1) {
    				c.sendMessage("I have already summoned this npc.");
    			}
    			if (c.barrowsNpcs[c.randomCoffin][1] == 0
    					&& c.barrowsKillCount >= 5) {
    				Server.npcHandler.spawnNpc(c, c.barrowsNpcs[c.randomCoffin][0],
    						3551, 9694 - 1, 0, 0, 120, 30, 200, 200, true, true);
    				c.barrowsNpcs[c.randomCoffin][1] = 1;
    			}
    			if ((c.barrowsKillCount > 5 || c.barrowsNpcs[c.randomCoffin][1] == 2)
    					&& c.getItems().freeSlots() >= 2) {
    				c.getPA().resetBarrows();
    				c.getItems().addItem(c.getPA().randomRunes(),
    						Misc.random(150) + 100);
    				if (Misc.random(2) == 1)
    					c.getItems().addItem(c.getPA().randomBarrows(), 1);
    				c.getPA().startTeleport(3564, 3288, 0, "modern");
    			} else if (c.barrowsKillCount > 5 && c.getItems().freeSlots() <= 1) {
    				c.sendMessage("You need at least 2 inventory slot opened.");
    			}
    			break;
    		/*
    		 * Doors
    		 */
    		case 6749:
    			if (obX == 3562 && obY == 9678) {
    				c.getPA().object(3562, 9678, 6749, -3, 0);
    				c.getPA().object(3562, 9677, 6730, -1, 0);
    			} else if (obX == 3558 && obY == 9677) {
    				c.getPA().object(3558, 9677, 6749, -1, 0);
    				c.getPA().object(3558, 9678, 6730, -3, 0);
    			}
    			break;
    		case 6730:
    			if (obX == 3558 && obY == 9677) {
    				c.getPA().object(3562, 9678, 6749, -3, 0);
    				c.getPA().object(3562, 9677, 6730, -1, 0);
    			} else if (obX == 3558 && obY == 9678) {
    				c.getPA().object(3558, 9677, 6749, -1, 0);
    				c.getPA().object(3558, 9678, 6730, -3, 0);
    			}
    			break;
    		case 6727:
    			if (obX == 3551 && obY == 9684) {
    				c.sendMessage("You cant open this door..");
    			}
    			break;
    		case 6746:
    			if (obX == 3552 && obY == 9684) {
    				c.sendMessage("You cant open this door..");
    			}
    			break;
    		case 6748:
    			if (obX == 3545 && obY == 9678) {
    				c.getPA().object(3545, 9678, 6748, -3, 0);
    				c.getPA().object(3545, 9677, 6729, -1, 0);
    			} else if (obX == 3541 && obY == 9677) {
    				c.getPA().object(3541, 9677, 6748, -1, 0);
    				c.getPA().object(3541, 9678, 6729, -3, 0);
    			}
    			break;
    		case 6729:
    			if (obX == 3545 && obY == 9677) {
    				c.getPA().object(3545, 9678, 6748, -3, 0);
    				c.getPA().object(3545, 9677, 6729, -1, 0);
    			} else if (obX == 3541 && obY == 9678) {
    				c.getPA().object(3541, 9677, 6748, -1, 0);
    				c.getPA().object(3541, 9678, 6729, -3, 0);
    			}
    			break;
    		case 6726:
    			if (obX == 3534 && obY == 9684) {
    				c.getPA().object(3534, 9684, 6726, -4, 0);
    				c.getPA().object(3535, 9684, 6745, -2, 0);
    			} else if (obX == 3535 && obY == 9688) {
    				c.getPA().object(3535, 9688, 6726, -2, 0);
    				c.getPA().object(3534, 9688, 6745, -4, 0);
    			}
    			break;
    		case 6745:
    			if (obX == 3535 && obY == 9684) {
    				c.getPA().object(3534, 9684, 6726, -4, 0);
    				c.getPA().object(3535, 9684, 6745, -2, 0);
    			} else if (obX == 3534 && obY == 9688) {
    				c.getPA().object(3535, 9688, 6726, -2, 0);
    				c.getPA().object(3534, 9688, 6745, -4, 0);
    			}
    			break;
    		case 6743:
    			if (obX == 3545 && obY == 9695) {
    				c.getPA().object(3545, 9694, 6724, -1, 0);
    				c.getPA().object(3545, 9695, 6743, -3, 0);
    			} else if (obX == 3541 && obY == 9694) {
    				c.getPA().object(3541, 9694, 6724, -1, 0);
    				c.getPA().object(3541, 9695, 6743, -3, 0);
    			}
    			break;
    		case 6724:
    			if (obX == 3545 && obY == 9694) {
    				c.getPA().object(3545, 9694, 6724, -1, 0);
    				c.getPA().object(3545, 9695, 6743, -3, 0);
    			} else if (obX == 3541 && obY == 9695) {
    				c.getPA().object(3541, 9694, 6724, -1, 0);
    				c.getPA().object(3541, 9695, 6743, -3, 0);
    			}
    			break;
    		/*
    		 * Cofins
    		 */
    		case 6707: // verac
    			c.getPA().movePlayer(3556, 3298, 0);
    			break;
    
    		case 20772:
    			if (server.model.minigames.Barrows.selectCoffin(c, objectType)) {
    				return;
    			}
    			if (c.barrowsNpcs[0][1] == 0) {
    				Server.npcHandler.spawnNpc(c, 2030, c.getX(), c.getY() - 1, -1,
    						0, 120, 25, 200, 200, true, true);
    				c.barrowsNpcs[0][1] = 1;
    			} else {
    				c.sendMessage("You have already searched in this sarcophagus.");
    			}
    			break;
    
    		case 6706: // torag
    			c.getPA().movePlayer(3553, 3283, 0);
    			break;
    
    		case 6772:
    			if (server.model.minigames.Barrows.selectCoffin(c, objectType)) {
    				return;
    			}
    			if (c.barrowsNpcs[1][1] == 0) {
    				Server.npcHandler.spawnNpc(c, 2029, c.getX() + 1, c.getY(), -1,
    						0, 120, 20, 200, 200, true, true);
    				c.barrowsNpcs[1][1] = 1;
    			} else {
    				c.sendMessage("You have already searched in this sarcophagus.");
    			}
    			break;
    
    		case 6705: // karil stairs
    			c.getPA().movePlayer(3565, 3276, 0);
    			break;
    		case 6822:
    			if (server.model.minigames.Barrows.selectCoffin(c, objectType)) {
    				return;
    			}
    			if (c.barrowsNpcs[2][1] == 0) {
    				Server.npcHandler.spawnNpc(c, 2028, c.getX(), c.getY() - 1, -1,
    						0, 90, 17, 200, 200, true, true);
    				c.barrowsNpcs[2][1] = 1;
    			} else {
    				c.sendMessage("You have already searched in this sarcophagus.");
    			}
    			break;
    
    		case 6704: // guthan stairs
    			c.getPA().movePlayer(3578, 3284, 0);
    			break;
    		case 6773:
    			if (server.model.minigames.Barrows.selectCoffin(c, objectType)) {
    				return;
    			}
    			if (c.barrowsNpcs[3][1] == 0) {
    				Server.npcHandler.spawnNpc(c, 2027, c.getX(), c.getY() - 1, -1,
    						0, 120, 23, 200, 200, true, true);
    				c.barrowsNpcs[3][1] = 1;
    			} else {
    				c.sendMessage("You have already searched in this sarcophagus.");
    			}
    			break;
    
    		case 6703: // dharok stairs
    			c.getPA().movePlayer(3574, 3298, 0);
    			break;
    		case 6771:
    			if (server.model.minigames.Barrows.selectCoffin(c, objectType)) {
    				return;
    			}
    			if (c.barrowsNpcs[4][1] == 0) {
    				Server.npcHandler.spawnNpc(c, 2026, c.getX(), c.getY() - 1, -1,
    						0, 120, 45, 250, 250, true, true);
    				c.barrowsNpcs[4][1] = 1;
    			} else {
    				c.sendMessage("You have already searched in this sarcophagus.");
    			}
    			break;
    
    		case 6702: // ahrim stairs
    			c.getPA().movePlayer(3565, 3290, 0);
    			break;
    		case 6821:
    			if (server.model.minigames.Barrows.selectCoffin(c, objectType)) {
    				return;
    			}
    			if (c.barrowsNpcs[5][1] == 0) {
    				Server.npcHandler.spawnNpc(c, 2025, c.getX(), c.getY() - 1, -1,
    						0, 90, 19, 200, 200, true, true);
    				c.barrowsNpcs[5][1] = 1;
    			} else {
    				c.sendMessage("You have already searched in this sarcophagus.");
    			}
    			break;
    
    		case 1276:
    		case 1278:// trees
    			c.woodcut[0] = 1511;
    			c.woodcut[1] = 1;
    			c.woodcut[2] = 25;
    			c.getWoodcutting().startWoodcutting(c.woodcut[0], c.woodcut[1],
    					c.woodcut[2]);
    			break;
    
    		case 1281: // oak
    			c.woodcut[0] = 1521;
    			c.woodcut[1] = 15;
    			c.woodcut[2] = 37;
    			c.getWoodcutting().startWoodcutting(c.woodcut[0], c.woodcut[1],
    					c.woodcut[2]);
    			break;
    
    		case 1308: // willow
    			c.woodcut[0] = 1519;
    			c.woodcut[1] = 30;
    			c.woodcut[2] = 68;
    			c.getWoodcutting().startWoodcutting(c.woodcut[0], c.woodcut[1],
    					c.woodcut[2]);
    			break;
    
    		case 1307: // maple
    			c.woodcut[0] = 1517;
    			c.woodcut[1] = 45;
    			c.woodcut[2] = 100;
    			c.getWoodcutting().startWoodcutting(c.woodcut[0], c.woodcut[1],
    					c.woodcut[2]);
    			break;
    
    		case 1309: // yew
    			c.woodcut[0] = 1515;
    			c.woodcut[1] = 60;
    			c.woodcut[2] = 175;
    			c.getWoodcutting().startWoodcutting(c.woodcut[0], c.woodcut[1],
    					c.woodcut[2]);
    			break;
    
    		case 1306: // yew
    			c.woodcut[0] = 1513;
    			c.woodcut[1] = 75;
    			c.woodcut[2] = 250;
    			c.getWoodcutting().startWoodcutting(c.woodcut[0], c.woodcut[1],
    					c.woodcut[2]);
    			break;
    
    		case 2090:// copper
    		case 2091:
    			c.mining[0] = 436;
    			c.mining[1] = 1;
    			c.mining[2] = 18;
    			c.getMining().startMining(c.mining[0], c.mining[1], c.mining[2]);
    			break;
    
    		case 2094:// tin
    			c.mining[0] = 438;
    			c.mining[1] = 1;
    			c.mining[2] = 18;
    			c.getMining().startMining(c.mining[0], c.mining[1], c.mining[2]);
    			break;
    
    		case 145856:
    		case 2092:
    		case 2093: // iron
    			c.mining[0] = 440;
    			c.mining[1] = 15;
    			c.mining[2] = 35;
    			c.getMining().startMining(c.mining[0], c.mining[1], c.mining[2]);
    			break;
    
    		case 14850:
    		case 14851:
    		case 14852:
    		case 2096:
    		case 2097: // coal
    			c.mining[0] = 453;
    			c.mining[1] = 30;
    			c.mining[2] = 50;
    			c.getMining().startMining(c.mining[0], c.mining[1], c.mining[2]);
    			break;
    
    		case 2098:
    		case 2099:
    			c.mining[0] = 444;
    			c.mining[1] = 40;
    			c.mining[2] = 65;
    			c.getMining().startMining(c.mining[0], c.mining[1], c.mining[2]);
    			break;
    
    		case 2102:
    		case 2103:
    		case 14853:
    		case 14854:
    		case 14855: // mith ore
    			c.mining[0] = 447;
    			c.mining[1] = 55;
    			c.mining[2] = 80;
    			c.getMining().startMining(c.mining[0], c.mining[1], c.mining[2]);
    			break;
    
    		case 2105:
    		case 14862: // addy ore
    			c.mining[0] = 449;
    			c.mining[1] = 70;
    			c.mining[2] = 95;
    			c.getMining().startMining(c.mining[0], c.mining[1], c.mining[2]);
    			break;
    
    		case 14859:
    		case 14860: // rune ore
    			c.mining[0] = 451;
    			c.mining[1] = 85;
    			c.mining[2] = 125;
    			c.getMining().startMining(c.mining[0], c.mining[1], c.mining[2]);
    			break;
    
    		case 8143:
    			if (c.farm[0] > 0 && c.farm[1] > 0) {
    				c.getFarming().pickHerb();
    			}
    			break;
    
    		// DOORS
    		case 1516:
    		case 1519:
    			if (c.objectY == 9698) {
    				if (c.absY >= c.objectY)
    					c.getPA().walkTo(0, -1);
    				else
    					c.getPA().walkTo(0, 1);
    				break;
    			}
    		case 1530:
    		case 1531:
    		case 1533:
    		case 1534:
    		case 11712:
    		case 11711:
    		case 11707:
    		case 11708:
    		case 6725:
    		case 3198:
    		case 3197:
    			Server.objectHandler.doorHandling(objectType, c.objectX, c.objectY,
    					0);
    			break;
    
    		case 9319:
    			if (c.heightLevel == 0)
    				c.getPA().movePlayer(c.absX, c.absY, 1);
    			else if (c.heightLevel == 1)
    				c.getPA().movePlayer(c.absX, c.absY, 2);
    			break;
    
    		case 9320:
    			if (c.heightLevel == 1)
    				c.getPA().movePlayer(c.absX, c.absY, 0);
    			else if (c.heightLevel == 2)
    				c.getPA().movePlayer(c.absX, c.absY, 1);
    			break;
    
    		case 4496:
    		case 4494:
    			if (c.heightLevel == 2) {
    				c.getPA().movePlayer(c.absX - 5, c.absY, 1);
    			} else if (c.heightLevel == 1) {
    				c.getPA().movePlayer(c.absX + 5, c.absY, 0);
    			}
    			break;
    
    		case 4493:
    			if (c.heightLevel == 0) {
    				c.getPA().movePlayer(c.absX - 5, c.absY, 1);
    			} else if (c.heightLevel == 1) {
    				c.getPA().movePlayer(c.absX + 5, c.absY, 2);
    			}
    			break;
    
    		case 4495:
    			if (c.heightLevel == 1) {
    				c.getPA().movePlayer(c.absX + 5, c.absY, 2);
    			}
    			break;
    
    		case 5126:
    			if (c.absY == 3554)
    				c.getPA().walkTo(0, 1);
    			else
    				c.getPA().walkTo(0, -1);
    			break;
    
    		case 1755:
    			if (c.objectX == 2884 && c.objectY == 9797)
    				c.getPA().movePlayer(c.absX, c.absY - 6400, 0);
    			break;
    		case 1759:
    			if (c.objectX == 2884 && c.objectY == 3397)
    				c.getPA().movePlayer(c.absX, c.absY + 6400, 0);
    			break;
    		case 409:
    			if (c.playerLevel[5] < c.getPA().getLevelForXP(c.playerXP[5])) {
    				c.startAnimation(645);
    				c.playerLevel[5] = c.getPA().getLevelForXP(c.playerXP[5]);
    				c.sendMessage("You recharge your prayer points.");
    				c.getPA().refreshSkill(5);
    			} else {
    				c.sendMessage("You already have full prayer points.");
    			}
    			break;
    		case 2873:
    			if (!c.getItems().ownsCape()) {
    				c.startAnimation(645);
    				c.sendMessage("Saradomin blesses you with a cape.");
    				c.getItems().addItem(2412, 1);
    			}
    			break;
    		case 2875:
    			if (!c.getItems().ownsCape()) {
    				c.startAnimation(645);
    				c.sendMessage("Guthix blesses you with a cape.");
    				c.getItems().addItem(2413, 1);
    			}
    			break;
    		case 2874:
    			if (!c.getItems().ownsCape()) {
    				c.startAnimation(645);
    				c.sendMessage("Zamorak blesses you with a cape.");
    				c.getItems().addItem(2414, 1);
    			}
    			break;
    		case 2879:
    			c.getPA().movePlayer(2538, 4716, 0);
    			break;
    		case 2878:
    			c.getPA().movePlayer(2509, 4689, 0);
    			break;
    		case 5960:
    			c.getPA().startTeleport2(3090, 3956, 0);
    			break;
    
    		case 1815:
    			c.getPA().startTeleport2(Config.EDGEVILLE_X, Config.EDGEVILLE_Y, 0);
    			break;
    
    		case 9706:
    			c.getPA().startTeleport2(3105, 3951, 0);
    			break;
    		case 9707:
    			c.getPA().startTeleport2(3105, 3956, 0);
    			break;
    
    		case 5959:
    			c.getPA().startTeleport2(2539, 4712, 0);
    			break;
    
    		case 2558:
    			c.sendMessage("This door is locked.");
    			break;
    
    		case 9294:
    			if (c.absX < c.objectX) {
    				c.getPA().movePlayer(c.objectX + 1, c.absY, 0);
    			} else if (c.absX > c.objectX) {
    				c.getPA().movePlayer(c.objectX - 1, c.absY, 0);
    			}
    			break;
    
    		case 9293:
    			if (c.absX < c.objectX) {
    				c.getPA().movePlayer(2892, 9799, 0);
    			} else {
    				c.getPA().movePlayer(2886, 9799, 0);
    			}
    			break;
    		case 10529:
    		case 10527:
    			if (c.absY <= c.objectY)
    				c.getPA().walkTo(0, 1);
    			else
    				c.getPA().walkTo(0, -1);
    			break;
    		case 3044:
    			c.getSmithing().sendSmelting();
    			break;
    		case 733:
    			c.startAnimation(451);
    			if (c.objectX == 3158 && c.objectY == 3951) {
    				new Object(734, c.objectX, c.objectY, c.heightLevel, 1, 10,
    						733, 50);
    			} else {
    				new Object(734, c.objectX, c.objectY, c.heightLevel, 0, 10,
    						733, 50);
    			}
    			break;
    
    		default:
    			ScriptManager.callFunc("objectClick1_" + objectType, c, objectType,
    					obX, obY);
    			break;
    
    		}
    	}
    
    	public void secondClickObject(int objectType, int obX, int obY) {
    		c.clickObjectType = 0;
    		// c.sendMessage("Object type: " + objectType);
    		switch (objectType) {
    		case 11666:
    		case 3044:
    			c.getSmithing().sendSmelting();
    			break;
    		case 2213:
    		case 14367:
    		case 11758:
    			c.getPA().openUpBank();
    			break;
    		case 6163:
    			c.getThieving().stealFromStall(1897, 10, 1);
    			break;
    		case 6165:
    			c.getThieving().stealFromStall(950, 30, 25);
    			break;
    		case 6166:
    			c.getThieving().stealFromStall(1635, 60, 50);
    			break;
    		case 6164:
    			c.getThieving().stealFromStall(7650, 100, 75);
    			break;
    		case 6162:
    			c.getThieving().stealFromStall(1613, 170, 90);
    			break;
    		case 2558:
    			if (System.currentTimeMillis() - c.lastLockPick < 3000
    					|| c.freezeTimer > 0)
    				break;
    			if (c.getItems().playerHasItem(1523, 1)) {
    				c.lastLockPick = System.currentTimeMillis();
    				if (Misc.random(10) <= 3) {
    					c.sendMessage("You fail to pick the lock.");
    					break;
    				}
    				if (c.objectX == 3044 && c.objectY == 3956) {
    					if (c.absX == 3045) {
    						c.getPA().walkTo2(-1, 0);
    					} else if (c.absX == 3044) {
    						c.getPA().walkTo2(1, 0);
    					}
    
    				} else if (c.objectX == 3038 && c.objectY == 3956) {
    					if (c.absX == 3037) {
    						c.getPA().walkTo2(1, 0);
    					} else if (c.absX == 3038) {
    						c.getPA().walkTo2(-1, 0);
    					}
    				} else if (c.objectX == 3041 && c.objectY == 3959) {
    					if (c.absY == 3960) {
    						c.getPA().walkTo2(0, -1);
    					} else if (c.absY == 3959) {
    						c.getPA().walkTo2(0, 1);
    					}
    				}
    			} else {
    				c.sendMessage("I need a lockpick to pick this lock.");
    			}
    			break;
    		default:
    			ScriptManager.callFunc("objectClick2_" + objectType, c, objectType,
    					obX, obY);
    			break;
    		}
    	}
    
    	public void thirdClickObject(int objectType, int obX, int obY) {
    		c.clickObjectType = 0;
    		c.sendMessage("Object type: " + objectType);
    		switch (objectType) {
    		default:
    			ScriptManager.callFunc("objectClick3_" + objectType, c, objectType,
    					obX, obY);
    			break;
    		}
    	}
    
    	public void firstClickNpc(int i) {
    		c.clickNpcType = 0;
    		c.npcClickIndex = 0;
    		switch (i) {
    		case 706:
    			c.getDH().sendDialogues(9, i);
    			break;
    
    		case 394:
    			c.getPA().openUpBank();
    			break;
    		case 2258:
    			c.getDH().sendDialogues(17, i);
    			break;
    
    		case 1599:
    			if (c.slayerTask <= 0) {
    				c.getDH().sendDialogues(11, i);
    			} else {
    				c.getDH().sendDialogues(13, i);
    			}
    			break;
    
    		case 1304:
    			c.getDH().sendOption5("Home", "Edgeville", "Island",
    					"Dagannoth Kings", "Next Page");
    			c.teleAction = 1;
    			break;
    
    		case 1833:
    			c.getShops().openShop(1);
    			break;
    
    		case 3218:
    			c.getShops().openShop(2);
    			break;
    
    		case 5792:
    			c.getShops().openShop(3);
    			break;
    
    		case 3217:
    			c.getShops().openShop(4);
    			break;
    			
    		case 3225:
    			c.getShops().openShop(5);
    			break;
    
    		case 3216:
    			c.getShops().openShop(6);
    			break;
    
    		case 3219:
    			c.getShops().openShop(7);
    			break;
    			
    		case 5449:
    			c.getShops().openShop(8);
    			break;
    
    		case 1700:
    			c.getShops().openShop(9);
    			break;
    
    
    		case 1152:
    			c.getDH().sendDialogues(16, i);
    			break;
    
    		case 494:
    			c.getPA().openUpBank();
    			break;
    
    		case 2566:
    			c.getShops().openSkillCape();
    			break;
    
    		case 3789:
    			c.sendMessage((new StringBuilder()).append("You currently have ")
    					.append(c.pcPoints).append(" pest control points.")
    					.toString());
    			break;
    
    		case 3788:
    			c.getShops().openVoid();
    			break;
    
    		case 905:
    			c.getDH().sendDialogues(5, i);
    			break;
    
    		case 460:
    			c.getDH().sendDialogues(3, i);
    			break;
    
    		case 462:
    			c.getDH().sendDialogues(7, i);
    			break;
    
    		case 316:
    			c.getFishing().setupFishing(317);
    			break;
    
    		case 334:
    			c.getFishing().setupFishing(389);
    			break;
    
    		case 324:
    			c.getFishing().setupFishing(359);
    			break;
    
    		case 314:
    			c.getFishing().setupFishing(335);
    			break;
    
    		case 326:
    			c.getFishing().setupFishing(7944);
    			break;
    
    		case 522:
    		case 523:
    			c.getShops().openShop(1);
    			break;
    
    		case 599:
    			c.getPA().showInterface(3559);
    			c.canChangeAppearance = true;
    			break;
    
    		case 904:
    			c.sendMessage((new StringBuilder()).append("You have ")
    					.append(c.magePoints).append(" points.").toString());
    			break;
    		}
    	}
    
    	public void secondClickNpc(int i) {
    		c.clickNpcType = 0;
    		c.npcClickIndex = 0;
    		switch (i) {
    		case 1282:
    			c.getShops().openShop(7);
    			break;
    
    		case 334:
    			c.getFishing().setupFishing(383);
    			break;
    
    		case 3788:
    			c.getShops().openVoid();
    			break;
    
    
    		case 324:
    			c.getFishing().setupFishing(359);
    			break;
    
    		case 904:
    			c.getShops().openShop(17);
    			break;
    
    		case 522:
    		case 523:
    			c.getShops().openShop(1);
    			break;
    
    		case 541:
    			c.getShops().openShop(5);
    			break;
    
    		case 461:
    			c.getShops().openShop(2);
    			break;
    
    		case 683:
    			c.getShops().openShop(3);
    			break;
    
    		case 549:
    			c.getShops().openShop(4);
    			break;
    
    		case 2538:
    			c.getShops().openShop(6);
    			break;
    
    		case 519:
    			c.getShops().openShop(8);
    			break;
    
    		case 3789:
    			c.getShops().openShop(18);
    			break;
    
    		case 1: // '\001'
    		case 9: // '\t'
    		case 18: // '\022'
    		case 20: // '\024'
    		case 21: // '\025'
    		case 26: // '\032'
    			c.getThieving().stealFromNPC(i);
    			break;
    		}
    	}
    
    	public void thirdClickNpc(int npcType) {
    		c.clickNpcType = 0;
    		c.npcClickIndex = 0;
    		switch (npcType) {
    		default:
    			ScriptManager.callFunc("npcClick3_" + npcType, c, npcType);
    			if (c.playerRights == 3)
    				Misc.println("Third Click NPC : " + npcType);
    			break;
    
    		}
    	}
    
    }
    Reply With Quote  
     

  8. #8  
    Registered Member
    arch337's Avatar
    Join Date
    Sep 2008
    Posts
    1,896
    Thanks given
    94
    Thanks received
    142
    Rep Power
    113
    Quote Originally Posted by King_ View Post
    I thought it may have been client side :/

    Bank I'm using is 10517, but like I said no objects work at all

    Code:
    package server.model.players;
    
    import server.Config;
    import server.Server;
    import server.model.objects.Object;
    import server.util.Misc;
    import server.util.ScriptManager;
    
    public class ActionHandler {
    
    	private Client c;
    
    	public ActionHandler(Client Client) {
    		this.c = Client;
    	}
    
    	public void firstClickObject(int objectType, int obX, int obY) {
    		c.clickObjectType = 0;
    		// c.sendMessage("Object type: " + objectType);
    		switch (objectType) {
    		case 2492:
    			if (c.killCount >= 20) {
    				c.getDH().sendOption4("Armadyl", "Bandos", "Saradomin",
    						"Zamorak");
    				c.dialogueAction = 20;
    			} else {
    				c.sendMessage("You need 20 kill count before teleporting to a boss chamber.");
    			}
    			break;
    
    		case 2213:
    		case 14367:
    		case 11758:
    		case 3193:
    		case 10517:
    		case 10516:
    			c.getPA().openUpBank();
    			break;
    			
    		case 1765:
    			c.getPA().movePlayer(3067, 10256, 0);
    			break;
    		case 2882:
    		case 2883:
    			if (c.objectX == 3268) {
    				if (c.absX < c.objectX) {
    					c.getPA().walkTo(1, 0);
    				} else {
    					c.getPA().walkTo(-1, 0);
    				}
    			}
    			break;
    		case 272:
    			c.getPA().movePlayer(c.absX, c.absY, 1);
    			break;
    
    		case 273:
    			c.getPA().movePlayer(c.absX, c.absY, 0);
    			break;
    		case 245:
    			c.getPA().movePlayer(c.absX, c.absY + 2, 2);
    			break;
    		case 246:
    			c.getPA().movePlayer(c.absX, c.absY - 2, 1);
    			break;
    		case 1766:
    			c.getPA().movePlayer(3016, 3849, 0);
    			break;
    		case 6552:
    			if (c.playerMagicBook == 0) {
    				c.playerMagicBook = 1;
    				c.setSidebarInterface(6, 12855);
    				c.sendMessage("An ancient wisdomin fills your mind.");
    				c.getPA().resetAutocast();
    			} else {
    				c.setSidebarInterface(6, 1151); // modern
    				c.playerMagicBook = 0;
    				c.sendMessage("You feel a drain on your memory.");
    				c.autocastId = -1;
    				c.getPA().resetAutocast();
    			}
    			break;
    
    		case 410:
    			if (c.playerMagicBook == 0) {
    				c.playerMagicBook = 2;
    				c.setSidebarInterface(6, 29999);
    				c.sendMessage("Lunar wisdom fills your mind.");
    				c.getPA().resetAutocast();
    			} else {
    				c.setSidebarInterface(6, 1151); // modern
    				c.playerMagicBook = 0;
    				c.sendMessage("You feel a drain on your memory.");
    				c.autocastId = -1;
    				c.getPA().resetAutocast();
    			}
    			break;
    
    		case 1816:
    			c.getPA().startTeleport2(2271, 4680, 0);
    			break;
    		case 1817:
    			c.getPA().startTeleport(3067, 10253, 0, "modern");
    			break;
    		case 1814:
    			// ardy lever
    			c.getPA().startTeleport(3153, 3923, 0, "modern");
    			break;
    
    		case 9356:
    			// c.getPA().enterCaves();
    			c.sendMessage("Temporarily removed due to bugs.");
    			break;
    		case 1733:
    			c.getPA().movePlayer(c.absX, c.absY + 6393, 0);
    			break;
    
    		case 1734:
    			c.getPA().movePlayer(c.absX, c.absY - 6396, 0);
    			break;
    
    		case 9357:
    			c.getPA().resetTzhaar();
    			break;
    
    		case 8959:
    			if (c.getX() == 2490 && (c.getY() == 10146 || c.getY() == 10148)) {
    				if (c.getPA().checkForPlayer(2490,
    						c.getY() == 10146 ? 10148 : 10146)) {
    					new Object(6951, c.objectX, c.objectY, c.heightLevel, 1,
    							10, 8959, 15);
    				}
    			}
    			break;
    
    		
    
    		case 10177:
    			c.getPA().movePlayer(1890, 4407, 0);
    			break;
    		case 10230:
    			c.getPA().movePlayer(2900, 4449, 0);
    			break;
    		case 10229:
    			c.getPA().movePlayer(1912, 4367, 0);
    			break;
    		case 2623:
    			if (c.absX >= c.objectX)
    				c.getPA().walkTo(-1, 0);
    			else
    				c.getPA().walkTo(1, 0);
    			break;
    		// pc boat
    		case 14315:
    			c.getPA().movePlayer(2661, 2639, 0);
    			break;
    		case 14314:
    			c.getPA().movePlayer(2657, 2639, 0);
    			break;
    
    		case 1596:
    		case 1597:
    			if (c.getY() >= c.objectY)
    				c.getPA().walkTo(0, -1);
    			else
    				c.getPA().walkTo(0, 1);
    			break;
    
    		case 14235:
    		case 14233:
    			if (c.objectX == 2670)
    				if (c.absX <= 2670)
    					c.absX = 2671;
    				else
    					c.absX = 2670;
    			if (c.objectX == 2643)
    				if (c.absX >= 2643)
    					c.absX = 2642;
    				else
    					c.absX = 2643;
    			if (c.absX <= 2585)
    				c.absY += 1;
    			else
    				c.absY -= 1;
    			c.getPA().movePlayer(c.absX, c.absY, 0);
    			break;
    
    		case 14829:
    		case 14830:
    		case 14827:
    		case 14828:
    		case 14826:
    		case 14831:
    			// Server.objectHandler.startObelisk(objectType);
    			Server.objectManager.startObelisk(objectType);
    			break;
    		case 4387:
    			// Server.castleWars.joinWait(c,1);
    			break;
    
    		case 4388:
    			// Server.castleWars.joinWait(c,2);
    			break;
    
    		case 4408:
    			// Server.castleWars.joinWait(c,3);
    			break;
    
    		case 9369:
    			if (c.getY() > 5175)
    				c.getPA().movePlayer(2399, 5175, 0);
    			else
    				c.getPA().movePlayer(2399, 5177, 0);
    			break;
    
    		case 9368:
    			if (c.getY() < 5169) {
    				Server.fightPits.removePlayerFromPits(c.playerId);
    				c.getPA().movePlayer(2399, 5169, 0);
    			}
    			break;
    		case 4411:
    		case 4415:
    		case 4417:
    		case 4418:
    		case 4419:
    		case 4420:
    		case 4469:
    		case 4470:
    		case 4911:
    		case 4912:
    		case 1747:
    		case 1757:
    			// Server.castleWars.handleObjects(c, objectType, obX, obY);
    			break;
    
    		case 2286:
    		case 154:
    		case 4058:
    		case 2295:
    		case 2285:
    		case 2313:
    		case 2312:
    		case 2314:
    			c.getAgility().handleGnomeCourse(objectType, obX, obY);
    			break;
    
    			/*
    			 * Barrows Chest
    			 */
    		case 10284:
    			if (c.barrowsKillCount < 5) {
    				c.sendMessage("You haven't killed all the brothers");
    			}
    			if (c.barrowsKillCount == 5
    					&& c.barrowsNpcs[c.randomCoffin][1] == 1) {
    				c.sendMessage("I have already summoned this npc.");
    			}
    			if (c.barrowsNpcs[c.randomCoffin][1] == 0
    					&& c.barrowsKillCount >= 5) {
    				Server.npcHandler.spawnNpc(c, c.barrowsNpcs[c.randomCoffin][0],
    						3551, 9694 - 1, 0, 0, 120, 30, 200, 200, true, true);
    				c.barrowsNpcs[c.randomCoffin][1] = 1;
    			}
    			if ((c.barrowsKillCount > 5 || c.barrowsNpcs[c.randomCoffin][1] == 2)
    					&& c.getItems().freeSlots() >= 2) {
    				c.getPA().resetBarrows();
    				c.getItems().addItem(c.getPA().randomRunes(),
    						Misc.random(150) + 100);
    				if (Misc.random(2) == 1)
    					c.getItems().addItem(c.getPA().randomBarrows(), 1);
    				c.getPA().startTeleport(3564, 3288, 0, "modern");
    			} else if (c.barrowsKillCount > 5 && c.getItems().freeSlots() <= 1) {
    				c.sendMessage("You need at least 2 inventory slot opened.");
    			}
    			break;
    		/*
    		 * Doors
    		 */
    		case 6749:
    			if (obX == 3562 && obY == 9678) {
    				c.getPA().object(3562, 9678, 6749, -3, 0);
    				c.getPA().object(3562, 9677, 6730, -1, 0);
    			} else if (obX == 3558 && obY == 9677) {
    				c.getPA().object(3558, 9677, 6749, -1, 0);
    				c.getPA().object(3558, 9678, 6730, -3, 0);
    			}
    			break;
    		case 6730:
    			if (obX == 3558 && obY == 9677) {
    				c.getPA().object(3562, 9678, 6749, -3, 0);
    				c.getPA().object(3562, 9677, 6730, -1, 0);
    			} else if (obX == 3558 && obY == 9678) {
    				c.getPA().object(3558, 9677, 6749, -1, 0);
    				c.getPA().object(3558, 9678, 6730, -3, 0);
    			}
    			break;
    		case 6727:
    			if (obX == 3551 && obY == 9684) {
    				c.sendMessage("You cant open this door..");
    			}
    			break;
    		case 6746:
    			if (obX == 3552 && obY == 9684) {
    				c.sendMessage("You cant open this door..");
    			}
    			break;
    		case 6748:
    			if (obX == 3545 && obY == 9678) {
    				c.getPA().object(3545, 9678, 6748, -3, 0);
    				c.getPA().object(3545, 9677, 6729, -1, 0);
    			} else if (obX == 3541 && obY == 9677) {
    				c.getPA().object(3541, 9677, 6748, -1, 0);
    				c.getPA().object(3541, 9678, 6729, -3, 0);
    			}
    			break;
    		case 6729:
    			if (obX == 3545 && obY == 9677) {
    				c.getPA().object(3545, 9678, 6748, -3, 0);
    				c.getPA().object(3545, 9677, 6729, -1, 0);
    			} else if (obX == 3541 && obY == 9678) {
    				c.getPA().object(3541, 9677, 6748, -1, 0);
    				c.getPA().object(3541, 9678, 6729, -3, 0);
    			}
    			break;
    		case 6726:
    			if (obX == 3534 && obY == 9684) {
    				c.getPA().object(3534, 9684, 6726, -4, 0);
    				c.getPA().object(3535, 9684, 6745, -2, 0);
    			} else if (obX == 3535 && obY == 9688) {
    				c.getPA().object(3535, 9688, 6726, -2, 0);
    				c.getPA().object(3534, 9688, 6745, -4, 0);
    			}
    			break;
    		case 6745:
    			if (obX == 3535 && obY == 9684) {
    				c.getPA().object(3534, 9684, 6726, -4, 0);
    				c.getPA().object(3535, 9684, 6745, -2, 0);
    			} else if (obX == 3534 && obY == 9688) {
    				c.getPA().object(3535, 9688, 6726, -2, 0);
    				c.getPA().object(3534, 9688, 6745, -4, 0);
    			}
    			break;
    		case 6743:
    			if (obX == 3545 && obY == 9695) {
    				c.getPA().object(3545, 9694, 6724, -1, 0);
    				c.getPA().object(3545, 9695, 6743, -3, 0);
    			} else if (obX == 3541 && obY == 9694) {
    				c.getPA().object(3541, 9694, 6724, -1, 0);
    				c.getPA().object(3541, 9695, 6743, -3, 0);
    			}
    			break;
    		case 6724:
    			if (obX == 3545 && obY == 9694) {
    				c.getPA().object(3545, 9694, 6724, -1, 0);
    				c.getPA().object(3545, 9695, 6743, -3, 0);
    			} else if (obX == 3541 && obY == 9695) {
    				c.getPA().object(3541, 9694, 6724, -1, 0);
    				c.getPA().object(3541, 9695, 6743, -3, 0);
    			}
    			break;
    		/*
    		 * Cofins
    		 */
    		case 6707: // verac
    			c.getPA().movePlayer(3556, 3298, 0);
    			break;
    
    		case 20772:
    			if (server.model.minigames.Barrows.selectCoffin(c, objectType)) {
    				return;
    			}
    			if (c.barrowsNpcs[0][1] == 0) {
    				Server.npcHandler.spawnNpc(c, 2030, c.getX(), c.getY() - 1, -1,
    						0, 120, 25, 200, 200, true, true);
    				c.barrowsNpcs[0][1] = 1;
    			} else {
    				c.sendMessage("You have already searched in this sarcophagus.");
    			}
    			break;
    
    		case 6706: // torag
    			c.getPA().movePlayer(3553, 3283, 0);
    			break;
    
    		case 6772:
    			if (server.model.minigames.Barrows.selectCoffin(c, objectType)) {
    				return;
    			}
    			if (c.barrowsNpcs[1][1] == 0) {
    				Server.npcHandler.spawnNpc(c, 2029, c.getX() + 1, c.getY(), -1,
    						0, 120, 20, 200, 200, true, true);
    				c.barrowsNpcs[1][1] = 1;
    			} else {
    				c.sendMessage("You have already searched in this sarcophagus.");
    			}
    			break;
    
    		case 6705: // karil stairs
    			c.getPA().movePlayer(3565, 3276, 0);
    			break;
    		case 6822:
    			if (server.model.minigames.Barrows.selectCoffin(c, objectType)) {
    				return;
    			}
    			if (c.barrowsNpcs[2][1] == 0) {
    				Server.npcHandler.spawnNpc(c, 2028, c.getX(), c.getY() - 1, -1,
    						0, 90, 17, 200, 200, true, true);
    				c.barrowsNpcs[2][1] = 1;
    			} else {
    				c.sendMessage("You have already searched in this sarcophagus.");
    			}
    			break;
    
    		case 6704: // guthan stairs
    			c.getPA().movePlayer(3578, 3284, 0);
    			break;
    		case 6773:
    			if (server.model.minigames.Barrows.selectCoffin(c, objectType)) {
    				return;
    			}
    			if (c.barrowsNpcs[3][1] == 0) {
    				Server.npcHandler.spawnNpc(c, 2027, c.getX(), c.getY() - 1, -1,
    						0, 120, 23, 200, 200, true, true);
    				c.barrowsNpcs[3][1] = 1;
    			} else {
    				c.sendMessage("You have already searched in this sarcophagus.");
    			}
    			break;
    
    		case 6703: // dharok stairs
    			c.getPA().movePlayer(3574, 3298, 0);
    			break;
    		case 6771:
    			if (server.model.minigames.Barrows.selectCoffin(c, objectType)) {
    				return;
    			}
    			if (c.barrowsNpcs[4][1] == 0) {
    				Server.npcHandler.spawnNpc(c, 2026, c.getX(), c.getY() - 1, -1,
    						0, 120, 45, 250, 250, true, true);
    				c.barrowsNpcs[4][1] = 1;
    			} else {
    				c.sendMessage("You have already searched in this sarcophagus.");
    			}
    			break;
    
    		case 6702: // ahrim stairs
    			c.getPA().movePlayer(3565, 3290, 0);
    			break;
    		case 6821:
    			if (server.model.minigames.Barrows.selectCoffin(c, objectType)) {
    				return;
    			}
    			if (c.barrowsNpcs[5][1] == 0) {
    				Server.npcHandler.spawnNpc(c, 2025, c.getX(), c.getY() - 1, -1,
    						0, 90, 19, 200, 200, true, true);
    				c.barrowsNpcs[5][1] = 1;
    			} else {
    				c.sendMessage("You have already searched in this sarcophagus.");
    			}
    			break;
    
    		case 1276:
    		case 1278:// trees
    			c.woodcut[0] = 1511;
    			c.woodcut[1] = 1;
    			c.woodcut[2] = 25;
    			c.getWoodcutting().startWoodcutting(c.woodcut[0], c.woodcut[1],
    					c.woodcut[2]);
    			break;
    
    		case 1281: // oak
    			c.woodcut[0] = 1521;
    			c.woodcut[1] = 15;
    			c.woodcut[2] = 37;
    			c.getWoodcutting().startWoodcutting(c.woodcut[0], c.woodcut[1],
    					c.woodcut[2]);
    			break;
    
    		case 1308: // willow
    			c.woodcut[0] = 1519;
    			c.woodcut[1] = 30;
    			c.woodcut[2] = 68;
    			c.getWoodcutting().startWoodcutting(c.woodcut[0], c.woodcut[1],
    					c.woodcut[2]);
    			break;
    
    		case 1307: // maple
    			c.woodcut[0] = 1517;
    			c.woodcut[1] = 45;
    			c.woodcut[2] = 100;
    			c.getWoodcutting().startWoodcutting(c.woodcut[0], c.woodcut[1],
    					c.woodcut[2]);
    			break;
    
    		case 1309: // yew
    			c.woodcut[0] = 1515;
    			c.woodcut[1] = 60;
    			c.woodcut[2] = 175;
    			c.getWoodcutting().startWoodcutting(c.woodcut[0], c.woodcut[1],
    					c.woodcut[2]);
    			break;
    
    		case 1306: // yew
    			c.woodcut[0] = 1513;
    			c.woodcut[1] = 75;
    			c.woodcut[2] = 250;
    			c.getWoodcutting().startWoodcutting(c.woodcut[0], c.woodcut[1],
    					c.woodcut[2]);
    			break;
    
    		case 2090:// copper
    		case 2091:
    			c.mining[0] = 436;
    			c.mining[1] = 1;
    			c.mining[2] = 18;
    			c.getMining().startMining(c.mining[0], c.mining[1], c.mining[2]);
    			break;
    
    		case 2094:// tin
    			c.mining[0] = 438;
    			c.mining[1] = 1;
    			c.mining[2] = 18;
    			c.getMining().startMining(c.mining[0], c.mining[1], c.mining[2]);
    			break;
    
    		case 145856:
    		case 2092:
    		case 2093: // iron
    			c.mining[0] = 440;
    			c.mining[1] = 15;
    			c.mining[2] = 35;
    			c.getMining().startMining(c.mining[0], c.mining[1], c.mining[2]);
    			break;
    
    		case 14850:
    		case 14851:
    		case 14852:
    		case 2096:
    		case 2097: // coal
    			c.mining[0] = 453;
    			c.mining[1] = 30;
    			c.mining[2] = 50;
    			c.getMining().startMining(c.mining[0], c.mining[1], c.mining[2]);
    			break;
    
    		case 2098:
    		case 2099:
    			c.mining[0] = 444;
    			c.mining[1] = 40;
    			c.mining[2] = 65;
    			c.getMining().startMining(c.mining[0], c.mining[1], c.mining[2]);
    			break;
    
    		case 2102:
    		case 2103:
    		case 14853:
    		case 14854:
    		case 14855: // mith ore
    			c.mining[0] = 447;
    			c.mining[1] = 55;
    			c.mining[2] = 80;
    			c.getMining().startMining(c.mining[0], c.mining[1], c.mining[2]);
    			break;
    
    		case 2105:
    		case 14862: // addy ore
    			c.mining[0] = 449;
    			c.mining[1] = 70;
    			c.mining[2] = 95;
    			c.getMining().startMining(c.mining[0], c.mining[1], c.mining[2]);
    			break;
    
    		case 14859:
    		case 14860: // rune ore
    			c.mining[0] = 451;
    			c.mining[1] = 85;
    			c.mining[2] = 125;
    			c.getMining().startMining(c.mining[0], c.mining[1], c.mining[2]);
    			break;
    
    		case 8143:
    			if (c.farm[0] > 0 && c.farm[1] > 0) {
    				c.getFarming().pickHerb();
    			}
    			break;
    
    		// DOORS
    		case 1516:
    		case 1519:
    			if (c.objectY == 9698) {
    				if (c.absY >= c.objectY)
    					c.getPA().walkTo(0, -1);
    				else
    					c.getPA().walkTo(0, 1);
    				break;
    			}
    		case 1530:
    		case 1531:
    		case 1533:
    		case 1534:
    		case 11712:
    		case 11711:
    		case 11707:
    		case 11708:
    		case 6725:
    		case 3198:
    		case 3197:
    			Server.objectHandler.doorHandling(objectType, c.objectX, c.objectY,
    					0);
    			break;
    
    		case 9319:
    			if (c.heightLevel == 0)
    				c.getPA().movePlayer(c.absX, c.absY, 1);
    			else if (c.heightLevel == 1)
    				c.getPA().movePlayer(c.absX, c.absY, 2);
    			break;
    
    		case 9320:
    			if (c.heightLevel == 1)
    				c.getPA().movePlayer(c.absX, c.absY, 0);
    			else if (c.heightLevel == 2)
    				c.getPA().movePlayer(c.absX, c.absY, 1);
    			break;
    
    		case 4496:
    		case 4494:
    			if (c.heightLevel == 2) {
    				c.getPA().movePlayer(c.absX - 5, c.absY, 1);
    			} else if (c.heightLevel == 1) {
    				c.getPA().movePlayer(c.absX + 5, c.absY, 0);
    			}
    			break;
    
    		case 4493:
    			if (c.heightLevel == 0) {
    				c.getPA().movePlayer(c.absX - 5, c.absY, 1);
    			} else if (c.heightLevel == 1) {
    				c.getPA().movePlayer(c.absX + 5, c.absY, 2);
    			}
    			break;
    
    		case 4495:
    			if (c.heightLevel == 1) {
    				c.getPA().movePlayer(c.absX + 5, c.absY, 2);
    			}
    			break;
    
    		case 5126:
    			if (c.absY == 3554)
    				c.getPA().walkTo(0, 1);
    			else
    				c.getPA().walkTo(0, -1);
    			break;
    
    		case 1755:
    			if (c.objectX == 2884 && c.objectY == 9797)
    				c.getPA().movePlayer(c.absX, c.absY - 6400, 0);
    			break;
    		case 1759:
    			if (c.objectX == 2884 && c.objectY == 3397)
    				c.getPA().movePlayer(c.absX, c.absY + 6400, 0);
    			break;
    		case 409:
    			if (c.playerLevel[5] < c.getPA().getLevelForXP(c.playerXP[5])) {
    				c.startAnimation(645);
    				c.playerLevel[5] = c.getPA().getLevelForXP(c.playerXP[5]);
    				c.sendMessage("You recharge your prayer points.");
    				c.getPA().refreshSkill(5);
    			} else {
    				c.sendMessage("You already have full prayer points.");
    			}
    			break;
    		case 2873:
    			if (!c.getItems().ownsCape()) {
    				c.startAnimation(645);
    				c.sendMessage("Saradomin blesses you with a cape.");
    				c.getItems().addItem(2412, 1);
    			}
    			break;
    		case 2875:
    			if (!c.getItems().ownsCape()) {
    				c.startAnimation(645);
    				c.sendMessage("Guthix blesses you with a cape.");
    				c.getItems().addItem(2413, 1);
    			}
    			break;
    		case 2874:
    			if (!c.getItems().ownsCape()) {
    				c.startAnimation(645);
    				c.sendMessage("Zamorak blesses you with a cape.");
    				c.getItems().addItem(2414, 1);
    			}
    			break;
    		case 2879:
    			c.getPA().movePlayer(2538, 4716, 0);
    			break;
    		case 2878:
    			c.getPA().movePlayer(2509, 4689, 0);
    			break;
    		case 5960:
    			c.getPA().startTeleport2(3090, 3956, 0);
    			break;
    
    		case 1815:
    			c.getPA().startTeleport2(Config.EDGEVILLE_X, Config.EDGEVILLE_Y, 0);
    			break;
    
    		case 9706:
    			c.getPA().startTeleport2(3105, 3951, 0);
    			break;
    		case 9707:
    			c.getPA().startTeleport2(3105, 3956, 0);
    			break;
    
    		case 5959:
    			c.getPA().startTeleport2(2539, 4712, 0);
    			break;
    
    		case 2558:
    			c.sendMessage("This door is locked.");
    			break;
    
    		case 9294:
    			if (c.absX < c.objectX) {
    				c.getPA().movePlayer(c.objectX + 1, c.absY, 0);
    			} else if (c.absX > c.objectX) {
    				c.getPA().movePlayer(c.objectX - 1, c.absY, 0);
    			}
    			break;
    
    		case 9293:
    			if (c.absX < c.objectX) {
    				c.getPA().movePlayer(2892, 9799, 0);
    			} else {
    				c.getPA().movePlayer(2886, 9799, 0);
    			}
    			break;
    		case 10529:
    		case 10527:
    			if (c.absY <= c.objectY)
    				c.getPA().walkTo(0, 1);
    			else
    				c.getPA().walkTo(0, -1);
    			break;
    		case 3044:
    			c.getSmithing().sendSmelting();
    			break;
    		case 733:
    			c.startAnimation(451);
    			if (c.objectX == 3158 && c.objectY == 3951) {
    				new Object(734, c.objectX, c.objectY, c.heightLevel, 1, 10,
    						733, 50);
    			} else {
    				new Object(734, c.objectX, c.objectY, c.heightLevel, 0, 10,
    						733, 50);
    			}
    			break;
    
    		default:
    			ScriptManager.callFunc("objectClick1_" + objectType, c, objectType,
    					obX, obY);
    			break;
    
    		}
    	}
    
    	public void secondClickObject(int objectType, int obX, int obY) {
    		c.clickObjectType = 0;
    		// c.sendMessage("Object type: " + objectType);
    		switch (objectType) {
    		case 11666:
    		case 3044:
    			c.getSmithing().sendSmelting();
    			break;
    		case 2213:
    		case 14367:
    		case 11758:
    			c.getPA().openUpBank();
    			break;
    		case 6163:
    			c.getThieving().stealFromStall(1897, 10, 1);
    			break;
    		case 6165:
    			c.getThieving().stealFromStall(950, 30, 25);
    			break;
    		case 6166:
    			c.getThieving().stealFromStall(1635, 60, 50);
    			break;
    		case 6164:
    			c.getThieving().stealFromStall(7650, 100, 75);
    			break;
    		case 6162:
    			c.getThieving().stealFromStall(1613, 170, 90);
    			break;
    		case 2558:
    			if (System.currentTimeMillis() - c.lastLockPick < 3000
    					|| c.freezeTimer > 0)
    				break;
    			if (c.getItems().playerHasItem(1523, 1)) {
    				c.lastLockPick = System.currentTimeMillis();
    				if (Misc.random(10) <= 3) {
    					c.sendMessage("You fail to pick the lock.");
    					break;
    				}
    				if (c.objectX == 3044 && c.objectY == 3956) {
    					if (c.absX == 3045) {
    						c.getPA().walkTo2(-1, 0);
    					} else if (c.absX == 3044) {
    						c.getPA().walkTo2(1, 0);
    					}
    
    				} else if (c.objectX == 3038 && c.objectY == 3956) {
    					if (c.absX == 3037) {
    						c.getPA().walkTo2(1, 0);
    					} else if (c.absX == 3038) {
    						c.getPA().walkTo2(-1, 0);
    					}
    				} else if (c.objectX == 3041 && c.objectY == 3959) {
    					if (c.absY == 3960) {
    						c.getPA().walkTo2(0, -1);
    					} else if (c.absY == 3959) {
    						c.getPA().walkTo2(0, 1);
    					}
    				}
    			} else {
    				c.sendMessage("I need a lockpick to pick this lock.");
    			}
    			break;
    		default:
    			ScriptManager.callFunc("objectClick2_" + objectType, c, objectType,
    					obX, obY);
    			break;
    		}
    	}
    
    	public void thirdClickObject(int objectType, int obX, int obY) {
    		c.clickObjectType = 0;
    		c.sendMessage("Object type: " + objectType);
    		switch (objectType) {
    		default:
    			ScriptManager.callFunc("objectClick3_" + objectType, c, objectType,
    					obX, obY);
    			break;
    		}
    	}
    
    	public void firstClickNpc(int i) {
    		c.clickNpcType = 0;
    		c.npcClickIndex = 0;
    		switch (i) {
    		case 706:
    			c.getDH().sendDialogues(9, i);
    			break;
    
    		case 394:
    			c.getPA().openUpBank();
    			break;
    		case 2258:
    			c.getDH().sendDialogues(17, i);
    			break;
    
    		case 1599:
    			if (c.slayerTask <= 0) {
    				c.getDH().sendDialogues(11, i);
    			} else {
    				c.getDH().sendDialogues(13, i);
    			}
    			break;
    
    		case 1304:
    			c.getDH().sendOption5("Home", "Edgeville", "Island",
    					"Dagannoth Kings", "Next Page");
    			c.teleAction = 1;
    			break;
    
    		case 1833:
    			c.getShops().openShop(1);
    			break;
    
    		case 3218:
    			c.getShops().openShop(2);
    			break;
    
    		case 5792:
    			c.getShops().openShop(3);
    			break;
    
    		case 3217:
    			c.getShops().openShop(4);
    			break;
    			
    		case 3225:
    			c.getShops().openShop(5);
    			break;
    
    		case 3216:
    			c.getShops().openShop(6);
    			break;
    
    		case 3219:
    			c.getShops().openShop(7);
    			break;
    			
    		case 5449:
    			c.getShops().openShop(8);
    			break;
    
    		case 1700:
    			c.getShops().openShop(9);
    			break;
    
    
    		case 1152:
    			c.getDH().sendDialogues(16, i);
    			break;
    
    		case 494:
    			c.getPA().openUpBank();
    			break;
    
    		case 2566:
    			c.getShops().openSkillCape();
    			break;
    
    		case 3789:
    			c.sendMessage((new StringBuilder()).append("You currently have ")
    					.append(c.pcPoints).append(" pest control points.")
    					.toString());
    			break;
    
    		case 3788:
    			c.getShops().openVoid();
    			break;
    
    		case 905:
    			c.getDH().sendDialogues(5, i);
    			break;
    
    		case 460:
    			c.getDH().sendDialogues(3, i);
    			break;
    
    		case 462:
    			c.getDH().sendDialogues(7, i);
    			break;
    
    		case 316:
    			c.getFishing().setupFishing(317);
    			break;
    
    		case 334:
    			c.getFishing().setupFishing(389);
    			break;
    
    		case 324:
    			c.getFishing().setupFishing(359);
    			break;
    
    		case 314:
    			c.getFishing().setupFishing(335);
    			break;
    
    		case 326:
    			c.getFishing().setupFishing(7944);
    			break;
    
    		case 522:
    		case 523:
    			c.getShops().openShop(1);
    			break;
    
    		case 599:
    			c.getPA().showInterface(3559);
    			c.canChangeAppearance = true;
    			break;
    
    		case 904:
    			c.sendMessage((new StringBuilder()).append("You have ")
    					.append(c.magePoints).append(" points.").toString());
    			break;
    		}
    	}
    
    	public void secondClickNpc(int i) {
    		c.clickNpcType = 0;
    		c.npcClickIndex = 0;
    		switch (i) {
    		case 1282:
    			c.getShops().openShop(7);
    			break;
    
    		case 334:
    			c.getFishing().setupFishing(383);
    			break;
    
    		case 3788:
    			c.getShops().openVoid();
    			break;
    
    
    		case 324:
    			c.getFishing().setupFishing(359);
    			break;
    
    		case 904:
    			c.getShops().openShop(17);
    			break;
    
    		case 522:
    		case 523:
    			c.getShops().openShop(1);
    			break;
    
    		case 541:
    			c.getShops().openShop(5);
    			break;
    
    		case 461:
    			c.getShops().openShop(2);
    			break;
    
    		case 683:
    			c.getShops().openShop(3);
    			break;
    
    		case 549:
    			c.getShops().openShop(4);
    			break;
    
    		case 2538:
    			c.getShops().openShop(6);
    			break;
    
    		case 519:
    			c.getShops().openShop(8);
    			break;
    
    		case 3789:
    			c.getShops().openShop(18);
    			break;
    
    		case 1: // '\001'
    		case 9: // '\t'
    		case 18: // '\022'
    		case 20: // '\024'
    		case 21: // '\025'
    		case 26: // '\032'
    			c.getThieving().stealFromNPC(i);
    			break;
    		}
    	}
    
    	public void thirdClickNpc(int npcType) {
    		c.clickNpcType = 0;
    		c.npcClickIndex = 0;
    		switch (npcType) {
    		default:
    			ScriptManager.callFunc("npcClick3_" + npcType, c, npcType);
    			if (c.playerRights == 3)
    				Misc.println("Third Click NPC : " + npcType);
    			break;
    
    		}
    	}
    
    }
    Well this is the server section so anything server sided need to check so all is ok.
    Under your objectClick methods (firstClickObject, secondClickObject, thirdClickObject) try and add a debug to see if they are even being send when clicking the bank. If not they might not send it through the packet.


    "A fail act is something you do regular, but a dumb act is something you can learn from"
    Spoiler for Problem?:
    Reply With Quote  
     

  9. #9  
    Extreme Donator

    King_'s Avatar
    Join Date
    Jul 2010
    Age
    23
    Posts
    278
    Thanks given
    84
    Thanks received
    24
    Rep Power
    88
    Quote Originally Posted by arch337 View Post
    Well this is the server section so anything server sided need to check so all is ok.
    Under your objectClick methods (firstClickObject, secondClickObject, thirdClickObject) try and add a debug to see if they are even being send when clicking the bank. If not they might not send it through the packet.
    Had a little play around with it, only banks don't work now, other objects are fine, I got it too print in the cmd when I click an object, when I click it, it shows me the id and coords of the bank, it's just all bank booths that don't wanna open the interface.. I've added my openUpBank(); to an altar and it opens the interface
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 1
    Last Post: 05-01-2011, 04:09 AM
  2. Clicking an object VIA client.
    By Uh Oh Son in forum Help
    Replies: 3
    Last Post: 06-05-2010, 09:23 PM
  3. Text when you click an object
    By Oxygen in forum Help
    Replies: 22
    Last Post: 04-30-2009, 05:08 AM
  4. Replies: 5
    Last Post: 03-13-2009, 08:29 PM
  5. Clicking an object
    By brains in forum Help
    Replies: 7
    Last Post: 03-13-2009, 07:56 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •