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 Issue with carpentry bulk order deeds. Yesterday at 11:33 AM
Bug Reports Tinker BOD issue. Yesterday at 10:35 AM
Bug Reports New Covetous - Some other issues. Dec 4, 2017
Script Support OnDragLift issue Nov 23, 2017
Bug Reports One issue so far with spawn conversion Nov 21, 2017
Archived Bug Reports Stealth Issues (Yes, Again.) Nov 20, 2017
Archived Bug Reports Issues with Poison Mastery Nov 20, 2017