Thread: 718 - ObjectHandler [QBD]

Results 1 to 4 of 4
  1. #1 718 - ObjectHandler [QBD] 
    Registered Member
    Join Date
    Jul 2012
    Posts
    134
    Thanks given
    3
    Thanks received
    5
    Rep Power
    11
    Hey,

    So something's wrong with my ObjectHandler. Every object I click; whether it's a door, a tree, a thieving stall, a portal, whatever, it takes the same action as what happens when the QBD object is clicked. (Spawns the QBD, etc.)

    This is the code around the QBD object:

    Code:
    				} else if (id == 41911) {	
    						return;
    					}
    					World.QBD = true;
    					WorldTasksManager.schedule(new WorldTask() {
    						int loop;
    
    						@Override
    						public void run() {
    							if (loop == 0) {
    								player.setFreezeDelay(8);
    								player.setNextWorldTile(new WorldTile(3534, 5202, 0));
    								player.setNextFaceWorldTile(new WorldTile(3535, 5203, 0));
    								player.setNextForceTalk(new ForceTalk("I do believe this is the entrance to the Queen Black Dragon..."));
    							} else if (loop == 2) {
    								player.setNextAnimation(new Animation(733));
    								player.setNextForceTalk(new ForceTalk("I guess I'll light this..."));
    							} else if (loop == 7){
    								NPC n = new QBD(15507, new WorldTile(3533, 5199, 0), -1, true, true);
    								World.QBDN = n;
    								n.setNextAnimation(new Animation(16721));
    								player.setNextForceTalk(new ForceTalk("What the..."));
    							} else if (loop == 8){
    								player.setNextWorldTile(new WorldTile(3535, 5190, 0));
    								player.setNextFaceWorldTile(new WorldTile(3535, 5191, 0));
    								player.sm("Good luck against the Queen Black Dragon!");
    								stop();
    							}
    							loop++;
    						}
    					}, 0, 1);
    					if (id == 4277) {
    Does anyone recognize anything wrong in this? Because it seems these actions duplicated to every object.
    Reply With Quote  
     

  2. #2  
    Registered Member
    Join Date
    May 2012
    Posts
    989
    Thanks given
    19
    Thanks received
    28
    Rep Power
    0
    maybe bracket problem in your object handler somewhere or a code not implemented right.
    Attached image
    Reply With Quote  
     

  3. #3  
    Registered Member
    Tyluur's Avatar
    Join Date
    Jun 2010
    Age
    26
    Posts
    5,103
    Thanks given
    1,819
    Thanks received
    1,767
    Rep Power
    2438
    Code:
    } else if (id == 41911) {	
    					World.QBD = true;
    					WorldTasksManager.schedule(new WorldTask() {
    						int loop;
    
    						@Override
    						public void run() {
    							if (loop == 0) {
    								player.setFreezeDelay(8);
    								player.setNextWorldTile(new WorldTile(3534, 5202, 0));
    								player.setNextFaceWorldTile(new WorldTile(3535, 5203, 0));
    								player.setNextForceTalk(new ForceTalk("I do believe this is the entrance to the Queen Black Dragon..."));
    							} else if (loop == 2) {
    								player.setNextAnimation(new Animation(733));
    								player.setNextForceTalk(new ForceTalk("I guess I'll light this..."));
    							} else if (loop == 7){
    								NPC n = new QBD(15507, new WorldTile(3533, 5199, 0), -1, true, true);
    								World.QBDN = n;
    								n.setNextAnimation(new Animation(16721));
    								player.setNextForceTalk(new ForceTalk("What the..."));
    							} else if (loop == 8){
    								player.setNextWorldTile(new WorldTile(3535, 5190, 0));
    								player.setNextFaceWorldTile(new WorldTile(3535, 5191, 0));
    								player.sm("Good luck against the Queen Black Dragon!");
    								stop();
    							}
    							loop++;
    						}
    					}, 0, 1);
    }
    					if (id == 4277) {
    Quote Originally Posted by blakeman8192 View Post
    Keep trying. Quitting is the only true failure.
    Spoiler for skrrrrr:

    Attached image
    Reply With Quote  
     

  4. Thankful user:


  5. #4  
    Registered Member
    Join Date
    Jul 2012
    Posts
    134
    Thanks given
    3
    Thanks received
    5
    Rep Power
    11
    Quote Originally Posted by Tyluur View Post
    Code:
    } else if (id == 41911) {	
    					World.QBD = true;
    					WorldTasksManager.schedule(new WorldTask() {
    						int loop;
    
    						@Override
    						public void run() {
    							if (loop == 0) {
    								player.setFreezeDelay(8);
    								player.setNextWorldTile(new WorldTile(3534, 5202, 0));
    								player.setNextFaceWorldTile(new WorldTile(3535, 5203, 0));
    								player.setNextForceTalk(new ForceTalk("I do believe this is the entrance to the Queen Black Dragon..."));
    							} else if (loop == 2) {
    								player.setNextAnimation(new Animation(733));
    								player.setNextForceTalk(new ForceTalk("I guess I'll light this..."));
    							} else if (loop == 7){
    								NPC n = new QBD(15507, new WorldTile(3533, 5199, 0), -1, true, true);
    								World.QBDN = n;
    								n.setNextAnimation(new Animation(16721));
    								player.setNextForceTalk(new ForceTalk("What the..."));
    							} else if (loop == 8){
    								player.setNextWorldTile(new WorldTile(3535, 5190, 0));
    								player.setNextFaceWorldTile(new WorldTile(3535, 5191, 0));
    								player.sm("Good luck against the Queen Black Dragon!");
    								stop();
    							}
    							loop++;
    						}
    					}, 0, 1);
    }
    					if (id == 4277) {
    Thank you sir.
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

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


User Tag List

Similar Threads

  1. [PI] ObjectHandler placeObject error
    By xTJx in forum Help
    Replies: 1
    Last Post: 09-18-2012, 05:29 AM
  2. Replies: 6
    Last Post: 07-13-2012, 08:32 PM
  3. 667 ObjectHandler
    By davio147 in forum Help
    Replies: 1
    Last Post: 07-05-2012, 11:58 AM
  4. Riotscape/Emulous ObjectHandler
    By Sanity in forum Help
    Replies: 6
    Last Post: 11-09-2009, 07:53 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •