Ah, of course. Then it would indeed make sense to make loaded items not able to be traded.
So loaded items will be destroyed once another code is reloaded (preventing personal wealth through dropping --> reloading),
and loaded items cannot be traded (preventing shared wealth, through the means mentioned by Nes and DSG).
That would make it completely safe, unless I'm missing something?
Can someone explain i didint get it where should i add that what ap0calypse told me to do?
The script you pasted in your previous post is correct.
If it is about the GUI-trigger, I already told you where you should put that.
In the trigger ""NPS L Write Data To Unit", find these actions:
-
-------- Item Data --------
-
-------- For each Integer A ------ FIX ------ For some reason any use of For each Integer A loops can malfunction (If there is another trigger which uses Hero aquires item Event) I have changed this to B in hopes that if you wont use it in this case. --------
-
For each (Integer LoopInt2) from 1 to 6, do (Actions)
-
Loop - Actions
-
Set TempInt1 = (TempInt1 + 1)
-
Item - Create Item_List_Array[NPS_Data_Int[TempInt1]] at (Center of (Playable map area))
-
Hero - Give (Last created item) to (Last created unit)
And add these 2 actions to the end of the loop:
-
Item - Remove (Load LoopInt2 of (Player number of (Triggering player)) in Hashtable)
-
Hashtable - Save Handle Of(Last created item) as LoopInt2 of (Player number of (Triggering player)) in Hashtable
That said, you still need to disable trading loaded items.
I'm going off now for a little while. I'm thinking of saving those items in the hashtable (now that we've already got it anyway), with the item id as the parent and the player number as the child value.
This would give us an O(1) lookup I believe.