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
Archived Bug Reports Evil Omen Issues Yesterday at 2:42 PM
Archived Bug Reports Stone Form Issues Sunday at 1:01 AM
Archived Bug Reports White Tiger Issues Saturday at 12:18 AM
Archived Bug Reports Purge Magic Issues Oct 4, 2017
Archived Bug Reports Bombard Issues Oct 4, 2017
Mono Support OSX Installation: Encountering Issues Oct 2, 2017
Archived Bug Reports Cleanup Rewards issue Sep 29, 2017