• 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!

OTClient GOD COMMAND PROBLEM

HunteriaOT

New Member
Joined
Nov 21, 2018
Messages
7
Reaction score
0
Whenever I do the command /i (item id) instead of the item it spawns a building etc, if you need any information just ask.

I really need help with this.
 
Last edited by a moderator:
post the script and your tfs version.
i suggest reading the rules next time before creating a new thread: Rules for the Support board
5. Incomplete Problem Description:
- Post as much useful information as possible. If the problem is about something on your server, post the server version and client version. Also always post the errors you get and the scripts with the problems.
 
post create_item.lua in talkactions/scripts folder

There is this .lua already, this is what is in it.

function onSay(player, words, param)
if not player:getGroup():getAccess() then
return true
end

local split = param:split(",")

local itemType = ItemType(split[1])
if itemType:getId() == 0 then
itemType = ItemType(tonumber(split[1]))
if itemType:getId() == 0 then
player:sendCancelMessage("There is no item with that id or name.")
return false
end
end

local count = tonumber(split[2])
if count ~= nil then
if itemType:isStackable() then
count = math.min(10000, math.max(1, count))
elseif not itemType:isFluidContainer() then
count = math.min(100, math.max(1, count))
else
count = math.max(0, count)
end
else
count = itemType:isFluidContainer() and 0 or 1
end

local result = player:addItem(itemType:getId(), count)
if result ~= nil then
if not itemType:isStackable() then
if type(result) == "table" then
for i = 1, #result do
result:decay()
end
else
result:decay()
end
end
player:getPosition():sendMagicEffect(CONST_ME_MAGIC_GREEN)
end
return false
end
 
i've warned him to not remove solved content, i restored the original post, now he either posts the solution or gets another warning for violating the rules.
 
Back
Top