1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

OnDragDrop Issue

Discussion in 'Script Support' started by RoninGT, Sep 16, 2013.

  1. RoninGT
    Offline

    RoninGT Active Member

    Joined:
    Aug 15, 2013
    Messages:
    119
    Likes Received:
    35
    I am working on adding the House teleporters from OSI the vet rewards and the ItemShop ones. However I have having a slight issue on the OnDragDrop Method.

    Code (C#):
    1. #region OnDragDrop
    2. public override bool OnDragDrop( Mobile from, Item dropped )
    3. {
    4. if ( !this.IsVetReward && dropped is GateTravelScroll )
    5. {
    6. if ( this.Charges < this.MaxCharges )
    7. {
    8. if ( this.Charges == 0 )
    9. this.Hue = 0x21C;
    10.  
    11. this.Charges += 5;
    12.  
    13. if ( this.Charges > this.MaxCharges )
    14. this.Charges = this.MaxCharges;
    15.  
    16. from.SendLocalizedMessage(1115127); // The Gate Travel scroll crumbles to dust as it strengthens the House Teleporter.
    17.  
    18. dropped.Delete();
    19. return true;
    20. }
    21. else
    22. {
    23. from.SendLocalizedMessage(1115126); // The House Teleporter cannot be charged any further.
    24. return false;
    25. }
    26. }
    27. else
    28. {
    29. from.SendMessage( "Dafuq?" );
    30. return false;
    31. }
    32. }
    33. #endregion
    lol dont mind the end message Dafug thats was a debug to see if it was even registering.

    From what I cant tell when i drop the gate scroll on the pad nothing happens it completely does not register.

    RoninGT
    --- Double Post Merged, Sep 16, 2013, Original Post Date: Sep 16, 2013 ---
    Nvm... I was using the wrong graphic forgot it has to be flagged container in tiledate :p
     
  2. Insanity
    Offline

    Insanity Active Member

    Joined:
    Mar 2, 2013
    Messages:
    276
    Likes Received:
    61
    Pretty sure you want to be using the OnDroppedOnto override method instead, should fix your problem.
     
Similar Threads: OnDragDrop Issue
Forum Title Date
Bug Reports Crafted items + Fame titles + Crafters name = some issues Sunday at 3:01 PM
Archived Bug Reports Issues with VvV Aug 15, 2017
Script Support carving issue from old script Aug 12, 2017
Archived Bug Reports Issue with using 1 Character Slot in acount.cs Aug 11, 2017
Script Support Complete Spell System spellbook gump issue Aug 9, 2017
Support Boss spawning issue Aug 9, 2017
Archived Bug Reports Issues with the new range packets. Aug 3, 2017