Name | Type | is_array | initial_value |
a_1_caster | unit | No | |
a_1_dummy | unit | No | |
a_1_traget | unit | No | |
AAHakkeNumbers | integer | No | |
acounter | integer | No | |
alalalallllcudo2 | unit | No | |
Angle | real | Yes | |
angle | real | No | |
Angle2 | real | No | |
AngleLoop | real | No | |
arrayfilled | boolean | Yes | |
b_caster | unit | No | |
b_unit | unit | No | |
BE_angle | real | Yes | |
BE_array | integer | No | |
BE_array2 | integer | No | |
BE_caster | unit | Yes | |
BE_distance | real | Yes | |
BE_dummy | unit | Yes | |
BE_group | group | Yes | |
BE_height | real | Yes | |
BE_integer | integer | No | |
BE_MAX | integer | Yes | |
BE_move | location | Yes | |
BE_point1 | location | Yes | |
BE_speed | integer | Yes | |
BE_target | location | Yes | |
BirdTempPoint | location | Yes | |
BladeUnitGroup | group | No | |
BlowCountera | integer | No | |
bounces | integer | Yes | |
bounces_ran | integer | Yes | |
BRCaster | unit | No | |
BRSF | effect | No | |
BRTarget | unit | No | |
C1TempPoint1 | location | Yes | |
C1TempPoint2 | location | Yes | |
C1TempUnit1 | unit | Yes | |
C1TempUnit2 | unit | Yes | |
cast_angle | real | Yes | |
caster | unit | No | |
Caster | unit | No | |
Caster_1 | unit | No | |
Caster_2 | unit | No | |
caster_mist1 | unit | No | |
caster_mist2 | unit | No | |
Caster_NightmareStrike | unit | No | |
caster_of_Waterwall | unit | No | |
Caster_shadow | unit | No | |
Caster_Unit | unit | No | |
CasterNumber | integer | No | |
CasterPoint | location | No | |
Casters | unit | Yes | |
casterunit | unit | No | |
CastingUnit | unit | Yes | |
castloc | location | No | |
Cha_Caster | unit | No | |
Cha_Special | effect | Yes | |
Cha_Target | unit | No | |
Chidori_Caster | unit | Yes | |
Chidori_CastLoc | location | Yes | |
Chidori_Target | unit | Yes | |
ChidoriCaster | unit | No | |
ChidoriCaster2 | unit | No | |
ChidoriCS_Caster | unit | No | |
ChidoriCS_targett | unit | No | |
ChidoriOrb | effect | No | |
ChidoriPointArray | location | Yes | |
ChidoriRealArray | real | Yes | |
ChidoriTarget | unit | No | |
ComboPoints | integer | Yes | |
Creep_Point | location | Yes | |
damage | integer | Yes | |
Damage | real | Yes | |
damage1 | integer | Yes | |
DamagedGroup | group | No | |
DemGeholfenWird | unit | No | |
DemonSpirit_Effect | unit | No | |
distance | real | No | |
dum | unit | No | |
Dummy_Tornado_1 | unit | No | |
Dummy_Tornado_2 | unit | No | |
Dummys | unit | Yes | |
EarthCaster | unit | No | |
EarthTar | unit | No | |
effect | effect | Yes | |
effect01 | effect | Yes | |
effect_point2 | location | No | |
EffectPoint | location | No | |
effectxXx_point | location | No | |
einheit_item | unit | No | |
end | location | No | |
Enemy_Little_Fireballs | unit | No | |
Eye_Angle | real | No | |
Eye_Attack_Group | group | No | |
Eye_Caster | unit | No | |
Eye_Dummy | unit | No | |
Eye_Fade | real | No | |
Eye_Group | group | No | |
Eye_Players | force | No | |
Eye_Point | location | No | |
Eye_Target | unit | No | |
faceangle | real | No | |
Falk_explode | unit | No | |
first_integer | integer | No | |
FirstBlood | boolean | No | |
Formula | integer | Yes | |
FUEHRERBRETT | leaderboard | No | |
Fury | location | Yes | |
Gblue | integer | No | |
General_Integer | integer | Yes | |
General_Point | location | Yes | |
General_String | string | Yes | |
General_Unit | unit | Yes | |
General_Unitgroup | group | Yes | |
GeyserCasters | group | No | |
GeyserPoint | location | Yes | |
Ggelb | integer | No | |
Ggreen | integer | No | |
Glila | integer | No | |
Gornge | integer | No | |
Gred | integer | No | |
Gredcyan | integer | No | |
Grosa | integer | No | |
gsrzhszhrszhrzhrZZZ | unit | No | |
guk | group | No | |
Hande_effect | effect | No | |
handlevars | gamecache | No | |
henge_unit | unit | No | |
Hero | unit | Yes | |
HR_AbilatyForEffect | abilcode | Yes | |
HR_AnimationCaster | string | Yes | |
HR_AnimationInteger | integer | No | |
HR_AnimationTarget | string | Yes | |
HR_AttacksAllredyDealed | integer | Yes | |
HR_AttacksDealed | integer | Yes | |
HR_AttackSpeed | real | Yes | |
HR_AttackType | attacktype | Yes | |
HR_Aura | unit | Yes | |
HR_Caster | unit | Yes | |
HR_Damage | real | Yes | |
HR_DamageType | damagetype | Yes | |
HR_DebugGroup | group | Yes | |
HR_Distanceaa | real | Yes | |
HR_IncreaseSpeed | real | Yes | |
HR_Integers | integer | Yes | |
HR_Invulnerable | boolean | Yes | |
HR_ManaStolen | real | Yes | |
HR_PlayerLeak | force | No | |
HR_Real | real | Yes | |
HR_SFX1 | string | Yes | |
HR_SFX2 | string | Yes | |
HR_ShowHitsAndIncrease | integer | Yes | |
HR_SpecialHitsCount | integer | No | |
HR_StartingAnimSpeed | real | Yes | |
HR_Target | unit | Yes | |
HR_Text | string | Yes | |
HR_TimeForAttack | real | Yes | |
HRS_AbilatyForEffect | abilcode | No | |
HRS_Animations | string | Yes | |
HRS_AttacksDealed | integer | No | |
HRS_AttackType | attacktype | No | |
HRS_Damage | real | No | |
HRS_DamageType | damagetype | No | |
HRS_HitsDealed64 | boolean | No | |
HRS_IncreaseSpeed | real | No | |
HRS_Invulnerable | boolean | No | |
HRS_ManaStolen | real | No | |
HRS_SFX1 | string | No | |
HRS_SFX2 | string | No | |
HRS_StartCDAttack | real | No | |
HRS_StartingAnimSpeed | real | No | |
HRS_Text | string | No | |
IceNeedlesCaster | unit | No | |
IceNeedlesDummy | unit | No | |
IceNeedlesPoint | location | No | |
Integer_1 | integer | No | |
Itachi_LittleFireball_Caster | unit | No | |
ItemGet | itemcode | No | |
ItemStore | itemcode | Yes | |
ItemSystem_GroupItemLimits | integer | Yes | |
ItemSystem_GroupName | string | Yes | |
ItemSystem_IsUnitBuilding | boolean | No | |
ItemSystem_IsUnitHero | boolean | No | |
ItemSystem_ItemGroupCreate | string | No | |
ItemSystem_ItemGroupStore | itemcode | Yes | |
ItemSystem_NoRestrictions | boolean | No | |
ItemSystem_SpecificUnitType | unitcode | Yes | |
ItemSystem_UnitTypeStore | unitcode | No | |
jacki_mist1 | unit | No | |
jacki_mist2 | unit | No | |
jump_caster | unit | No | |
jump_point | location | No | |
Jumper | unit | No | |
jumper | unit | No | |
jumperposition | location | No | |
JumpStunDummy | unit | No | |
KatonCaster | unit | No | |
KatonDamage | integer | No | |
KatonDirection | integer | No | |
KatonDummy | unit | No | |
KatonGroup | group | No | |
KB_Angle | real | Yes | |
KB_Casters | unit | Yes | |
KB_CountBuffs | integer | No | |
KB_DestroyTrees | boolean | Yes | |
KB_Effects_1 | string | Yes | |
KB_Effects_2 | string | Yes | |
KB_GeneralIntegers | integer | Yes | |
KB_KnockbackedUnits | group | No | |
KB_Levels | integer | Yes | |
KB_MaxDistance | real | Yes | |
KB_ReachedDistance | real | Yes | |
KB_ReducedReal | real | No | |
KB_ReduceSpeedReal | real | Yes | |
KB_SpecificSpeed | real | Yes | |
KB_StartPositions | location | Yes | |
KB_TempPoint | location | Yes | |
KB_TempReal | real | No | |
KB_TotalKnockUnits | integer | No | |
KB_Units | unit | Yes | |
KBA_Caster | unit | No | |
KBA_DestroyTrees | boolean | No | |
KBA_DistancePerLevel | real | No | |
KBA_Level | integer | No | |
KBA_SpecialEffects | string | Yes | |
KBA_Speed | real | No | |
KBA_StartingPosition | location | No | |
KBA_TargetUnit | unit | No | |
Kido | location | No | |
Kopfnuss_caster | unit | No | |
Kopfnuss_dummy | unit | No | |
Kopfnuss_effectpoint | location | No | |
Kopfnuss_point | location | No | |
Kopfnuss_point_flighingdown | unit | No | |
KY_Boolean | boolean | Yes | |
KY_Cast | unit | Yes | |
KY_Derege | real | Yes | |
KY_Target | unit | Yes | |
LastSpecial | effect | No | |
LeeTarget | unit | No | |
LittleFireballs | unit | Yes | |
LOC | location | Yes | |
log | unit | No | |
Loop | integer | Yes | |
loop_off | boolean | Yes | |
LotusAngle | real | No | |
LotusCaster | unit | No | |
LotusDummy | unit | No | |
LotusFade | real | No | |
LotusPoint | location | No | |
LotusTarget | unit | No | |
lpoint | location | No | |
LS_Dummy | unit | No | |
LS_GeneralInteger | integer | No | |
LS_Groups | group | Yes | |
LS_TempPoint | location | Yes | |
mapcenter | location | No | |
MapGroup | group | No | |
MapHostile | location | No | |
mist | unit | No | |
MovePoint | location | No | |
MoveToPoint | location | No | |
NagashiCaster | unit | No | |
NagashiCasterPoint | location | No | |
NagashiDammage | integer | No | |
NagashiGroup | group | No | |
NagashiPoint | location | No | |
NagashiRond | integer | No | |
Naruto | unit | No | |
Narutor_rendano | unit | Yes | |
NarutoRendanCaster | unit | No | |
NarutoRendanGroup | group | No | |
NarutoRendanOn | boolean | No | |
NarutoRendanPoint | location | No | |
NarutoRendanTarget | unit | No | |
NearbyDamagedTargetNightmare | unit | No | |
Nr1 | unit | No | |
Nr10 | unit | No | |
Nr11 | unit | No | |
Nr12 | unit | No | |
Nr2 | unit | No | |
Nr3 | unit | No | |
Nr4 | unit | No | |
Nr5 | unit | No | |
Nr6 | unit | No | |
Nr7 | unit | No | |
Nr8 | unit | No | |
Nr9 | unit | No | |
Number_Of_Souls | integer | No | |
o0Explodierende | unit | No | |
Pains_path | unit | No | |
Player_Integer | integer | No | |
PlayerColors | string | Yes | |
point | location | No | |
Point | location | No | |
point2 | location | No | |
PointLeak | location | No | |
PointLeak2 | location | Yes | |
polarproj | location | No | |
Portal_AllowFlyingUnits | boolean | No | |
Portal_CastTime | real | Yes | |
Portal_Duration | real | Yes | |
Portal_EffectOnEnter | string | No | |
Portal_EffectOnExit | string | No | |
Portal_Height | real | No | |
Portal_PanCamera | boolean | No | |
Portal_Weight | real | No | |
PositionNaruto | location | No | |
PositionTarg | location | No | |
PositionVictim | location | No | |
poto | integer | No | 1 |
Rain_Hard | weathereffect | No | |
RainModi | fogmodifier | No | |
RainyUSER | unit | No | |
RandomHero | unitcode | Yes | |
RandomNumber1 | abilcode | No | |
RandomNumber2 | abilcode | No | |
RandomNumber3 | abilcode | No | |
RandomSharinganAbilityItachi | abilcode | Yes | |
RandomSharinganAbilityKakashi | abilcode | Yes | |
RandomSharinganAbilitySasuke | abilcode | Yes | |
RasenganCaster | unit | No | |
RasenganCaster_Katon | unit | No | |
RasenganClone | unit | No | |
RasenganGroup | group | No | |
RasenganOrb | effect | No | |
RasenganOrbUnit | unit | No | |
RasenganTarget | location | No | |
RasenganTarget2 | unit | No | |
Real | real | No | |
Real2 | real | Yes | |
Real_1 | real | No | |
Real_2 | real | No | |
RealCriecle | real | No | |
Reanimated | unit | No | |
Rinnegan_caster | unit | No | |
RinnegansSpikes | group | No | |
sasori1 | unit | No | |
sasori2 | unit | No | |
Schlag_caster | unit | No | |
Schlag_dummy | unit | No | |
Schlag_effectpoint | location | No | |
se | effect | No | |
Seeemsingring_explode | unit | No | |
SF | effect | Yes | |
sharingan1 | unit | No | |
sharingan2 | unit | No | |
sharingan3 | unit | No | |
sharingan_ability1 | abilcode | No | |
sharingan_ability2 | abilcode | No | |
sharingan_ability3 | abilcode | No | |
Soul_Effect | effect | Yes | |
Soul_Misile | unit | No | |
Soul_Missile | unit | No | |
Soulless | group | No | |
SP_Ang | real | No | |
SP_Finished | boolean | Yes | |
SP_Id | integer | No | |
SP_Level | integer | No | |
SP_Portal1 | destructable | No | |
SP_Portal2 | destructable | No | |
SP_PORTAL_BIRTH_TIMEOUT | real | No | 6.00 |
SP_Portal_ById1 | destructable | Yes | |
SP_Portal_ById2 | destructable | Yes | |
SP_PORTAL_DEATH_TIMEOUT | real | No | 5.77 |
SP_PortalBirth1 | sound | Yes | |
SP_PortalBirth2 | sound | Yes | |
SP_Rect1 | rect | Yes | |
SP_Rect2 | rect | Yes | |
SP_Region1 | integer | Yes | |
SP_Region2 | integer | Yes | |
SP_Temp_Point1 | location | No | |
SP_Temp_Point2 | location | No | |
SP_Trigger | trigger | No | |
SP_TriggerAction | integer | Yes | |
SP_UnitTeleported | boolean | Yes | |
SP_Visibility | fogmodifier | No | |
Specialefect | effect | No | |
Specialeffect | effect | No | |
SpellPoint | location | No | |
Spree_Count | integer | Yes | |
Spree_Sounds | sound | Yes | |
Spree_Texts | string | Yes | |
SpreeEnd_Texts | string | Yes | |
Sprite | string | Yes | |
ss_const | real | No | |
Start | location | No | |
start | location | No | |
StichCaster | unit | No | |
StichOrb | effect | No | |
Stichtraget | unit | No | |
Stolen_Unit | unit | Yes | |
targ | unit | No | |
Target | location | No | |
target | unit | No | |
Target2 | unit | No | |
Target_NightmareEffect | effect | No | |
Target_NightmareStrike | unit | No | |
target_shadow | unit | No | |
TargetPoint | location | No | |
targetpos | rect | No | |
tdef | terraindeformation | No | |
Temp_Integer | integer | No | |
Temp_Trig_Rect | rect | Yes | |
TempGroup | group | No | |
TempGroup2 | group | No | |
TempInteger | integer | No | |
TempLoc | location | No | |
TempLocA | location | No | |
TempLocB | location | No | |
temppoint | location | No | |
TempPoint | location | No | |
TempPoint1 | location | No | |
TempPoint2 | location | No | |
TempPoint3 | location | No | |
TempRinneganpoint | location | No | |
TempUnit | unit | No | |
this_filter | integer | No | |
thx_1 | itemcode | Yes | |
Traget | location | No | |
Traget2 | unit | No | |
traget2 | location | No | |
tragetUnitsOfNaruto | unit | No | |
trit_angle | real | No | |
trit_caster | unit | No | |
trit_dummy | unit | No | |
trit_effectpoint | location | No | |
trit_group | group | No | |
trit_point | location | No | |
trit_traget | unit | No | |
unit | unit | Yes | |
Unitcasting | unit | No | |
UnitGroup | group | Yes | |
Unitgroup_1 | group | No | |
Unitgroup_2 | group | No | |
UnitLoc | location | No | |
UnitPositionLoc | location | Yes | |
Units | unit | Yes | |
UnitTargets | unit | Yes | |
VampEffect | effect | Yes | |
VampInteger | integer | Yes | |
VampPoint | location | Yes | |
VampUnit | unit | Yes | |
Victim | unit | No | |
Vison_Point | location | No | |
Water_Angle | real | No | |
Water_Caser | unit | No | |
Water_Caster_Position | location | No | |
Water_Dummy | unit | No | |
Water_Leak_Position | location | No | |
Water_Player | player | No | |
Water_Position | location | No | |
weather_hidden1 | weathereffect | No | |
weather_hidden2 | weathereffect | No | |
WhirlPools | group | No | |
xXxBoomlyxXxDummy | unit | No | |
xXxjaniloxXxDummy | unit | No |
//TESH.scrollpos=34
//TESH.alwaysfold=0
Just Another Item System made by 'WildField'
// Please credit me if you are using it in your map
"How to import it:"
- Create GUI variable handlevars - gamecache
- Copy the code in 'Header Information' trigger to your map header
- Copy triggers 'StoreItemData' and 'ItemGetDataStoredSystem' to your map (if you want import recipe system)
- Copy triggers 'ItemGroupCreate', 'ItemLimitsStore' and 'ItemCheckGroupLimits' (if you want group system)
===================================================================
1. Recipe System
"How to use it:"
- You don't need to edit ItemGetDataStoredSystem just copy it in your map
- Don't touch first 3 strings in Store Item Data
//Conditions:
- You can use item type conditions Is unit hero or is unit structure.
If you want you can add specific unit type (up to 8191 unit types) which could use the
item combinations
- If you choose Specific unit type conditions is unit hero/structure no longer works
- If you don't want any conditions set ItemSystem_NoRestrictions - true
//Items:
- System support up to 6 ingridiends and 1 constructed item
- After conditions you can add your item combination
- First set ItemGet to item which you want to get
- Then set the item combination:
ItemStore[1] - first reagent
ItemStore[2] - second ... up to 6 ItemStore[6]
- After that copy 2 custom strings after your item combination
- Then create other item combination, etc...
====================================================================
Advantages of my system:
- You don't need to create a lot of triggers for each item
- Easy to use by non-JASSers
- Flexible system which you can customize by using conditions
- Contains only 2 triggers and 1 function which needed to be put in the header
- Very comfortable system at all
=====================================================================
2. GroupingSystem
"How to use it"
- You don't need to modify ItemCheckGroupLimits
- Create item groups in ItemGroupCreate trigger
Example:
set ItemSystem_ItemGroupCreate = Weapons (your name of group)
set ItemSystem_ItemGroupStore[1] = Your first weapon
set ItemSystem_ItemGroupStore[2] = Your second weapon, etc...
*Custom script code* (copy it after each item group)
- Then Create limits for each unit type in ItemLimitsStore
set ItemSystem_UnitTypeStore - Your unit type you want to add limits
set ItemSystem_ItemGroupStore[1] = Name of group (e.g. Weapons)
set ItemSystem_GroupItemLimits[1] = 2 (your limit of this group for chosen unit-type)
- Then add second group etc....
After each limit adding copy custom script action
P.S. You can add unlimited number of groups and each item CAN be in several unit-groups
// Credit me if you are using my systems in your map
// Any bugs/suggestions send to [email protected]
// Thanks for using my system
//TESH.scrollpos=0
//TESH.alwaysfold=0
function H2I takes handle h returns integer
return h
return 0
endfunction
function GameCache takes nothing returns gamecache
if udg_handlevars == null then
set udg_handlevars = InitGameCache("gamecache.w3v")
endif
return udg_handlevars
endfunction
function ItemStoreData takes integer int returns nothing
local integer i = 1
loop
exitwhen i > 6 or udg_ItemStore[i] == 0
call StoreInteger(GameCache(),"CombN"+I2S(int),"ItemN"+I2S(i),udg_ItemStore[i])
set udg_ItemStore[i] = 0
set i = i + 1
endloop
call StoreInteger(GameCache(),"CombN"+I2S(int),"ItemGet",udg_ItemGet)
endfunction
function StoreItemGroup takes nothing returns nothing
local integer i = 1
local integer j = 1
local string str = udg_ItemSystem_ItemGroupCreate
loop
exitwhen udg_ItemSystem_ItemGroupStore[i] == 0
if GetStoredString(GameCache(),"ItemStoreGroup"+I2S(udg_ItemSystem_ItemGroupStore[i]),"GroupGet") == null then
call StoreBoolean(GameCache(),"ItemStoreGroup"+I2S(udg_ItemSystem_ItemGroupStore[i]),"GroupName"+str,true)
call StoreString(GameCache(),"ItemStoreGroup"+I2S(udg_ItemSystem_ItemGroupStore[i]),"GroupGet",str)
else
set j = 1
loop
exitwhen GetStoredString(GameCache(),"ItemStoreGroup"+I2S(udg_ItemSystem_ItemGroupStore[i]),"AddGroupGet"+I2S(j)) == null
set j = j + 1
endloop
call StoreBoolean(GameCache(),"ItemStoreGroup"+I2S(udg_ItemSystem_ItemGroupStore[i]),"GroupName"+str,true)
call StoreString(GameCache(),"ItemStoreGroup"+I2S(udg_ItemSystem_ItemGroupStore[i]),"AddGroupGet"+I2S(j),str)
endif
set udg_ItemSystem_ItemGroupStore[i] = 0
set i = i + 1
endloop
endfunction
function StoreGroupLimits takes nothing returns nothing
local integer i = 1
local integer ut = udg_ItemSystem_UnitTypeStore
loop
exitwhen udg_ItemSystem_GroupName[i] == null
call StoreInteger(GameCache(),"UnitID"+I2S(ut),"GroupName"+udg_ItemSystem_GroupName[i],udg_ItemSystem_GroupItemLimits[i])
set udg_ItemSystem_GroupName[i] = null
set i = i + 1
endloop
endfunction
//TESH.scrollpos=74
//TESH.alwaysfold=0
function ItemGetDataStoredSystem_Condition takes nothing returns boolean
local integer i = 1
local boolean bool = true
if udg_ItemSystem_NoRestrictions == true then
return true
endif
if udg_ItemSystem_SpecificUnitType[1] != null then
set bool = false
loop
exitwhen udg_ItemSystem_SpecificUnitType[i] == null or bool == true
if GetUnitTypeId(GetTriggerUnit()) == udg_ItemSystem_SpecificUnitType[i] then
set bool = true
endif
set i = i + 1
endloop
return bool
endif
return IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO) == udg_ItemSystem_IsUnitHero and IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE) == udg_ItemSystem_IsUnitBuilding
endfunction
function ItemGetDataStoredSystem_Action takes nothing returns nothing
local integer i = 0
local integer int = 1
local integer int2 = 1
local integer int3 = 1
local integer itype = GetStoredInteger(udg_handlevars,"CombN"+I2S(1),"ItemN"+I2S(1))
local boolean bool = false
local boolean temp = true
local unit u = GetTriggerUnit()
loop
exitwhen (itype == 0) or bool == true
if bool != true then
set temp = true
set int2 = 1
set i = 0
loop
exitwhen temp == false or bool == true
if GetItemTypeId(UnitItemInSlot(u,i)) == itype and GetStoredBoolean(udg_handlevars,"Check","NoItem"+I2S(i)) != true then
set int2 = int2 + 1
call StoreBoolean(udg_handlevars,"Check","NoItem"+I2S(i),true)
set i = -1
set itype = GetStoredInteger(udg_handlevars,"CombN"+I2S(int),"ItemN"+I2S(int2))
if itype == 0 then
set bool = true
set itype = GetStoredInteger(udg_handlevars,"CombN"+I2S(int),"ItemGet")
set int3 = 0
loop
exitwhen int3 > 5
call FlushStoredBoolean(udg_handlevars,"Check","NoItem"+I2S(int3))
set int3 = int3 + 1
endloop
endif
elseif i > 5 then
set temp = false
set int3 = 0
loop
exitwhen int3 > 5
call FlushStoredBoolean(udg_handlevars,"Check","NoItem"+I2S(int3))
set int3 = int3 + 1
endloop
endif
set i = i + 1
endloop
if bool == false then
set int = int + 1
set itype = GetStoredInteger(udg_handlevars,"CombN"+I2S(int),"ItemN"+I2S(1))
endif
endif
endloop
if bool == true then
set i = 0
set int2 = 1
loop
exitwhen GetStoredInteger(udg_handlevars,"CombN"+I2S(int),"ItemN"+I2S(int2)) == 0
if GetItemTypeId(UnitItemInSlot(u,i)) == GetStoredInteger(udg_handlevars,"CombN"+I2S(int),"ItemN"+I2S(int2)) then
call RemoveItem(UnitItemInSlot(u,i))
set i = 0
set int2 = int2 + 1
else
set i = i + 1
endif
endloop
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Items\\TomeOfRetraining\\TomeOfRetrainingCaster.mdl",GetUnitX(u),GetUnitY(u)))
call UnitAddItem(u,CreateItem(itype,0,0))
endif
set u = null
endfunction
//===========================================================================
function InitTrig_ItemGetDataStoredSystem takes nothing returns nothing
set gg_trg_ItemGetDataStoredSystem = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ(gg_trg_ItemGetDataStoredSystem,EVENT_PLAYER_UNIT_PICKUP_ITEM)
call TriggerAddCondition(gg_trg_ItemGetDataStoredSystem,Condition(function ItemGetDataStoredSystem_Condition))
call TriggerAddAction(gg_trg_ItemGetDataStoredSystem,function ItemGetDataStoredSystem_Action)
endfunction
//TESH.scrollpos=73
//TESH.alwaysfold=0
function Add_Group_Limits takes integer num returns nothing
local item It = GetManipulatedItem()
local unit u = GetTriggerUnit()
local integer ut = GetUnitTypeId(u)
local integer it = GetItemTypeId(It)
local string grp = GetStoredString(GameCache(),"ItemStoreGroup"+I2S(it),"AddGroupGet"+I2S(num))
local integer i = 0
local integer limit = 0
local integer ulimit = GetStoredInteger(GameCache(),"UnitID"+I2S(ut),"GroupName"+grp)
if It == null then
set u = null
return
endif
if ulimit == 0 then
call UnitRemoveItem(u,It)
if grp == null then
call DisplayTextToPlayer(GetOwningPlayer(u), 0, 0, "|cFF00FFFFYou can't have items of this type")
else
call DisplayTextToPlayer(GetOwningPlayer(u), 0, 0, "|cFF00FFFFYou can't have items of type "+grp)
endif
set It = null
set u = null
return
endif
loop
exitwhen i > 5
if GetStoredBoolean(GameCache(),"ItemStoreGroup"+I2S(GetItemTypeId(UnitItemInSlot(u,i))),"GroupName"+grp) == true and UnitItemInSlot(u,i) != It then
set limit = limit + 1
endif
set i = i + 1
endloop
if limit >= ulimit then
call UnitRemoveItem(u,It)
if ulimit == 1 then
call DisplayTextToPlayer(GetOwningPlayer(u), 0, 0, "|cFF00FFFFYou can't have more than "+I2S(ulimit)+" item of type "+grp)
else
call DisplayTextToPlayer(GetOwningPlayer(u), 0, 0, "|cFF00FFFFYou can't have more than "+I2S(ulimit)+" items of type "+grp)
endif
else
if GetStoredString(GameCache(),"ItemStoreGroup"+I2S(it),"AddGroupGet"+I2S(num+1)) != null then
call Add_Group_Limits(num+1)
endif
endif
set It = null
set u = null
endfunction
function Check_Group_Limits takes nothing returns nothing
local item It = GetManipulatedItem()
local unit u = GetTriggerUnit()
local integer ut = GetUnitTypeId(u)
local integer it = GetItemTypeId(It)
local string grp = GetStoredString(GameCache(),"ItemStoreGroup"+I2S(it),"GroupGet")
local integer i = 0
local integer limit = 0
local integer ulimit = GetStoredInteger(GameCache(),"UnitID"+I2S(ut),"GroupName"+grp)
if It == null then
set u = null
return
endif
if ulimit == 0 then
call UnitRemoveItem(u,It)
if grp == null then
call DisplayTextToPlayer(GetOwningPlayer(u), 0, 0, "|cFF00FFFFYou can't have items of this type")
else
call DisplayTextToPlayer(GetOwningPlayer(u), 0, 0, "|cFF00FFFFYou can't have items of type "+grp)
endif
set It = null
set u = null
return
endif
loop
exitwhen i > 5
if GetStoredBoolean(GameCache(),"ItemStoreGroup"+I2S(GetItemTypeId(UnitItemInSlot(u,i))),"GroupName"+grp) == true and UnitItemInSlot(u,i) != It then
set limit = limit + 1
endif
set i = i + 1
endloop
if limit >= ulimit then
call UnitRemoveItem(u,It)
if ulimit == 1 then
call DisplayTextToPlayer(GetOwningPlayer(u), 0, 0, "|cFF00FFFFYou can't have more than "+I2S(ulimit)+" item of type "+grp)
else
call DisplayTextToPlayer(GetOwningPlayer(u), 0, 0, "|cFF00FFFFYou can't have more than "+I2S(ulimit)+" items of type "+grp)
endif
else
if GetStoredString(GameCache(),"ItemStoreGroup"+I2S(it),"AddGroupGet"+I2S(1)) != null then
call Add_Group_Limits(1)
endif
endif
set It = null
set u = null
endfunction
function Check_Dummy takes nothing returns boolean
return (GetUnitTypeId(GetTriggerUnit()) != 'h00W')
endfunction
//===========================================================================
function InitTrig_ItemCheckGroupLimits takes nothing returns nothing
set gg_trg_ItemCheckGroupLimits = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ(gg_trg_ItemCheckGroupLimits,EVENT_PLAYER_UNIT_PICKUP_ITEM)
call TriggerAddCondition( gg_trg_ItemCheckGroupLimits, Condition(function Check_Dummy))
call TriggerAddAction( gg_trg_ItemCheckGroupLimits, function Check_Group_Limits )
endfunction