[JASS] PLLZZZ HELP "a simple trigger" whats wrong?

Status
Not open for further replies.
Level 1
Joined
Dec 20, 2005
Messages
7
1.a unit recieved an item

2.a unit must drop picked item if in inventory he has an item IRTIFACT-class , and CAMPAIGN -class

3.artifact-class items 1or more AND campaign-class items 1or more(in invenory) = drop picked item
how can i reallize this?

-event
UNIT-a unit acquires an item
-conditions
(((Hero manipulating item) has an item of type (Random level 8 Artifact item-type)) Equal to True) and (((Hero manipulating item) has an item of type (Random level 0 Campaign item-type)) Equal to True)
-actions
Hero - Drop (Picked item) from (Hero manipulating item)

Plzzz help... whats wrong??? :cry:
 
Level 4
Joined
May 6, 2006
Messages
79
when u adress a random item, the instant you run the trigger the randomizers selects one specific item type from the random range (Random Level 8 Artifact item-type) and does the comparisson. Obviously, a match would be very odd.

Here's what your Trigger should look like

Code:
EVENT:
Unit - A unit Acquires an item

ACTIONS:
For each (Integer A) from 1 to 6 do (Actions):
     -If:
        if conditions:
        -(Item-class of (Item carried by(Hero Manipulating Item)in slot (Integer A))) Equal to Campaign
        if actions:
        -For each (Integer B) from 1 to 6 do (Actions):
                -If:
                     if conditions:
                     -(Item type of(Item caried by(Hero manipulating item)in slot (Integer B)))Equal to Artifact
                     if actions:
                     -Hero - Drop (Item being manipulated) from (Hero manipulating item)
                     -Skip remaining Actions
 
Level 4
Joined
May 6, 2006
Messages
79
also... the function "Picked Item" is used with "Pick every item in rect" functions... it refers to the item being evaluated at that time
Code:
Pick every item in Rect007 and do:
   -if (Type of (Picked Item) equal to(Tome of Experence)) then (Remove(Picked Item))

As you can see in the other post... to get the item aqcuired you use "Event Response - Item Being Manipulated"

well, i hope that helped!
 
Level 1
Joined
Dec 20, 2005
Messages
7
lol

OMFG its works!!!!!!!!!!!!!!!
THANK YOU VERY MUCH!!!

Drop item 1
Events
Unit - A unit Acquires an item
Conditions
Actions
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-class of (Item carried by (Hero manipulating item) in slot (Integer A))) Equal to Campaign
Then - Actions
For each (Integer B) from 1 to 6, do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Item-class of (Item carried by (Hero manipulating item) in slot (Integer B))) Equal to Artifact
Then - Actions
Hero - Drop (Item being manipulated) from (Hero manipulating item)
Else - Actions
Skip remaining actions
Else - Actions


////////////////////////////////////////////

Drop Item 2
Events
Unit - A unit Acquires an item
Conditions
Actions
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-class of (Item carried by (Hero manipulating item) in slot (Integer A))) Equal to Artifact
Then - Actions
For each (Integer B) from 1 to 6, do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Item-class of (Item carried by (Hero manipulating item) in slot (Integer B))) Equal to Campaign
Then - Actions
Hero - Drop (Item being manipulated) from (Hero manipulating item)
Else - Actions
Skip remaining actions
Else - Actions


But now i need 2 triggers....

(First Trigger)
*if first i get CAMPAIGN(andARTIFACT after) = drop artifact
(Second Trigger)
*if first i get ARTIFACT(andCAMPAIGN after) = drop campaign
 
Level 4
Joined
May 6, 2006
Messages
79
ohh... you are right...

uhmmm let me see if i can fix that......by the way.. how do you export GUI triggers like that?? i hat to type the whole thing
 
Status
Not open for further replies.
Top