• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

Klonowanie kasy na 0.3.5pl1

Status
Not open for further replies.

Kurczok

Newbie
Joined
Oct 22, 2009
Messages
497
Reaction score
4
Witam mam problem ponieważ dziś doświadczyłem nieprzyjemnego incydentu klonowanie pieniędzy. A dokładnie gracz stał przy dp i pojawiały się pod nim pieniądze sprawdziłem również stan konta jednego z graczy (konto zostało założone z 5 min przed incydentem i na postaci był bp cc w rekach i miejscu na strzały trzymał po 100 platynek, depo było całe w cc a stan konta bankowego to jakieś 20bp cc. Wie ktoś może jakie skrypty najczęściej powodują takie "błędy" lub może jest inny sposób?
 
moze u npc np kupuje mace za 30 gp a sprzedaje za 60 gp
 
Nie mam npc do banku mam same komendy

!transferall
Code:
function onSay(cid, words, param)
if(param == "") then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Command requires param.")
return TRUE
end
local t = string.explode(param, ",")
if playerExists(param) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You have transferred " .. getPlayerBalance(cid) .. " gold to " .. param .. ".")
doPlayerTransferAllMoneyTo(cid, param)
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Player " .. param .. " does not exist.")
end
end

!withdrawall

Code:
function onSay(cid, words, param)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Here you are, " .. getPlayerBalance(cid) .. " gold.")
doPlayerWithdrawAllMoney(cid)
end

!balance

Code:
function onSay(cid, words, param)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Your account balance is " .. getPlayerBalance(cid) .. ".")
end

!depositall

Code:
function onSay(cid, words, param)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Alright, you have added the amount of " .. getPlayerMoney(cid) .. " gold to your balance. You can withdraw your money anytime you want to.")
doPlayerDepositAllMoney(cid)
end

!deposit

Code:
function onSay(cid, words, param)
if(param == "") then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Command requires param.")
return TRUE
end
local m = tonumber(param)
if(not m) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Command requires numeric param.")
return TRUE
end
if m <= getPlayerMoney(cid) then
doPlayerDepositMoney(cid, m)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Alright, you have added the amount of " .. m .. " gold to your balance. You can withdraw your money anytime you want to. Your account balance is " .. getPlayerBalance(cid) .. ".")
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You do not have enough money.")
end
end

!transfer

Code:
function onSay(cid, words, param)
if(param == "") then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Command requires param.")
return TRUE
end
local t = string.explode(param, ",")
local m = tonumber(t[2])
local tmp = string.explode(t[2], ",")
if(not m) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "No money specified.")
return TRUE
end
if m <= getPlayerBalance(cid) then
if playerExists(t[1]) then
doPlayerTransferMoneyTo(cid, t[1], m)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You have transferred " .. m .. " gold to " .. t[1] .. ". Your account balance is " .. getPlayerBalance(cid) .. " gold.")
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Player " .. t[1] .. " does not exist.")
end
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "There is not enough gold on your account. Your account balance is " .. getPlayerBalance(cid) .. ". Please tell the amount of gold coins you would like to transfer.")
end
end

!withdraw

Code:
function onSay(cid, words, param)
local m = tonumber(param)
if(param == "") then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Command requires param.")
return TRUE
end
if(not m) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Command requires numeric param.")
return TRUE
end
if m <= getPlayerBalance(cid) then
doPlayerWithdrawMoney(cid, m)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Here you are, " .. m .. " gold. Your account balance is " .. getPlayerBalance(cid) .. ".")
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "There is not enough gold on your account.")
end
end



gdy wpisze niepoprawnie komende "!transfer 0" (bez name gracza)
w konsoli wywala błąd

Code:
Lua Script Error: [TalkAction Interface]
data/talkactions/scripts/bank/transfer.lua:onSay

data/lib/string.lua:19: attempt to get length of local 'str' (a nil value)
stack traceback:
        data/lib/string.lua:19: in function 'explode'
        data/talkactions/scripts/bank/transfer.lua:8: in function <data/talkactions/scripts/bank/transfer.lua:1>
 
Tak, jest napisane że nie mam tyle pieniędzy i nie dodaje nic.
 
Last edited:
albo to moze byc od NPC Frodo kompatybilnego z najnowszym tfs 0.3.5 masz takiego?



btw. tak to jest jak sie ładuje na serwer npc/komendy od banku nie wiedząc jak one dzialaja i gdzie maja błędy ;ddd
 
Macie racje pora pozbyć się nie obcych skryptów i pozostawić to co robiłem sam (bo przeważnie przez takie bezużyteczne rzeczy jak np: bank są problemy)

Problem rozwiązany po wpisaniu !withdraw -10000 tworzyło pod nogami 100cc i dodawało do konta kolejne 100.

Dzięki za pomoc.
 
Status
Not open for further replies.
Back
Top