[Trigger] Help me Complete Trigger with Custom Script?

Status
Not open for further replies.
Level 21
Joined
Mar 16, 2008
Messages
955
I'm going mad trying to make an AI scrpit. I'm supplementing the script by changing ownership of the AI's heroes and making them do certain things at vendors then giving ownship back to the AI. I'm trying to get them to vendor items below item lv 5 but I can't exactly figure out the GUI translation for "item carried by udg_Red_Prince in slot (Integer A)." If anyone can point me in the right direction here, I'd appreciate it a lot. Thanks. Here's how far I got:

  • AI Red Enchant pt2
    • Events
      • Unit - A unit enters Red Ftn <gen>
    • Conditions
      • (Entering unit) Equal to Red_Prince
      • (Owner of (Entering unit)) Equal to Player 13 (Maroon)
    • Actions
      • -------- ------------------------ --------
      • -------- PAWN ITEMS BELOW ILV 5 --------
      • -------- ------------------------ --------
      • For each (Integer A) from 1 to 6, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Item: (Item carried by Red_Prince in slot (Integer A))'s Integer Field: Level ('ilev')) Less than 5
            • Then - Actions
              • Custom script: native IssueNeutralImmediateOrderById(Player(12),udg_king_library[1], integer unitId returns boolean
            • Else - Actions
        • ...
        • ...
        • ...
 

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,866
They don't actually have to pawn the item, you can just remove the item and add gold to the player.

Another solution:
 
Status
Not open for further replies.
Top