Non-scripter[1/5]Beginner[1/5]Advanced Scripter[1/5]Expert[1/10]Pro[1/100]
Sub TakeItem(index, item, value)If value = "all" ThenSLOT = 1Do While SLOT < 24If GetPlayerInvItemNum(index, SLOT) = item ThenCall SetPlayerInvItemNum(index, SLOT, 0)Call SetPlayerInvItemValue(index, SLOT, 0)Call SendInventoryUpdate(index, SLOT)SLOT = 24End IfSLOT = SLOT+1LoopElseSLOT = 1Do While SLOT < 24If GetPlayerInvItemNum(index, SLOT) = item ThenCall SetPlayerInvItemNum(index, SLOT, 0)Call SetPlayerInvItemValue(index, SLOT, GetPlayerInvItemValue(index, SLOT) - value)Call SendInventoryUpdate(index, SLOT)SLOT = 24End IfSLOT = SLOT+1LoopEnd IfEnd Sub
all(to take away all items)0(if it is a non-stackable item)1 or higher(if it is a stackable item)
Sub GiveItem(index, item, value)SLOT = 1Do While SLOT < 24If GetPlayerInvItemNum(index, SLOT) = 0 ThenCall SetPlayerInvItemNum(index, SLOT, item)Call SetPlayerInvItemValue(index, SLOT, value)Call SendInventoryUpdate(index, SLOT)SLOT = 24End IfSLOT = SLOT+1LoopEnd Sub
0(if it is a non-stackable item)1 or higher(if it is a stackable item)
Sub ChangeItem(index, olditem, newitem, newval)SLOT = 1Do While SLOT < 24If GetPlayerInvItemNum(index, SLOT) = olditem ThenCall SetPlayerInvItemNum(index, SLOT, newitem)Call SetPlayerInvItemValue(index, SLOT, newval)Call SendInventoryUpdate(index, SLOT)SLOT = 24End IfSLOT = SLOT+1LoopEnd Sub
Sub lockall(index, mode)If mode = "true" Thenlockall = trueElseif mode = "false" Thenlockall = falseEnd If
If lockall(index, mode) = true ThenExit SubEnd If
Sub LoginCount(mode)If LoginCount = "" ThenLoginCount = 0End IfIf mode = "+" ThenLoginCount = LoginCount + 1Elseif mode = "-" ThenLoginCount = LoginCount - 1End IfEnd Sub
Call LoginCount("+")
Call LoginCount("-")
+ adds 1- removes 1
TakeItem(index, item, value)GiveItem(index, item, value)ChangeItem(index, olditem, newitem, newval)lockall(index, mode)LoginCount(mode)