**************************************************************************************
*************************Simple Recipe System v1.01***********************************
**********************************************************************************
******************************By: Matrix****************************************
Pros:
1) Allow same item-types [like Stygian Desolator]
2) Consists of 74 lines
3) Can be used not only for Jassers/vJassers but also for GUI users
4) It is the simpliest system I've ever seen
Cons:
The only thing it's bad is if's. Due to them it's not very fast
*******************
**Changelog v1.02**
*******************
1) Added RecipeEx function
2) Now function returns a boolean depending on wether the recipe succeeded or not
3) More Cleaner&Leakless code
*******************
**How to implant:**
*******************
The system is very easy. The only things you'll have to do to implement the system is to
copy the custom script code
*******************
**How to use:******
*******************
To use this system u have to have a trigger with the event unit pick up item and in the actions
just write:
call Recipe(GetTriggerUnit(),'rde3','rde1','rde1',0,0,0,0)
Arguments:
GetTriggerUnit() - Unit that picked up item //I think it is clear
'rde3' - The New Item rawcode (the rawcode of the item that must be created)
'rde1' - The Rawcode of the first ingredient
'rde1' - The Rawcode of the second ingredient
0 - The Recipe hasn't more ingredients so the 3,4,5,6 ingredient are 0
************************
*****Trouble Shooter****
************************
Q: I have some troubles with this system. It doesn't work!!!
A: The reason maybe globals. If u have global integer i, i1,i2,i3,i4,i5,i6,count,j,ni... and all the arguments the system works with.
If u havent JassNewGenPack all must be Ok.
Q: Why did u do this shit?
A: I'm cr8ing an AoS map and I was searching for a simple recipe sytem but I didn't find=(
That's why I decided to cr8 my own =)
Hopefully you like the system!
~Matrix 3.08.08
P.S. I think I found my new home...
It's thehelper.net - really helper
Thx a lot to Earth-Fury for his suggestion