marcos16
Falkhonn
- Joined
- May 4, 2012
- Messages
- 224
- Reaction score
- 1
Hello OtLanders.
Well, I have a script that needs some modifications ... So I need someone to do this ... Follow the script below
What I wanted to change is to use the command only in protection zone, to be without battle and to dislodge when accepting the trade ... Could anyone do this? REP ++
Well, I have a script that needs some modifications ... So I need someone to do this ... Follow the script below
Code:
local config = {
itemid = 5957,
storage1 = 224413
}
function onSay(cid, words, param, param2, channel)
if param == '' then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command requires param.")
return false
end
local t = string.explode(param, ",")
local creature = getCreatureByName(t[1])
if not creature and isPlayer(creature) and not isPlayerGhost(creature) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Invalid param specified.")
return false
end
if os.time() > getPlayerStorageValue(cid, config.storage1) then
local days = tonumber(t[2])
if days < 2 then
doPlayerSendCancel(cid, "O mínimo que você pode transferir é de 2 dias.")
return false
end
if days and type(days) == 'number' and getPlayerPremiumDays(cid) - 2 >= days then
doStartTrade(cid, creature, doPlayerAddItem(cid, config.itemid, 1))
doPlayerSendTextMessage(creature, MESSAGE_INFO_DESCR, "O Jogador " .. getPlayerName(cid) .. " deu trade em você, e está disposto a trocar " .. days .. " dia(s) de VIP.")
setPlayerStorageValue(cid, config.storage1, days)
else
doPlayerSendCancel(cid, "Você não pode transferir essa quantidade de VIP.")
end
end
return false
end
What I wanted to change is to use the command only in protection zone, to be without battle and to dislodge when accepting the trade ... Could anyone do this? REP ++