Advertisement
Guest User

Untitled

a guest
Dec 10th, 2016
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. Scriptname KMRefundScript extends ActiveMagicEffect
  2. {Passively refunds gold back to user}
  3.  
  4. MiscObject property gold auto
  5. {Item to add to user inventory; in this case gold}
  6.  
  7. int itemValue ; stores the item's gold value
  8.  
  9. ; Triggers when item is used
  10. Event OnItemRemoved (Form Item, int ItemCount, ObjectReference ItemRef, ObjectReference DestCont)
  11. if (!DestCont && !ItemRef)
  12. itemValue = Item.GetGoldValue()
  13. itemValue = itemValue/2
  14. Game.GetPlayer().AddItem(gold, itemValue)
  15. endif
  16. EndEvent
  17. ; - KunoMochi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement