• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

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