- Joined
- Nov 13, 2006
- Messages
- 1,814
this still isnt moderated hahaha
who care? hahaha
(3 ratings)
//ClickToTrackable>BuyItemFromShop
local boolean CraftFail = true
local integer CraftFailChance = 33
local integer CQCE_Normal = 80 // 80% quality chance equipment: normal
local integer CQCE_Magic = 10 // 10% quality chance equipment: magic
local integer CQCE_Rare = 6 // 6% quality chance equipment: rare
local integer CQCE_VeryRare = 3 // 3% quality chance equipment: very rare
local integer CQCE_Excelent = 1 // 1% quality chance equipment: excelent
this still isnt moderated hahaha
why i cannot open it?
Okay system is great, but, what if i dont want to have completly random items?
Where I can manualy create items?
call GenerateEQ (a, b, c, d, e, x, y, f, s)
explanation:
a=item type (already lsit somewhere, its like 1 if helm, a=2 if armor, a=3 if weapon etc)
b=subitem type (if item type helm/armor or booth then 1 if heavy wear, 2 if light wear, 3 if mage wear)
c=quality (0-6), 0 cracked,1=low quality,2=normal....5=excelent etc)
d=grade (damage for weapons or defence/hp for armor, critical strike for ring, etc is scaled to grade) (0-9999+)
e=item level requiment (0-9999+)
x=x coordinate where u want create
y=y coordinate where u want create
f=true or false (random element defence if armor, true or false. if true then armor can get example alot fire resistance and low water etc)
s=socket, how many socket item u want insert to this item maximum (0-499)
too many bugs on this system. example
if u click to inventory spell on inventory.You cant close inventory.
if u click to esc on villager it starts to throw items but items don't clean on villager's inventory
too many bugs on this system. example
if u click to inventory spell on inventory.You cant close inventory.
function Trig_Open_Inventory_Actions takes nothing returns nothing
local integer pl = GetPlayerId(GetTriggerPlayer()) + 1
set udg_Inv_Unit[pl] = GetUnitUserData(GetTriggerUnit())
[b] if udg_Camera_Lock[pl] == 0 then[/b]
call EnableCamLock(pl, 1)
endif
endfunction
if u click to esc on villager it starts to throw items but items don't clean on villager's inventory
function Trig_create_item_Actions takes nothing returns nothing
local integer pl = GetPlayerId(GetTriggerPlayer()) + 1
local unit u = udg_Hero[pl]
//call GenerateEQ (- 1, - 1, -1, GetHeroLevel(u), GetHeroLevel(u), GetUnitX(u), GetUnitY(u), false, - 1)
[b]call GenerateEQ (-1, -1, 6, 2, 2, GetUnitX(u), GetUnitY(u), false, - 1)
[i]//if u dont want create item then simple remove this line above with bolded letters[/i][/b]
//call SetItemBaseData (itm, itype, subtype, quality, grade, lvreq, ethernal, dur, maxdur, maxsocket, setid)
//call SetItemProperties1 (id, hp, hpreg, hpsteal, hpkill, mp, mpreg, mpsteal, mpkill, phydef, fdef, wdef, ldef, pdef, edef)
//call SetItemProperties2 (id, mspeed, acc, eva, str, agi, int, attspd, block, exp, gold, drop)
//call SetItemProperties3 (id, refl, armpen, attlv, deflv, pdmg, mdmg, crit, cdmg, pp, bdmg1, bdmg2, bdmg3, bdmg4, bdmg5)
set u = null
endfunction
//===========================================================================
function InitTrig_Create_item takes nothing returns nothing
set gg_trg_Create_item = CreateTrigger( )
[b] call TriggerRegisterPlayerEventEndCinematic( gg_trg_Create_item, Player(0) )[/b]
[b][i] //u can see this is only for player 1 and for test :p[/b][/i]
call TriggerAddAction( gg_trg_Create_item, function Trig_create_item_Actions )
endfunction
Desync's seem to happen still, maybe check into it shadow.
Also when more then one enters into inventory and one leaves, the border of stats get removed.
One question: How do I change the starting unspend stat points?
It is set to 500 at the start but I want to change it to 5.
One question: How do I change the starting unspend stat points?
It is set to 500 at the start but I want to change it to 5.
Ow and here are 2 bugs that I saw in there.
1. The paladin seems to loop in channel stance somehow. (not from the beginning though)
2. Using a consumeable item in the regular inventory while your system is open, the inventory in the system doesn't update.
if udg_Camera_Lock[pl] > 0 then
// if udg_Camera_Lock[pl] == 1 then
set i = 0
set c = GetItemCharges(itm1)
if c == 0 then
loop
exitwhen i > 5
set itm2 = UnitItemInSlot(u, i)
if itm1 == itm2 then
call RemoveIcon(pl, 200+i)
endif
if itm2 == null then
set d = LoadDestructableHandle(udg_FSS, 2409 + pl, 200 + i)
if d != null then
call RemoveDestructable(d)
endif
endif
set i = i + 1
endloop
endif
call SetChargesText(pl)
set itm2 = null
set d = null
endif
you also change the alliance of players
call MakeAllyFromPlayer(i - 1)
//call MakeAllyFromPlayer(i - 1)
and remove exp ....
set exp = R2I((udg_Global_Exp[cvd] * ((100.00 + udg_Stat_Exp[cvk]) / 100.00)))
call SuspendHeroXP(ku, false) // this turn on exp
call AddHeroXP(ku, exp, true) //this add exp to killer unit (ku variable), exp variable calculated by
//your bonus %exp lets say 10%+100%=>110%=>1.10*experience value of dieing unit what was stored into Gloval_Exp[custom value of dieing unit]
//this make u able the enemy unit exp value when u want, example u want make a quest where need kill something and you want make these unit give higher exp than useally then change that variable
call SuspendHeroXP(ku, true) //this turn off exp
this ahve no point, why do you want open with another unit ur hero inventory if u can pout into spellbook ur inventory ability and dont take much space?I now try to let another unit open the inventory of my hero (yes it is complicated but it is the only way) but I am starting to have problems.
create new item like its do the ESC key or what?Maybe also make simple instructions about how to create more items.
Wietlol said:shadowvzs said:createing new item like a new kind example new weapon type what not exist or simple just a item what type exist?
Creating a new item with the same subtype as another. Like creating a new shield.
I can see the different grades on items in-game but I can't see where they are made.
The idea is that I make items with different names, models, stats, icons, etc.
(I don't need a shop for now so that will not be a big problem.)
Also I tried to change the names of the classes and add some new ones but I can't find the source of any of those.
I do see that they are in the 633rd column/row of the FSS hashtable but I don't know how you connect it to the classes.
Creating a new hero with his new class wouldn't be a problem.
That part is just very simple and doesnot require much to be made.
I can try to simplify it all together and give you an example of easy implementation but not before I know how it works myself.
shadowvzs said:about experience, it was disabled for able add with trigger because then customizable the exp reward for monster, else if u use normal wc3 exp then u screwed because must set after every mosnter type etc until with unit indexer it is easily made in few line.
btw u get exp just with trigger not directly.
That does make sense.
In the normal system, the exp you gain depends on the type of unit and on its level. So far I know it is the only thing that level actually does.
function itype2TOitemId takes integer itype, integer subtype, integer quality returns integer
local integer i = 0
if itype == 1 then
set i = 'ckng'
elseif itype == 2 then
set i = 'rin1'
elseif itype == 3 then
if subtype == 1 then //short sword
set i = 'rat9'
elseif subtype == 2 then // mace
set i = 'rde3'
elseif subtype == 3 then // axe / hammer
set i = 'rde1'
elseif subtype == 4 then // polearm
set i = 'evtl'
elseif subtype == 5 then // long sword
set i = 'ajen'
elseif subtype == 6 then // bow
set i = 'lgdh'
elseif subtype == 7 then // dagger
set i = 'desc'
elseif subtype == 8 then // wand
set i = 'ward'
elseif subtype == 9 then // staff
set i = 'brac'
endif
elseif itype == 4 then //shoes or boot
set i = 'rag1'
elseif itype == 5 then //shield
set i = 'sbch'
elseif itype == 6 then //ring
set i = 'rlif'
elseif itype == 8 then //amulet
set i = 'spsh'
elseif itype == 9 then // wing
set i = 'ccmd'
elseif itype == 10 then //tome
set i = 'hval'
elseif itype == 11 then //charm
set i = 'cnob'
endif
return i
endfunction
call RegisterItem('rin1', 'B00K', "Armor1.mdx", 13, 102, "Armor", 0)
function RegisterItem takes integer id, integer dest, string path, integer price, integer lv, string descr, integer subtype returns nothing
if path != null then
call SaveStr(udg_FSS, 601, id, path)
endif
if descr != null then
call SaveStr(udg_FSS, 604, id, descr)
endif
call SaveInteger(udg_FSS, 600, id, dest)
call SaveInteger(udg_FSS, 602, id, price)
call SaveInteger(udg_FSS, 603, id, lv)
if subtype > 0 then
call SaveInteger(udg_FSS, 605, id, subtype)
endif
endfunction
function SetItemBaseData takes item itm, integer itype, integer subtype, integer quality, integer grade, integer lvreq, integer ethernal, real dur, real maxdur, integer maxsocket, integer setid returns nothing
local integer id = GetHandleId(itm)
local integer str = 0
local integer agi = 0
local integer int = 0
local integer price = grade * 10
local integer class = 0
local real r = 0
if itype == 5 and subtype == 0 then
set subtype = 1
endif
if lvreq > 0 then
if itype < 5 and itype != 3 then
if subtype == 1 then
set class = 1
set str = lvreq * 3 + 5
set agi = lvreq * 1 + 5
elseif subtype == 2 then
set class = 3
set str = lvreq * 1 + 5
set agi = lvreq * 3 + 5
elseif subtype == 3 then
set class = 5
set str = lvreq * 1 + 5
set int = lvreq * 3 + 5
endif
elseif itype == 3 or itype == 5 then
if subtype < 3 or itype == 5 then
set class = 2
set str = lvreq * 2 + 5
set agi = lvreq * 2 + 5
elseif subtype == 3 then
set class = 1
set str = lvreq * 4 + 5
set agi = lvreq + 5
elseif subtype < 6 then
set class = 2
set str = lvreq * 4 + 5
set agi = lvreq + 5
elseif subtype < 8 then
set str = lvreq + 5
set agi = lvreq * 4 + 5
if subtype == 6 then
set class = 3
else
set class = 4
endif
elseif subtype == 8 then
set class = 5
set str = lvreq * 2 + 5
set int = lvreq * 3 + 5
elseif subtype == 9 then
set class = 5
set str = lvreq + 5
set int = lvreq * 4 + 5
endif
endif
endif
if maxdur == 0 then
if itype == 1 then
set r = 1.5
elseif itype == 2 then
set r = 2
elseif itype == 3 then
set r = 2.8
elseif itype == 4 then
set r = 1.2
elseif itype == 5 then
set r = 2.4
elseif itype == 6 then
set r = 1.7
elseif itype == 8 then
set r = 1.9
elseif itype == 9 then
set r = 2.3
endif
set maxdur = (grade * 5.00 + 33) * r
set dur = maxdur
if quality == 0 then
set dur = dur / 3.00 + 10
set maxdur = dur * 2.00
set price = price / 2
elseif quality == 1 then
set dur = dur / 3.00 + 10
set maxdur = dur * 2.00
set price = price / 2
elseif quality == 6 then
set dur = dur * 1.2
set maxdur = dur
set price = R2I(price * 1.2)
elseif quality == 7 then
set dur = dur * 1.5
set maxdur = dur
set price = R2I(price * 1.5)
endif
endif
if maxsocket == - 1 then
set maxsocket = GetRandomInt(quality/2+grade/50, quality/2 + grade/50 + 1)
endif
if itype == 10 or itype == 11 then
set price = price * 2
set maxsocket = 0
set lvreq = 0
elseif itype == 6 or itype == 8 or itype == 5 then
set maxsocket = 0
endif
call SaveInteger(udg_CItem_Table, id, 1, GetItemTypeId(itm))
call SaveInteger(udg_CItem_Table, id, 2, itype)
call SaveInteger(udg_CItem_Table, id, 3, subtype)
call SaveInteger(udg_CItem_Table, id, 4, quality)
call SaveInteger(udg_CItem_Table, id, 6, class)
call SaveInteger(udg_CItem_Table, id, 7, grade)
call SaveInteger(udg_CItem_Table, id, 8, lvreq)
call SaveInteger(udg_CItem_Table, id, 12, price)
if itype != 11 then
call SaveInteger(udg_CItem_Table, id, 9, str)
call SaveInteger(udg_CItem_Table, id, 10, agi)
call SaveInteger(udg_CItem_Table, id, 11, int)
call SaveInteger(udg_CItem_Table, id, 13, ethernal)
call SaveReal(udg_CItem_Table, id, 14, dur)
call SaveReal(udg_CItem_Table, id, 15, maxdur)
call SaveInteger(udg_CItem_Table, id, 20, maxsocket)
if setid > 0 then
call SaveInteger(udg_CItem_Table, id, 5, setid)
endif
endif
endfunction
if ku == udg_Hero[plk] then
if GetPlayerController(pk) == MAP_CONTROL_USER and IsUnitType(ku, UNIT_TYPE_HERO) then
1. It happens only sometimes... Maybe it happened because I changed something to the triggers.
Wietlol said:I've read your post and most of it makes sense now.
The only thing that I couldn't find is the stats of an item.
I do see where you set the requirements of an item if I am right.
At the bottom of SetItemBaseData, you save integers of str, agi and int.
I guess that those are requirements for the item.
I can't see what bonusses it grants.
for example:
- Bonus HP
- Physical Defense
- Physical Damage
- Bonus Exp
- etc.
And what does dur and maxdur?
(Just a question but before everything is ruined I would like to know before I create numberless items and get hours of work to set everything right.)
It can be true that I read over it.
I also see that you create the names of the classes in the header. I will take a look and see if I can do that on my own.
Now there is only one more question.
I create a simple unit and when I kill it I want it to drop a specific item.
Like an Excellent Mage Boot of grade 5.
How do I do that?
Also how do I create an Item (Same stuff) and give it to the hero?
Both have to be called when a trigger runs.
I do like to create quests and stuff in regular triggers and normally I use the "Create Item and give it to the Hero" or "Create Item on location of dying unit".
Can I just use "Custom Script" and then type call ThisFunction() in a trigger while ThisFunction is declarated in another Trigger?
function GenerateEQ takes integer itype, integer subtype, integer quality, integer grade, integer lv, real x, real y, boolean rndDef, integer maxsocket returns integer
local integer rnd = GetRandomInt(0, 99)
local integer mingrade = 1
local integer ethernal = 0
local integer pdef
local integer mdef
local integer mdef1 = 0
local integer mdef2 = 0
local integer mdef3 = 0
local integer mdef4 = 0
local integer mdef5 = 0
local integer i
local integer tmdef
local integer id
local real m
local real m2
local item itm
if itype == 7 then
set itype = 3
set subtype = GetRandomInt(0, 9)
endif
if grade == - 1 and rnd < 10 then
set ethernal = 1
endif
set rnd = GetRandomInt(0, 99)
if grade == - 1 then
if lv < 1 then
set lv = 1
endif
if lv > 10 then
set mingrade = lv - 10
endif
set grade = GetRandomInt(mingrade, lv)
if lv > grade then
set lv = grade
endif
endif
if itype == - 1 or subtype == -1 then
if itype == -1 then
set itype = GetRandomInt(1, 9)
endif
if itype == 7 then
set itype = 3
set subtype = GetRandomInt(1, 9)
elseif itype == 9 then
set itype = 11
endif
if itype == 1 or itype == 2 or itype == 4 then
set subtype = GetRandomInt(1, 3)
elseif itype == 3 then
set subtype = GetRandomInt(1, 9)
else
set subtype = 1
endif
endif
if itype == 11 then
if quality == -1 then
set rnd = GetRandomInt(0, 99)
if rnd < 2 then
set quality = 3
elseif rnd < 10 then
set quality = 2
else
set quality = 1
endif
endif
endif
set itm = AddCustomItem (x, y, itype, subtype, quality)
call SetItemBaseData (itm, itype, subtype, quality, grade, lv, ethernal, 0, 0, maxsocket, 0)
set id = GetHandleId(itm)
call SaveItemHandle(udg_CItem_Table, id, 100, itm)
if itype == 1 or itype == 2 or itype == 4 then
if itype == 1 then
set m = 0.7
elseif itype == 2 then
set m = 1
elseif itype == 4 then
set m = 0.55
endif
if subtype == 1 then
set m2 = 1.5
set pdef = R2I((10.00 * 3.33 * grade * ((8 + quality) / 10.00)) * m) + 30
set mdef = R2I((3 * 3.33 * grade * ((8 + quality) / 10.00)) * m) + 10
elseif subtype == 2 then
set m2 = 1.25
set pdef = R2I((5.00 * 3.33 * grade * ((8 + quality) / 10.00)) * m) + 15
set mdef = R2I((5 * 3.33 * grade * ((8 + quality) / 10.00)) * m) + 15
elseif subtype == 3 then
set m2 = 1
set pdef = R2I((3.00 * 3.33 * grade * ((8 + quality) / 10.00)) * m) + 10
set mdef = R2I((10 * 3.33 * grade * ((8 + quality) / 10.00)) * m) + 30
endif
if rndDef then
set tmdef = mdef * 5
set i = GetRandomInt(0, mdef * 2)
set tmdef = tmdef - i
set mdef1 = i
set i = GetRandomInt(0, mdef * 2)
set tmdef = tmdef - i
set mdef2 = i
set i = GetRandomInt(0, mdef * 2)
if i > tmdef then
set mdef3 = tmdef
set tmdef = 0
else
set tmdef = tmdef - i
set mdef3 = i
endif
set i = GetRandomInt(0, mdef * 2)
if i > tmdef then
set mdef4 = tmdef
set tmdef = 0
else
set tmdef = tmdef - i
set mdef4 = i
endif
set i = GetRandomInt(0, mdef * 2)
if i > tmdef then
set mdef4 = tmdef
set tmdef = 0
else
set tmdef = tmdef - i
set mdef4 = i
endif
else
set mdef1 = mdef
set mdef2 = mdef
set mdef3 = mdef
set mdef4 = mdef
set mdef5 = mdef
endif
call SaveInteger(udg_CItem_Table, id, 26, R2I(m2 * m * 10.00 * grade * ((8 + quality) / 10.00)))
call SaveInteger(udg_CItem_Table, id, 34, R2I(pdef))
call SaveInteger(udg_CItem_Table, id, 35, R2I(mdef1))
call SaveInteger(udg_CItem_Table, id, 36, R2I(mdef2))
call SaveInteger(udg_CItem_Table, id, 37, R2I(mdef3))
call SaveInteger(udg_CItem_Table, id, 38, R2I(mdef4))
call SaveInteger(udg_CItem_Table, id, 39, R2I(mdef5))
elseif itype == 3 then
if subtype < 8 then
call SaveInteger(udg_CItem_Table, id, 52, R2I((grade * (8 + quality) / 10.00) * WeaponDamageModifier(subtype)) )
else
call SaveInteger(udg_CItem_Table, id, 53, R2I((grade * (8 + quality) / 10.00) * WeaponDamageModifier(subtype)) )
endif
elseif itype == 9 then
call SaveInteger(udg_CItem_Table, id, 50, R2I((grade * (8 + quality) / 10.00) / 3 + 1))
call SaveInteger(udg_CItem_Table, id, 51, R2I((grade * (8 + quality) / 10.00) / 3 + 1) )
elseif itype == 5 then
call SaveInteger(udg_CItem_Table, id, 34, R2I((grade * (8 + quality) / 10.00) * 3 + 30))
call SaveInteger(udg_CItem_Table, id, 43, R2I((grade * (8 + quality) / 10.00) / 10 + 5))
elseif itype == 8 then
call SaveInteger(udg_CItem_Table, id, 34, R2I((grade * (8 + quality) / 10.00) * 8.75 + 30))
call SaveInteger(udg_CItem_Table, id, 41, R2I((grade * (8 + quality) / 10.00) * 1.5 + 10))
call SaveInteger(udg_CItem_Table, id, 42, R2I((grade * (8 + quality) / 10.00) * 1 + 10))
elseif itype == 6 then
call SaveInteger(udg_CItem_Table, id, 52, R2I((grade * (8 + quality) * 0.135) + 1))
call SaveInteger(udg_CItem_Table, id, 53, R2I((grade * (8 + quality) * 0.135) + 1))
call SaveInteger(udg_CItem_Table, id, 54, R2I((grade * (8 + quality) / 250.00) + 1))
endif
if quality == 1 then
if itype == 11 then
call AddRandomBonus (id, grade, itype, GetRandomInt(1,2))
endif
elseif quality == 2 then
if itype == 11 then
call AddRandomBonus (id, grade, itype, GetRandomInt(3,4))
endif
elseif quality == 3 then
if itype == 11 then
call AddRandomBonus (id, grade, itype, GetRandomInt(5,7))
else
set rnd = GetRandomInt(0, 9)
if rnd < 7 then
call AddRandomBonus (id, grade, itype, 1)
elseif rnd < 9 then
call AddRandomBonus (id, grade, itype, 2)
elseif rnd == 9 then
call AddRandomBonus (id, grade, itype, 3)
endif
endif
elseif quality == 4 then
set rnd = GetRandomInt(0, 9)
if rnd < 4 then
call AddRandomBonus (id, grade, itype, 2)
elseif rnd < 7 then
call AddRandomBonus (id, grade, itype, 3)
elseif rnd == 9 then
call AddRandomBonus (id, grade, itype, 4)
endif
elseif quality == 5 then
set rnd = GetRandomInt(0, 9)
if rnd < 5 then
call AddRandomBonus (id, grade, itype, 3)
elseif rnd < 9 then
call AddRandomBonus (id, grade, itype, 4)
else
call AddRandomBonus (id, grade, itype, 5)
endif
elseif quality == 6 then
set rnd = GetRandomInt(0, 9)
if rnd < 4 then
call AddRandomBonus (id, grade, itype, 4)
elseif rnd < 6 then
call AddRandomBonus (id, grade, itype, 5)
elseif rnd < 9 then
call AddRandomBonus (id, grade, itype, 6)
elseif rnd == 9 then
call AddRandomBonus (id, grade, itype, 7)
endif
endif
set itm = null
return id
endfunction
call GenerateEQ (-1, -1, 6, 100, 1, GetUnitX(u), GetUnitY(u), false, - 1)
//that 6 is the quality and that is excelent,2 is normal etc its wrote on map
// boot will be
call GenerateEQ (4, 3, 6, 5, 5, GetUnitX(u), GetUnitY(u), false, - 1)
//2 - type (1=helm,2=amor,3=weapon,4=boot,5=shield,6=ring,8=amulet,9=wing,10=tome)
//3 - sub type (if armor then heavy/light/robe, weapon: 1.short sword/2. mace/3. axe/4. spear/5. long sword/6. dagger/7. bow/8. wand/9.staff)
//4 - quality (0-cracked,1-low quality,2=normal, 3=magical, 4=rare, 5=crafted, 6=excelent, 7=unique)
function GenerateEQ takes integer itype, integer subtype, integer quality, integer grade, integer lv, real x, real y, boolean rndDef, integer maxsocket returns integer
constant function EFFECT takes integer i returns string
if i == 1 then
return "Objects\\Spawnmodels\\Human\\HumanBlood\\HumanBloodPeasant.mdl"
elseif i == 26 then
return "Abilities\\Spells\\Human\\Heal\\HealTarget.mdl"
elseif i == 30 then
return "Abilities\\Spells\\Undead\\ReplenishMana\\SpiritTouchTarget.mdl"
else
return ""
endif
endfunction
//where we want attach the effect on unit
constant function EFFECT_POINT takes integer i returns string
if i == 1 then
return "chest"
elseif i == 26 then
return "origin"
elseif i == 30 then
return "origin"
else
return ""
endif
endfunction
function RegisterEffect takes integer index, string filePath, string attachPt returns nothing
I don't know if someone already brought this up before(or if it is already fixed) but the profession thingy doesn't level up well. I can't remember all the details because I tested this like a month ago. I tried to level up all the profession but the all three doesn't level up anymore when it reaches Level 3.( And I think the exp raise also doesn't scale well). It has other factors on the bug that I can't recall but the problem is pretty obvious and major.
v0.98
- changes was in:
Header - GetCraftLevel
ClickToTrackable - AddItem2HeroExt, CraftShopItem, FadeSlot, Craft_Quality_Chance, BuyItemFromShop
OnTrackable - Tooltip
Create Interface
Harvester Timer
- changed the prfession/craft leveling formula, now work well
- in shop the tooltip in right bottom corner now show with
yellow that item for what we got sufficient craft skill level
and red what is required higher craft level than we got
- item stack fix when u buy item from shop and its stack with another item
- fixed the bug when the slot 2211/-17/-21 not was clickable
- now the life materia lv3-6 craftable too
- rearranged the craft a bit, so can't craft high craft requiment item than ur craft skill
few item like wing/tome need jewellery lv3, life materia and few potion need pahamacist lv1
- added refine stone with 20x stack into shop
- harvest speed is configurable in Harvest Timer trigger.
- harvest speed increased by total craft skill (if you level your crafting skill => harvest faster)
- fixed a minor bug in FadeSlot function (nearly never occured)
- in ClickToTrackable>BuyItemFromShop function settable the craft fail chance and crafted item quality chance
impossible to make in fully gui i guesscan anyone make it to GUI
Because i don't know how to Import a JASS
and i'm working with GUI
i don't know how to fix a problem in JASS
update
last changes - have fun
impossible to make in fully gui i guess
- how can i import it into my map,? you know that i don't know how to use jass
who ever manages to import this in its current state will be named the next king of the hive workshop
I've test it many times. And I try to rewrite this. It'll be mine)
ok ok ill test it for ya
add some custom additional plug-ins like item forging (from user's perspective). Then you should write some wrappers for registering things. e.g.
=>JASS:constant function EFFECT takes integer i returns string if i == 1 then return "Objects\\Spawnmodels\\Human\\HumanBlood\\HumanBloodPeasant.mdl" elseif i == 26 then return "Abilities\\Spells\\Human\\Heal\\HealTarget.mdl" elseif i == 30 then return "Abilities\\Spells\\Undead\\ReplenishMana\\SpiritTouchTarget.mdl" else return "" endif endfunction //where we want attach the effect on unit constant function EFFECT_POINT takes integer i returns string if i == 1 then return "chest" elseif i == 26 then return "origin" elseif i == 30 then return "origin" else return "" endif endfunction
JASS:function RegisterEffect takes integer index, string filePath, string attachPt returns nothing
AddSpecialEffectTarget(EFFECT(eff), udg_UDexUnits[cv], EFFECT_POINT(eff))
AddSpecialEffectTarget(EFFECT(1), t, EFFECT_POINT(30))
//so not allways same effect on same place also then i must put
//AddSpecialEffectTarget into register function what at end look like a bj stuff :/
//this no point in this form because where the unit where u attach the effect?
function RegisterEffect takes integer index, string filePath, string attachPt returns nothing
//if i use this then it just a parent function for normal native one lol
function RegisterEffect takes unit u, string filePath, string attachPt returns nothing
i checked, these effect part was made long ago but acctually it was used this way (below) and i don't see how would work what you said
JASS:AddSpecialEffectTarget(EFFECT(eff), udg_UDexUnits[cv], EFFECT_POINT(eff)) AddSpecialEffectTarget(EFFECT(1), t, EFFECT_POINT(30)) //so not allways same effect on same place also then i must put //AddSpecialEffectTarget into register function what at end look like a bj stuff :/ //this no point in this form because where the unit where u attach the effect? function RegisterEffect takes integer index, string filePath, string attachPt returns nothing //if i use this then it just a parent function for normal native one lol function RegisterEffect takes unit u, string filePath, string attachPt returns nothing
i don't got what pluggin do you mean and how could be impossible to add except if u mean the progressbar
function RegisterItem takes integer id, real data1, ...<some other datas>... , string sfxFilePath, string sfxAttachPt returns nothing
set ItemCounter = ItemCounter + 1
// First save the index into a hashtable with item's id as parent key
call StoreInteger(Hashtable, id, 0, ItemCounter)
set ItemTable[ItemCounter].data1 = data1
....
set ItemTable[ItemCounter].sfx = sfxFilePath
set ItemTable[ItemCounter].sfxPt = sfxAttachPt
endfunction
// Getting item's index in the list
local integer dex = GetStoredInteger(Hashtable, itemID, 0)
//Getting item's sfx
call AddSpecialEffect(ItemTable[dex].sfx, x, y)
I understand why you were doing so, but adding some wrappers, like what I have suggested before, is way better and more friednly. Those long and fat ITE checking is one poor and slow approach. Consider using array variables more than ITE checking:
JASS:function RegisterItem takes integer id, real data1, ...<some other datas>... , string sfxFilePath, string sfxAttachPt returns nothing set ItemCounter = ItemCounter + 1 // First save the index into a hashtable with item's id as parent key call StoreInteger(Hashtable, id, 0, ItemCounter) set ItemTable[ItemCounter].data1 = data1 .... set ItemTable[ItemCounter].sfx = sfxFilePath set ItemTable[ItemCounter].sfxPt = sfxAttachPt endfunction
Later if you want to call for the datas you can use this:
JASS:// Getting item's index in the list local integer dex = GetStoredInteger(Hashtable, itemID, 0) //Getting item's sfx call AddSpecialEffect(ItemTable[dex].sfx, x, y)
It's vJass indeed. But I hope you understand my point.
I think you should use Tablebut i dont wanted use alot hashtable because that also make it slow, no? without vjass (like mentioned above i wanted this in jass section and not in vjass) only option is hashtable, and from that already use several :/
This is not true, as that resource is vJASS, and can't be used if you are only using JASS.yea if you are wring anything in jass and want to use a hashtable you should use table http://www.hiveworkshop.com/forums/jass-resources-412/snippet-new-table-188084/
Lucky you, this is one of the hardest system to import. Use JNGP to at least make it a little easier.
I highly recommend that you just build a map around this instead of importing this massive system.
v0.99b
- few minor changes (like RegHero function at "init hashtables and .." trigger automatical save hero type into save load hashtable)
- Save - Load code added:
Features:
- data saved directly into hard disc, you can copy paste the code (example u started the map, copy-paste with notepad)
- few thing customizable in header - constants "SL_" functions (SL=the function or variable is part of the save load system)
- saveable: gold/lumber/coord/stat (str/agi/int)/class/hero/level & exp (dynamic), craft skill progress
-stat saving: hero current stat - stat from items - start stat
- since we talk about random stat items, not constant items, code became long, so this
system support multi save/load lines like: -load code1 then -load code2 ...
(where code1 and code2 is the saved code)
- multiple code line limit is 39 line, each line could be around max 100 character
- added the equipment saves too but still don't got time to make the loading part aswell
*idk about inventory saveing worth to do or no*
v0.99a
- fixed the bag system included with multiboard (ex. not was showed in multiboard the 1st item in bag)
and fixed when charm item bonus not was removed/added when u moved into bag, moved out
- summoner class stuffs
- several text fix with item properties in hover tool tip in shop (like if mouse on helm then its show buyable helm mdef/pdef)
- added timer to multiboard item tooltip, damage detection system - set damage part etc
- few minor changes
v0.99
- New socket items added and now easier to register new socket gems
in "Item Registration at Map Init" you need refister like ever item for attach icon to it
then use: call RegSocketGem (ItemRawCode, GemType, Grade, ItemLevelRequiment, ItemStatInArmor1, StatValueInArmor1, ItemStatInWeapon2, StatValueInWeapon2, ItemStatInWings3, StatValueInWings3)
- New socket gems also added to shop for test
- Gems working
- Minor text fix at multiboard pager (when u are at socket view)
- Since items & gems can give critical dmg bonus i reduced the default critical dmg (if u want change then constant function in header DEFAULT_CRITICAL_DAMAGE())
- Minor fix at tooltip in shop about weapon dmg, weapon dmg now globally changeable in header easily
- added minimum damage to weapons, multiboard/stats in inventory (ratio easily changeable in header)
- gem icon showed if u check Socket/Set view and item got inserted gem
- added item stat 82 => this attack or damage but depend on weapon, if physical weapon then give pattak if magic then magic attack, only used for gems
- save all above+inventory? (code length drastically could increased if in inventory have equipable items too)