'***Script by SwiftDeathSK***Sub Stealing(index, itemnum, minvalue, maxvalue)'*************************************Dim TargetDim chanceDim xDim yDim zDim valueTarget = getplayertarget(index)If getplayertarget(index) < 1 Then Exit SubEnd IfIf GetPlayerX(index) = (GetPlayerX(Target) + 1) Or (GetPlayerX(Target) - 1) Then If GetPlayerY(index) = (GetPlayerY(Target) + 1) Or (GetPlayerY(Target) - 1) Then x = 0 Do While x <= 24 If GetPlayerInvItemNum(index, x) = 0 Or itemnum Then y = "True" x = 26 End If x = x + 1 Loop If y = "True" Then x = 0 Do While x <= 24 If GetPlayerInvItemNum(getplayertarget(index), x) = itemnum Then z = "True" x = 26 End If x = x + 1 Loop If z = "True" Then Call PlayerMsg(index, "You attempt to pickpocket " & Target & "...", 15) chance = rand(1, 100) If chance >= 50 Then value = rand(minvalue, maxvalue) Call PlayerMsg(index, "You successfully steal " & value & " Gold from " & Target & "!", 15) x = 0 Do While x <= 24 If GetPlayerInvItemNum(index, x) = itemnum Then Call SetPlayerInvItemValue(index, x, (GetPlayerInvItemValue(index, x) + value)) Else If GetPlayerInvItemNum(index, x) = 0 Then Call SetPlayerInvItemNum(index, x, itemnum) Call SetPlayerInvItemValue(index, x, value) End If End If x = x + 1 Loop x = 0 Do While x <= 24 If GetPlayerInvItemNum(Target, x) = itemnum Then Call SetPlayerInvItemValue(Target, x, (GetPlayerInvItemValue(Target, x) - value)) If GetPlayerInvItemValue(Target, x) <= 0 Then Call SetPlayerInvItemNum(Target, x, 0) End If End If x = x + 1 Loop Call SendInventory(index) Call SendInventory(Target) Else Call PlayerMsg(index, "You are caught while stealing!", 15) Call SetPlayerPK(index, 1) End If End If Call PlayerMsg(index, "Your inventory is full, you cant steal anything!", 15) Exit Sub End If Call PlayerMsg(index, "Your inventory is full, you cant steal anything!", 15) Exit Sub Else Call PlayerMsg(index, "That target is too far away!", 15) Exit Sub End IfElse Call PlayerMsg(index, "That target is too far away!", 15)End If
Call Stealing(index, itemnum, minvalue, maxvalue)
If GetPlayerInvItemNum(index, x) <> 0 or itemnum Then Call PlayerMsg(index, "Your inventory is full, you cant steal anything!", 15) Exit Subthat would cause it to stop if you have an item in your inventory..(without the inventory being full)and you should add an check if the player has targeted somebody:)besides that great script
(check the edit... )
Hey when I add this I cant start the server`.. :o
I recon u hav a nack for gfx. :D
When Japanese try to make RPGs, somebody sets up us the bomb