• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

I cannot make Unit has just one level 8 item

Level 3
Joined
Jan 31, 2023
Messages
12
I need a help for the problem. I cannot let unit carry one level 8 item. It seems innocent but after I get item which has more level (10 level e.g) than 8 I'm able to get level 8 item again. How I can fix it?

Trigger 1:
  • Levelcheck
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item level of (Item being manipulated)) Equal to 8
    • Actions
      • Set InGame_ItemTypeLevel[(Player number of (Owner of (Hero manipulating item)))] = (InGame_ItemTypeLevel[(Player number of (Owner of (Hero manipulating item)))] + 1)
      • Wait 0.10 seconds
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • InGame_ItemTypeLevel[(Player number of (Owner of (Hero manipulating item)))] Equal to 2
        • Then - Actions
          • Set tmp_point = (Position of (Triggering unit))
          • Custom script: call DisplayTextToPlayer(GetOwningPlayer(GetTriggerUnit()), 0, 0, "|cfff5f5f5Aynı|r|cffffff00 Quarry |r|cfff5f5f5esyadan sadece bir tane ve sadece bir adet |r|cff40e0d0Epic|r|cfff5f5f5 esya tasıyabilirsin. |r")
          • Item - Move (Item being manipulated) to tmp_point
          • Custom script: call RemoveLocation(udg_tmp_point)
        • Else - Actions
Trigger 2:
  • Levelcheck Lose
    • Events
      • Unit - A unit Loses an item
    • Conditions
      • (Item level of (Item being manipulated)) Equal to 8
    • Actions
      • Set InGame_ItemTypeLevel[(Player number of (Owner of (Hero manipulating item)))] = (InGame_ItemTypeLevel[(Player number of (Owner of (Hero manipulating item)))] - 1)
 
Top