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
General Discussion You must upgrade your account Issue with custom client Monday at 11:11 PM
Archived Bug Reports Issues with Fencing Mastery Feb 16, 2018
Archived Bug Reports Issue with Moongates Feb 16, 2018
Archived Bug Reports Issue with Spell Animations Feb 16, 2018
Archived Bug Reports Issues with Hit Velocity Feb 15, 2018
Script Support Small issue with spell Feb 14, 2018
Archived Bug Reports Gauntlet spawner issue Feb 13, 2018