<?xml version="1.0" encoding="utf-8"?>
<CheatTable>
<CheatEntries>
<CheatEntry>
<ID>3</ID>
<Description>"SpawnItem"</Description>
<Options moHideChildren="1"/>
<LastState/>
<VariableType>Auto Assembler Script</VariableType>
<AssemblerScript>[ENABLE]
alloc(newMemory,256)
registersymbol(newMemory)
label(newItemType)
registersymbol(newItemType)
newMemory:
push eax //Pushing eax for our usage
push edx //pushing edx for our usage
call Terraria.Main::get_LocalPlayer //After this function is our PlayerBase saved in eax
push ecx //pushing for our usage
push 0 //Passing false as parameter for SetDefaults
mov ecx,[eax+a8] // We want to put the addr of our trashitem in here, eax = localPlayer
mov edx,[newItemType]// Passing our second parameter for the function
call Terraria.Item::SetDefaults // calling the function
pop eax
pop edx
pop ecx
ret
newItemType:
dd 1
[DISABLE]
dealloc(newMemory)
unregistersymbol(newMemory)
unregistersymbol(newItemType)
//TrashItem is the itemspace we want to use, you could use other inventory slots too
//TrashItem is located at LocalPlayer+A8
</AssemblerScript>
<CheatEntries>
<CheatEntry>
<ID>4</ID>
<Description>"new Item Type"</Description>
<VariableType>4 Bytes</VariableType>
<Address>newItemType</Address>
</CheatEntry>
<CheatEntry>
<ID>5</ID>
<Description>"Spawnitem"</Description>
<LastState/>
<VariableType>Auto Assembler Script</VariableType>
<AssemblerScript>[ENABLE]
CreateThread(newMemory)
[DISABLE]
</AssemblerScript>
</CheatEntry>
</CheatEntries>
</CheatEntry>
</CheatEntries>
</CheatTable>