Thread: Cannot Find Symbol - Give Me a Hand to Replace It

Results 1 to 3 of 3
  1. #1 Cannot Find Symbol - Give Me a Hand to Replace It 
    power_on
    Guest
    Here's the code I'm using to make it so that when I click on the statue objects that if I'm holding the key (which is dropped by a monster) that it's deleted and an item is added to my inventory - in this case 1 of 4 pieces of 3rd Age Ranged Armour.

    Here's the code, it doesn't recognize the symbol: "if (ItemID == 2418)"

    [PHP] case 7292: //Statue for 3rd Age Ranged Set
    if (ItemID == 2418) {
    deleteItem(2418, getItemSlot(2418), 1);
    sendMessage("The key vanishes from your inventory.");
    addItem(14503, 1);
    } else {
    sendMessage("Nothing interesting happens.");
    }
    break;

    case 7295: //Statue for 3rd Age Ranged Set
    if (ItemID == 2418) {
    deleteItem(2418, getItemSlot(2418), 1);
    sendMessage("The key vanishes from your inventory.");
    addItem(14504, 1);
    } else {
    sendMessage("Nothing interesting happens.");
    }
    break;

    case 7298: //Statue for 3rd Age Ranged Set
    if (ItemID == 2418) {
    deleteItem(2418, getItemSlot(2418), 1);
    sendMessage("The key vanishes from your inventory.");
    addItem(14505, 1);
    } else {
    sendMessage("Nothing interesting happens.");
    }
    break;

    case 7301: //Statue for 3rd Age Ranged Set
    if (ItemID == 2418) {
    deleteItem(2418, getItemSlot(2418), 1);
    sendMessage("The key vanishes from your inventory.");
    addItem(14506, 1);
    } else {
    sendMessage("Nothing interesting happens.");
    }
    break/PHP]

    Do you guys have any snippets for these cases?
    Reply With Quote  
     

  2. #2  
    Member Cannot Find Symbol - Give Me a Hand to Replace It Market Banned


    Luke132's Avatar
    Join Date
    Dec 2007
    Age
    35
    Posts
    12,574
    Thanks given
    199
    Thanks received
    7,106
    Rep Power
    5000
    Where is the code? in the click object packet?

    use something such as :-

    Code:
    if (playerHasItem(#)) {
          stuffHere
    }
    I don't know the exact name for the 'playerHasItem' method, but you'll have one that returns whether you have X item or not.

    Attached imageAttached image
    Reply With Quote  
     

  3. #3  
    power_on
    Guest
    Quote Originally Posted by Luke132 View Post
    Where is the code? in the click object packet?

    use something such as :-

    Code:
    if (playerHasItem(#)) {
          stuffHere
    }
    I don't know the exact name for the 'playerHasItem' method, but you'll have one that returns whether you have X item or not.
    Okay thanks, yeah it's under 'public void objectClick' *Object Click One*
    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

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •