- Joined
- Jul 15, 2018
- Messages
- 111
Hello, I am trying to create a shop where only players who have joined a guild can buy from it. When players join a guild they set the classinterger variable. Am I approaching the problem from the right angle in terms of maximizing optimization? Thanks in advance.
-
Hero Store
-
Events
- Unit - Warrior Master 0014 <gen> Sells an item (from shop)
-
Conditions
- (Item-type of (Item being manipulated)) Equal to Champion's Battleaxe
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ((Hero manipulating item) is A Hero) Equal to True
- classinteger[(Player number of (Owner of (Hero manipulating item)))] Equal to 3
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- heroClassBolean[(Player number of (Owner of (Hero manipulating item)))] Equal to 0
-
Then - Actions
- Hero - Give (Sold Item) to (Triggering unit)
- Set heroClassBolean[(Player number of (Owner of (Hero manipulating item)))] = 1
-
Else - Actions
- Game - Display to tempPG for 5.00 seconds the text: |c00FF0000You can only choose class once|r
- Hero - Drop (Item being manipulated) from (Hero manipulating item)
- Custom script: call DestroyForce ( udg_tempPG )
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Else - Actions
- Game - Display to tempPG for 5.00 seconds the text: |c00FF0000You can't use this
- Hero - Drop (Item being manipulated) from (Hero manipulating item)
- Custom script: call DestroyForce ( udg_tempPG )
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Events