- Joined
- Jun 5, 2008
- Messages
- 2,572
Simple inventory system, scroll to my last post to see the latest update on it.
Last edited:
set class_index = class_index+1
set CLASS[2] = 2
set Req_Class[2] = '#CL2'
set class_index = class_index+1
set CLASS[class_index] = 2
set Req_Class[class_index] = '#CL2'
set class_index = class_index+1
Catch_ya said:why you use this ?
set class_index = class_index+1
when you use this:
set CLASS[2] = 2
set Req_Class[2] = '#CL2'
set class_index = class_index+1
why not this ?:
set CLASS[class_index] = 2
set Req_Class[class_index] = '#CL2'
set class_index = class_index+1
call CreateCustomItem(name, class, icon(destructable), iid(itemid), dmg, hp etc..)
function CreateCustomItem takes integer idd, integer icon, string stats returns nothing
call CreateCustomItem(iid, icon, "dmg;3;6(randomizing damage like 3 is the minimum and 6 is the maximum), and then on..
GetRandomReal(3,6)
function LinkCode takes integer i,integer val returns nothing
set Link[i]=val
endfunction
call LinkCode(0,inventory_slot)
Set Link[0]=inventory_slot
i wont have you stressing on this system =)Still won't a parser put more stress on the system while it takes the string and parse it?
Also putting a wrong string would result in nothing or parsing errors, no? :O
EDIT:
If you got an idea how to link the item sets and actual items together, please notify me
yes i also think that you should focus on optimizing the code and get a background. And then maybe after you have submitted it you could update it with sockets if people wants it.EDIT2:
In order to speed up the systems release, i am gonna neglect the Item slots/sockets idea and get ready to optimize the code & get a decent background.
@Catch_ya
Added you to credits btw.