Hey.
i cant really figur out what im doing wrong, and it is extremly annoying, so i hope you guys can maybe in the right direction
this is the code as it is from the orginal system.
now this is what i wanted it to be
i have created the variables (integer)
GetHeroMig
GetHeroSta
GetHeroWil
here is the full code of this section
thanks in advance
i cant really figur out what im doing wrong, and it is extremly annoying, so i hope you guys can maybe in the right direction
this is the code as it is from the orginal system.
JASS:
function TRSPerStr takes nothing returns nothing
local integer i=GetRandomInt(TRSMinS,TRSMaxS)
if IsUnitType(TRSUnit,UNIT_TYPE_HERO) then
call SetHeroStr(TRSUnit,GetHeroStr(TRSUnit,false)+i,true)
endif
endfunction
function TRSPerAgi takes nothing returns nothing
local integer i=GetRandomInt(TRSMinS,TRSMaxS)
if IsUnitType(TRSUnit,UNIT_TYPE_HERO) then
call SetHeroAgi(TRSUnit,GetHeroAgi(TRSUnit,false)+i,true)
endif
endfunction
function TRSPerInt takes nothing returns nothing
local integer i=GetRandomInt(TRSMinS,TRSMaxS)
if IsUnitType(TRSUnit,UNIT_TYPE_HERO) then
call SetHeroInt(TRSUnit,GetHeroInt(TRSUnit,false)+i,true)
endif
endfunction
now this is what i wanted it to be
JASS:
function TRSPerStr takes nothing returns nothing
local integer i=GetRandomInt(TRSMinS,TRSMaxS)
if IsUnitType(TRSUnit,UNIT_TYPE_HERO) then
set udg_GetHeroMig = (TRSUnit,GetHeroStr(TRSUnit,false)+i,true)
endif
endfunction
function TRSPerAgi takes nothing returns nothing
local integer i=GetRandomInt(TRSMinS,TRSMaxS)
if IsUnitType(TRSUnit,UNIT_TYPE_HERO) then
set udg_GetHeroSta = (TRSUnit,GetHeroAgi(TRSUnit,false)+i,true)
endif
endfunction
function TRSPerInt takes nothing returns nothing
local integer i=GetRandomInt(TRSMinS,TRSMaxS)
if IsUnitType(TRSUnit,UNIT_TYPE_HERO) then
set udg_GetHeroWil = (TRSUnit,GetHeroInt(TRSUnit,false)+i,true)
endif
endfunction
i have created the variables (integer)
GetHeroMig
GetHeroSta
GetHeroWil
here is the full code of this section
JASS:
//#######################################################
// I T E M B O N U S E S
//#######################################################
function TRSPawnItemRate takes nothing returns real
return 0.5
endfunction
function TRSMaxItemCostReduction takes nothing returns real
return 50.
endfunction
function TRSMaxItemTradingSkill takes nothing returns real
return 50.
endfunction
function TRSExInvId takes nothing returns integer
return 039;A00U039;
endfunction
function TRSInitAbilitys takes nothing returns nothing
call InitSubAbilBR(1,"^Size=16;Rarity=2.25;maxval=32768;minval=-32768;-32768=039;Ta00039;;-16384=039;Ta01039;;-8192=039;Ta02039;;-4096=039;Ta03039;;-2048=039;Ta04039;;-1024=039;Ta05039;;-512=039;Ta06039;;-256=039;Ta07039;;-128=039;Ta08039;;-64=039;Ta09039;;-32=039;Ta10039;;-16=039;Ta11039;;-8=039;Ta12039;;-4=039;Ta13039;;-2=039;Ta14039;;-1=039;Ta15039;;1=039;Ta16039;;2=039;Ta17039;;4=039;Ta18039;;8=039;Ta19039;;16=039;Ta20039;;32=039;Ta21039;;64=039;Ta22039;;128=039;Ta23039;;256=039;Ta24039;;512=039;Ta25039;;1024=039;Ta26039;;2048=039;Ta27039;;4096=039;Ta28039;;8192=039;Ta29039;;16384=039;Ta30039;;32768=039;Ta31039;;") // - dmg
call InitSubAbilBR(2,"^Size=16;Rarity=1.85;maxval=32768;minval=-32768;-32768=039;Tb00039;;-16384=039;Tb01039;;-8192=039;Tb02039;;-4096=039;Tb03039;;-2048=039;Tb04039;;-1024=039;Tb05039;;-512=039;Tb06039;;-256=039;Tb07039;;-128=039;Tb08039;;-64=039;Tb09039;;-32=039;Tb10039;;-16=039;Tb11039;;-8=039;Tb12039;;-4=039;Tb13039;;-2=039;Tb14039;;-1=039;Tb15039;;1=039;Tb16039;;2=039;Tb17039;;4=039;Tb18039;;8=039;Tb19039;;16=039;Tb20039;;32=039;Tb21039;;64=039;Tb22039;;128=039;Tb23039;;256=039;Tb24039;;512=039;Tb25039;;1024=039;Tb26039;;2048=039;Tb27039;;4096=039;Tb28039;;8192=039;Tb29039;;16384=039;Tb30039;;32768=039;Tb31039;;") // - def
call InitSubAbilBR(3,"^Size=16;Rarity=4.0;maxval=32768;minval=-32768;-32768=039;Tc00039;;-16384=039;Tc01039;;-8192=039;Tc02039;;-4096=039;Tc03039;;-2048=039;Tc04039;;-1024=039;Tc05039;;-512=039;Tc06039;;-256=039;Tc07039;;-128=039;Tc08039;;-64=039;Tc09039;;-32=039;Tc10039;;-16=039;Tc11039;;-8=039;Tc12039;;-4=039;Tc13039;;-2=039;Tc14039;;-1=039;Tc15039;;1=039;Tc16039;;2=039;Tc17039;;4=039;Tc18039;;8=039;Tc19039;;16=039;Tc20039;;32=039;Tc21039;;64=039;Tc22039;;128=039;Tc23039;;256=039;Tc24039;;512=039;Tc25039;;1024=039;Tc26039;;2048=039;Tc27039;;4096=039;Tc28039;;8192=039;Tc29039;;16384=039;Tc30039;;32768=039;Tc31039;;") // - HP
call InitSubAbilBR(4,"^Size=16;Rarity=1.95;maxval=32768;minval=-32768;-32768=039;Td00039;;-16384=039;Td01039;;-8192=039;Td02039;;-4096=039;Td03039;;-2048=039;Td04039;;-1024=039;Td05039;;-512=039;Td06039;;-256=039;Td07039;;-128=039;Td08039;;-64=039;Td09039;;-32=039;Td10039;;-16=039;Td11039;;-8=039;Td12039;;-4=039;Td13039;;-2=039;Td14039;;-1=039;Td15039;;1=039;Td16039;;2=039;Td17039;;4=039;Td18039;;8=039;Td19039;;16=039;Td20039;;32=039;Td21039;;64=039;Td22039;;128=039;Td23039;;256=039;Td24039;;512=039;Td25039;;1024=039;Td26039;;2048=039;Td27039;;4096=039;Td28039;;8192=039;Td29039;;16384=039;Td30039;;32768=039;Td31039;;") // - mana
call InitSubAbilBR(5,"^Size=16;Rarity=1.6;maxval=32768;minval=-32768;-32768=039;Te00039;;-16384=039;Te01039;;-8192=039;Te02039;;-4096=039;Te03039;;-2048=039;Te04039;;-1024=039;Te05039;;-512=039;Te06039;;-256=039;Te07039;;-128=039;Te08039;;-64=039;Te09039;;-32=039;Te10039;;-16=039;Te11039;;-8=039;Te12039;;-4=039;Te13039;;-2=039;Te14039;;-1=039;Te15039;;1=039;Te16039;;2=039;Te17039;;4=039;Te18039;;8=039;Te19039;;16=039;Te20039;;32=039;Te21039;;64=039;Te22039;;128=039;Te23039;;256=039;Te24039;;512=039;Te25039;;1024=039;Te26039;;2048=039;Te27039;;4096=039;Te28039;;8192=039;Te29039;;16384=039;Te30039;;32768=039;Te31039;;") // - str
call InitSubAbilBR(6,"^Size=16;Rarity=1.6;maxval=32768;minval=-32768;-32768=039;Tf00039;;-16384=039;Tf01039;;-8192=039;Tf02039;;-4096=039;Tf03039;;-2048=039;Tf04039;;-1024=039;Tf05039;;-512=039;Tf06039;;-256=039;Tf07039;;-128=039;Tf08039;;-64=039;Tf09039;;-32=039;Tf10039;;-16=039;Tf11039;;-8=039;Tf12039;;-4=039;Tf13039;;-2=039;Tf14039;;-1=039;Tf15039;;1=039;Tf16039;;2=039;Tf17039;;4=039;Tf18039;;8=039;Tf19039;;16=039;Tf20039;;32=039;Tf21039;;64=039;Tf22039;;128=039;Tf23039;;256=039;Tf24039;;512=039;Tf25039;;1024=039;Tf26039;;2048=039;Tf27039;;4096=039;Tf28039;;8192=039;Tf29039;;16384=039;Tf30039;;32768=039;Tf31039;;") // - int
call InitSubAbilBR(7,"^Size=16;Rarity=1.6;maxval=32768;minval=-32768;-32768=039;Tg00039;;-16384=039;Tg01039;;-8192=039;Tg02039;;-4096=039;Tg03039;;-2048=039;Tg04039;;-1024=039;Tg05039;;-512=039;Tg06039;;-256=039;Tg07039;;-128=039;Tg08039;;-64=039;Tg09039;;-32=039;Tg10039;;-16=039;Tg11039;;-8=039;Tg12039;;-4=039;Tg13039;;-2=039;Tg14039;;-1=039;Tg15039;;1=039;Tg16039;;2=039;Tg17039;;4=039;Tg18039;;8=039;Tg19039;;16=039;Tg20039;;32=039;Tg21039;;64=039;Tg22039;;128=039;Tg23039;;256=039;Tg24039;;512=039;Tg25039;;1024=039;Tg26039;;2048=039;Tg27039;;4096=039;Tg28039;;8192=039;Tg29039;;16384=039;Tg30039;;32768=039;Tg31039;;") // - agi
call InitSubAbilBR(8,"^Size=16;Rarity=1.1;maxval=32768;minval=-32768;-32768=039;Th00039;;-16384=039;Th01039;;-8192=039;Th02039;;-4096=039;Th03039;;-2048=039;Th04039;;-1024=039;Th05039;;-512=039;Th06039;;-256=039;Th07039;;-128=039;Th08039;;-64=039;Th09039;;-32=039;Th10039;;-16=039;Th11039;;-8=039;Th12039;;-4=039;Th13039;;-2=039;Th14039;;-1=039;Th15039;;1=039;Th16039;;2=039;Th17039;;4=039;Th18039;;8=039;Th19039;;16=039;Th20039;;32=039;Th21039;;64=039;Th22039;;128=039;Th23039;;256=039;Th24039;;512=039;Th25039;;1024=039;Th26039;;2048=039;Th27039;;4096=039;Th28039;;8192=039;Th29039;;16384=039;Th30039;;32768=039;Th31039;;") // - lifelich
call InitSubAbilBR(9,"^Size=16;Rarity=1.2;maxval=32768;minval=-32768;-32768=039;Ti00039;;-16384=039;Ti01039;;-8192=039;Ti02039;;-4096=039;Ti03039;;-2048=039;Ti04039;;-1024=039;Ti05039;;-512=039;Ti06039;;-256=039;Ti07039;;-128=039;Ti08039;;-64=039;Ti09039;;-32=039;Ti10039;;-16=039;Ti11039;;-8=039;Ti12039;;-4=039;Ti13039;;-2=039;Ti14039;;-1=039;Ti15039;;1=039;Ti16039;;2=039;Ti17039;;4=039;Ti18039;;8=039;Ti19039;;16=039;Ti20039;;32=039;Ti21039;;64=039;Ti22039;;128=039;Ti23039;;256=039;Ti24039;;512=039;Ti25039;;1024=039;Ti26039;;2048=039;Ti27039;;4096=039;Ti28039;;8192=039;Ti29039;;16384=039;Ti30039;;32768=039;Ti31039;;") // - ias
call InitSubAbilBR(10,"^Size=16;Rarity=1.35;maxval=32768;minval=-32768;-32768=039;Tj00039;;-16384=039;Tj01039;;-8192=039;Tj02039;;-4096=039;Tj03039;;-2048=039;Tj04039;;-1024=039;Tj05039;;-512=039;Tj06039;;-256=039;Tj07039;;-128=039;Tj08039;;-64=039;Tj09039;;-32=039;Tj10039;;-16=039;Tj11039;;-8=039;Tj12039;;-4=039;Tj13039;;-2=039;Tj14039;;-1=039;Tj15039;;1=039;Tj16039;;2=039;Tj17039;;4=039;Tj18039;;8=039;Tj19039;;16=039;Tj20039;;32=039;Tj21039;;64=039;Tj22039;;128=039;Tj23039;;256=039;Tj24039;;512=039;Tj25039;;1024=039;Tj26039;;2048=039;Tj27039;;4096=039;Tj28039;;8192=039;Tj29039;;16384=039;Tj30039;;32768=039;Tj31039;;") // - lifereg
call InitSubAbilBR(11,"^Size=16;Rarity=1.2;maxval=32768;minval=-32768;-32768=039;Tk00039;;-16384=039;Tk01039;;-8192=039;Tk02039;;-4096=039;Tk03039;;-2048=039;Tk04039;;-1024=039;Tk05039;;-512=039;Tk06039;;-256=039;Tk07039;;-128=039;Tk08039;;-64=039;Tk09039;;-32=039;Tk10039;;-16=039;Tk11039;;-8=039;Tk12039;;-4=039;Tk13039;;-2=039;Tk14039;;-1=039;Tk15039;;1=039;Tk16039;;2=039;Tk17039;;4=039;Tk18039;;8=039;Tk19039;;16=039;Tk20039;;32=039;Tk21039;;64=039;Tk22039;;128=039;Tk23039;;256=039;Tk24039;;512=039;Tk25039;;1024=039;Tk26039;;2048=039;Tk27039;;4096=039;Tk28039;;8192=039;Tk29039;;16384=039;Tk30039;;32768=039;Tk31039;;") // - reg mana
call InitSubAbilBR(12,"^Size=16;Rarity=1.5;maxval=32768;minval=-32768;-32768=039;Tl00039;;-16384=039;Tl01039;;-8192=039;Tl02039;;-4096=039;Tl03039;;-2048=039;Tl04039;;-1024=039;Tl05039;;-512=039;Tl06039;;-256=039;Tl07039;;-128=039;Tl08039;;-64=039;Tl09039;;-32=039;Tl10039;;-16=039;Tl11039;;-8=039;Tl12039;;-4=039;Tl13039;;-2=039;Tl14039;;-1=039;Tl15039;;1=039;Tl16039;;2=039;Tl17039;;4=039;Tl18039;;8=039;Tl19039;;16=039;Tl20039;;32=039;Tl21039;;64=039;Tl22039;;128=039;Tl23039;;256=039;Tl24039;;512=039;Tl25039;;1024=039;Tl26039;;2048=039;Tl27039;;4096=039;Tl28039;;8192=039;Tl29039;;16384=039;Tl30039;;32768=039;Tl31039;;") // - move speed
call InitSubAbilBR(13,"^Size=5;Rarity=1.3;maxval=16;minval=-16;-16=039;Tm00039;;-8=039;Tm01039;;-4=039;Tm02039;;-2=039;Tm03039;;-1=039;Tm04039;;1=039;Tm05039;;2=039;Tm06039;;4=039;Tm07039;;8=039;Tm08039;;16=039;Tm09039;;") // - light
call InitSubAbilBR(14,"^Size=7;Rarity=1.12;maxval=64;minval=-64;-64=039;Tn00039;;-32=039;Tn01039;;-16=039;Tn02039;;-8=039;Tn03039;;-4=039;Tn04039;;-2=039;Tn05039;;-1=039;Tn06039;;1=039;Tn07039;;2=039;Tn08039;;4=039;Tn09039;;8=039;Tn10039;;16=039;Tn11039;;32=039;Tn12039;;64=039;Tn13039;;") // - sda
//Don't add bonus to unit abils
call SetupBR(0x3E77,"^21=1;22=1;23=1;24=1;")
//AbilType
call SetupBR(0x3E78,"^1=1;2=1;3=1;4=1;5=1;6=1;7=1;8=1;9=1;10=1;11=1;12=1;13=1;14=1;15=3;16=1;17=6;18=5;19=6;20=3;21=5;22=5;23=5;24=5;25=1;26=1;27=2;28=2;29=2;30=2;31=1;32=1;33=1;34=1;35=1;36=1;37=1;38=1;39=1;40=1;41=1;42=1;43=1;44=2;45=2;46=2;47=2;48=1;49=1;50=1;51=1;52=1;53=1;54=1;55=1;56=1;57=1;58=1;59=1;60=1;61=1;62=1;63=1;64=1;65=1;66=1;67=1;68=1;69=1;70=1;71=1;72=1;73=1;74=1;75=1;76=1;77=1;78=1;79=1;80=1;81=1;82=1;83=1;84=1;85=1;86=1;87=1;88=1;89=1;90=1;91=1;92=1;93=1;94=1;95=1;96=1;97=1;98=1;99=1;100=1;101=1;102=1;103=1;104=1;105=1;106=1;107=1;108=1;109=1;110=1;111=1;112=1;113=1;114=1;115=1;116=1;117=1;118=1;119=1;120=1;121=1;122=1;123=1;")
//Don't Display Stat
call InitDisplayNoDispBR("^19=1;")
//Don't Display Requires
call InitDisplayNoReqDispBR("^")
//Requiers alias
call SetupBR(0x3E79,"^1=$lvl;2=$str;3=$agi;4=$int;5=$utype;6=$uabil;")
call SetupBR(0x3E79,"^lvl=1;str=2;agi=3;int=4;utype=5;uabil=6;")
//Abils alias
//>
call SetupBR(0x3E80,"^1=$dmg;2=$def;3=$HP;4=$mana;5=$str;6=$int;7=$agi;8=$lich;9=$ias;10=$lifereg;11=$manareg;12=$move;13=$light;14=$sda;15=$onstruck;16=$sock;17=$AddAbil;18=$Cus;19=$AbilSil;20=$onhit;21=$PotHP;22=$pstr;23=$pagi;24=$pint;25=$cheap;26=$trade;27=$dmgpois;28=$dmgcold;29=$dmgltng;30=$dmgfire;31=$dmg%;32=$def%;33=$HP%;34=$mana%;35=$str%;36=$int%;37=$agi%;38=$ias%;39=$lifereg%;40=$manareg%;41=$move%;42=$light%;43=$sda%;44=$dmgmag;45=$dmgholy;46=$dmgdark;47=$dmgphys;48=$coldlen;49=$poislen;50=$firemin;51=$coldmin;52=$ltngmin;53=$poismin;54=$magmin;55=$holymin;56=$darkmin;57=$physmin;58=$firemax;59=$coldmax;60=$ltngmax;61=$poismax;62=$magmax;63=$holymax;64=$darkmax;65=$physmax;66=$dmgfire%;67=$dmgcold%;68=$dmgltng%;69=$dmgpois%;70=$dmgmag%;71=$dmgholy%;72=$dmgdark%;73=$dmgphys%;74=$piercefire;75=$piercecold;76=$pierceltng;77=$piercepois;78=$piercemag;79=$pierceholy;")
call SetupBR(0x3E80,"^80=$piercedark;81=$piercefire%;82=$piercecold%;83=$pierceltng%;84=$piercepois%;85=$piercemag%;86=$pierceholy%;87=$piercedark%;88=$resfire;89=$rescold;90=$resltng;91=$respois;92=$resmag;93=$resholy;94=$resdark;95=$resfiremax;96=$rescoldmax;97=$resltngmax;98=$respoismax;99=$resmagmax;100=$resholymax;101=$resdarkmax;102=$resall;103=$resallmax;104=$absfire;105=$abscold;106=$absltng;107=$abspois;108=$absmag;109=$absholy;110=$absdark;111=$absfire%;112=$abscold%;113=$absltng%;114=$abspois%;115=$absmag%;116=$absholy%;117=$absdark%;118=$redpois;119=$redcold;120=$nofreeze;121=$redstun;122=$block;123=$crit;")
//<
call SetupBR(0x3E80,"^dmg=1;def=2;HP=3;mana=4;str=5;int=6;agi=7;lich=8;ias=9;lifereg=10;manareg=11;move=12;light=13;sda=14;onstruck=15;sock=16;AddAbil=17;Cus=18;AbilSil=19;onhit=20;PotHP=21;pstr=22;pagi=23;pint=24;cheap=25;trade=26;dmgpois=27;dmgcold=28;dmgltng=29;dmgfire=30;dmg%=31;def%=32;HP%=33;mana%=34;str%=35;int%=36;agi%=37;ias%=38;lifereg%=39;manareg%=40;move%=41;light%=42;sda%=43;dmgmag=44;dmgholy=45;dmgdark=46;dmgphys=47;coldlen=48;poislen=49;firemin=50;coldmin=51;ltngmin=52;poismin=53;magmin=54;holymin=55;darkmin=56;physmin=57;firemax=58;coldmax=59;ltngmax=60;poismax=61;magmax=62;holymax=63;darkmax=64;physmax=65;dmgfire%=66;dmgcold%=67;dmgltng%=68;dmgpois%=69;dmgmag%=70;dmgholy%=71;dmgdark%=72;dmgphys%=73;piercefire=74;piercecold=75;pierceltng=76;piercepois=77;piercemag=78;pierceholy=79;piercedark=80;piercefire%=81;piercecold%=82;pierceltng%=83;piercepois%=84;")
call SetupBR(0x3E80,"^piercemag%=85;pierceholy%=86;piercedark%=87;resfire=88;rescold=89;resltng=90;respois=91;resmag=92;resholy=93;resdark=94;resfiremax=95;rescoldmax=96;resltngmax=97;respoismax=98;resmagmax=99;resholymax=100;resdarkmax=101;resall=102;resallmax=103;absfire=104;abscold=105;absltng=106;abspois=107;absmag=108;absholy=109;absdark=110;absfire%=111;abscold%=112;absltng%=113;abspois%=114;absmag%=115;absholy%=116;absdark%=117;redpois=118;redcold=119;nofreeze=120;redstun=121;block=122;crit=123;")
//Pow Based Abils Multiplier Names
call InitCusAbilMultBR("^1=$Prop31Par;2=$Prop32Par;3=$Prop33Par;4=$Prop34Par;5=$Prop35Par;6=$Prop36Par;7=$Prop37Par;9=$Prop38Par;10=$Prop39Par;11=$Prop40Par;12=$Prop41Par;13=$Prop42Par;14=$Prop43Par;")
//Special Strings Id's alias
call SetupBR(0x3E81,"^4000=$blizzard;4001=$inferno;4002=$acid;")
call SetupBR(0x3E81,"^blizzard=4000;inferno=4001;acid=4002;")
// Custom funcs alias
call SetupBR(0x3E81,"^1=$Hallo;")
call SetupBR(0x3E81,"^Hallo=1;")
//Special Strings Ex alias (Display names)
call SetupBR(0x3E82,"^4000=$Blizzard;4001=$Inferno;4002=$Acid Bomb;")
//Item Type Strings (For Gems)
call SetupBR(0x3E83,"^weapon=$Weapons;helm=$Helms;armor=$Armor;shield=$Shields;shoulder=$Pauldrons;")
//Item Type Strings (For Display)
call SetupBR(0x3E84,"^weapon=$Item type: Weapon;helm=$Item type: Helm;armor=$Item type: Armor;shield=$Item type: Shield;gems=$Can be inserted into socketed items;charm=$Keep in Inventory to gain bonus;belt=$Item type: Belt;charged=$Can be actively used;amulet=$Item type: Amulet;shoulder=$Item type: Pauldron;gloves=$Item type: Gloves;bracers=$Item type: Bracers;pants=$Item type: Pants;boots=$Item type: Boots;ring=$Item type: Ring;")
//Item Class Strings (For Display)
call SetupBR(0x3E85,"^sword1h=$Class: One-Hand Sword;sword2h=$Class: Two-Hand Sword;axe1h=$Class: One-Hand Axe;axe2h=$Class: Two-Hand Axe;rune=$Class: Rune;armor=$Class: Armor;helm=$Class: Helm;shield=$Class: Shield;charm=$Class: Charm;belt=$Class: Belt;potion=$Class: Potion;shoulder=$Class: Pauldron;gloves=$Class: Gloves;bracers=$Class: Bracers;pants=$Class: Pants;boots=$Class: Boots;ring=$Class: Ring;amulet=$Class: Amulet;")
//Inv Slot discriptions
call SetupBR(0x3E86,"^charged=$Charged Item Slot;armor=$Armor Slot;amulet=$Amulet Slot;shoulder=$Pauldron Slot;weapon=$Main Hand Slot;shield=$Secondary Hand Slot;helm=$Helm Slot;gloves=$Gloves Slot;belt=$Belt Slot;bracers=$Bracers Slot;pants=$Pants Slot;boots=$Boots Slot;ring=$Ring Slot;pagedown=$Inventory Page Down;pageup=$Inventory Page Up;exit=$Exit Inventory;drop=$Drop Current Selected Item;pagedownmerch=$Next Page;pageupmerch=$Previous Page;sellitem=$Sell Current Selected Item;buyitem=$Buy Current Selected Item;")
//Special Funcs Names alias
call InitCusFuncsBaseBR("^1=$TestHallo;2=$FullDTSet;3=$TRSPotionsRestoreHP;4=$TRSPerStr;5=$TRSPerAgi;6=$TRSPerInt;7=$AddEffectToTarget;")
endfunction
function TestHallo takes nothing returns nothing
if TRSMod==1 and not TRSInsert then
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\Avatar\\AvatarCaster.mdl",TRSUnit,"origin"))
elseif TRSMod==2 and not TRSInsert then
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\NightElf\\Blink\\BlinkCaster.mdl",TRSUnit,"origin"))
endif
endfunction
function FullDTSet takes nothing returns nothing
if TRSMod==1 and not TRSInsert then
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\Thunderclap\\ThunderClapCaster.mdl",TRSUnit,"origin"))
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Other\\Levelup\\LevelupCaster.mdl",TRSUnit,"origin"))
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\Resurrect\\ResurrectTarget.mdl",TRSUnit,"origin"))
if GetOwningPlayer(TRSUnit)==GetLocalPlayer() then
call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,128,"|cfffedaac T H E Y R U L E S ! ! !|r")
call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,0.1," ")
endif
endif
endfunction
function AddEffectToTarget takes nothing returns nothing
if TRSMod==1 and not TRSInsert then
if InvCurSide=="left" then
//call UnitAddAbility(TRSUnit,udg_CustomAttachEffectsLeft[TRSMin])
//call UnitMakeAbilityPermanent(TRSUnit,true,udg_CustomAttachEffectsRight[TRSMin])
elseif InvCurSide=="right" then
//call UnitAddAbility(TRSUnit,udg_CustomAttachEffectsRight[TRSMin])
//call UnitMakeAbilityPermanent(TRSUnit,true,udg_CustomAttachEffectsRight[TRSMin])
endif
elseif TRSMod==2 and not TRSInsert then
if TRSMin<1 then
if InvCurSide=="left" then
//call UnitRemoveAbility(TRSUnit,udg_CustomAttachEffectsLeft[TRSMinS])
elseif InvCurSide=="right" then
//call UnitRemoveAbility(TRSUnit,udg_CustomAttachEffectsRight[TRSMinS])
endif
endif
endif
endfunction
function TRSPotionsRestoreHP takes nothing returns nothing
local integer i=GetRandomInt(TRSMinS,TRSMaxS)
local effect e=AddSpecialEffectTarget("Abilities\\Spells\\Human\\Heal\\HealTarget.mdl",TRSUnit,"origin")
call SetUnitState(TRSUnit,UNIT_STATE_LIFE,GetUnitState(TRSUnit,UNIT_STATE_LIFE)+i)
call TriggerSleepAction(1)
call DestroyEffect(e)
set e=null
endfunction
function TRSPerStr takes nothing returns nothing
local integer i=GetRandomInt(TRSMinS,TRSMaxS)
if IsUnitType(TRSUnit,UNIT_TYPE_HERO) then
call SetHeroStr(TRSUnit,GetHeroStr(TRSUnit,false)+i,true)
call DisplayTextToForce( GetPlayersAll(), GetHeroStr )
endif
endfunction
function TRSPerAgi takes nothing returns nothing
local integer i=GetRandomInt(TRSMinS,TRSMaxS)
if IsUnitType(TRSUnit,UNIT_TYPE_HERO) then
call SetHeroAgi(TRSUnit,GetHeroAgi(TRSUnit,false)+i,true)
call DisplayTextToForce( GetPlayersAll(), GetHeroAgi )
endif
endfunction
function TRSPerInt takes nothing returns nothing
local integer i=GetRandomInt(TRSMinS,TRSMaxS)
if IsUnitType(TRSUnit,UNIT_TYPE_HERO) then
call SetHeroInt(TRSUnit,GetHeroInt(TRSUnit,false)+i,true)
call DisplayTextToForce( GetPlayersAll(), GetHeroInt )
endif
endfunction
thanks in advance