| 08-16-2004, 01:50 AM | #1 |
My problem? I have these variables (SmithingXP and SmithingLevel) which are constantly for some reason becoming "corrupt," or so I call them. It seems that triggers related to them stop working. See below: Whenever I smith something, it does not show the message and does not apply the XP. Now, I recreated the variable. Then, it works, but it doesn't give any more XP! Whats going on? Please help...this has been a MAJOR pain. Code:
Smelting and Smithing
Events
Unit - A unit Begins casting an ability
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Unit-type of (Casting unit)) Equal to Multi-Purpose Forge and Anvil
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Item-type of (Item carried by (Casting unit) in slot 1)) Equal to Bar Mold
(Item-type of (Item carried by (Casting unit) in slot 2)) Equal to Copper Ore
(Item-type of (Item carried by (Casting unit) in slot 3)) Equal to Tin Ore
Then - Actions
Item - Remove (Item carried by (Casting unit) in slot 1)
Item - Remove (Item carried by (Casting unit) in slot 2)
Item - Remove (Item carried by (Casting unit) in slot 3)
Hero - Create Bronze Bar and give it to (Casting unit)
Game - Display to (Player group((Owner of (Casting unit)))) the text: You smelted tin ore...
Set SmithingXP[(Player number of (Owner of (Casting unit)))] = (SmithingXP[(Player number of (Owner of (Casting unit)))] + (30 / SmithingLevel[(Player number of (Owner of (Casting unit)))]))
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Item-type of (Item carried by (Casting unit) in slot 1)) Equal to Dagger Blueprints
(Item-type of (Item carried by (Casting unit) in slot 2)) Equal to Bronze Bar
Then - Actions
Item - Remove (Item carried by (Casting unit) in slot 2)
Hero - Create Bronze Dagger and give it to (Casting unit)
Game - Display to (Player group((Owner of (Casting unit)))) the text: Carefully following...
Set SmithingXP[(Player number of (Owner of (Casting unit)))] = (SmithingXP[(Player number of (Owner of (Casting unit)))] + (50 / SmithingLevel[(Player number of (Owner of (Casting unit)))]))
Else - Actions
Do nothing
Else - Actions
Do nothing |
| 08-16-2004, 02:44 AM | #2 |
Well, is the bar created? Because if it isn't, then I bet the problem lies in the conidtions you put. If - Conditions (Item-type of (Item carried by (Casting unit) in slot 1)) Equal to Bar Mold (Item-type of (Item carried by (Casting unit) in slot 2)) Equal to Copper Ore (Item-type of (Item carried by (Casting unit) in slot 3)) Equal to Tin Ore This looks like that the trigger will only work if the items are in the correct slot. I am not an expert in this area of triggers, so I think you need to change the hero inventory slot # part so that it works when the crafting items are not in the specific slots. That's my only guess... :\ |
