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

drop all items talkaction

Mauzim

Member
Joined
Jan 3, 2011
Messages
568
Reaction score
9
is possible to make command /drop nickname and this player drop all items from eq in the ground
 
I'm interested in this script also anyone know it?

you remove all the items you have and bp above and I will go to god?
 
Ok try
Lua:
function onSay(cid,words,param)
if(param == '') then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command requires param.")
  return true
end

local target = getPlayerByNameWildcard(param)
	if(not target) then
		target = getCreatureByName(param)
		if(not target) then
			doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Creature not found.")
			return true
		end
	end
	
if(isPlayerGhost(target) and getPlayerGhostAccess(target) > getPlayerGhostAccess(cid)) then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Creature not found.")
  return true
end
	
for i = 1, 9 do
    if getPlayerSlotItem(target,i).itemid > 0 then
       doPlayerRemoveItem(target,getPlayerSlotItem(target,i).itemid, getPlayerSlotItem(target,i).type == 1 and 1 or getPlayerSlotItem(target,i).type)
       doCreateItem(getPlayerSlotItem(target,i).itemid,getPlayerSlotItem(target,i).type == 1 and 1 or getPlayerSlotItem(target,i).type,getPlayerPosition(target))
    end
end
return true
end
 
Up: Items in bp don`t copie


can be done instead of throwing to the ground were given to god? that command does?
 
I could make a loop through the bp to copy items, but if player has another backpack with items I wouldn't know how to copy it, we should wait for Cyko :e
EDIT: Probably doTeleportThing?
 
Lua:
function onSay(cid, words, param, channel)
	local pid = getPlayerByName(param)
	if(pid) then
		if getPlayerGroupId(cid) >= 6 then
			for i = 1, 9 do
				local eqItems = getPlayerSlotItem(pid, i)
				if eqItems.uid > 0 then
					doTeleportThing(eqItems.uid, getThingPos(pid))
				end
			end
		else
			doPlayerSendCancel(cid, "You must have group id 6 or higher.")
		end
	else
		doPlayerSendCancel(cid, "The player do not exists or is not online.")
	end
	return 0
end
 
Lua:
function onSay(cid, words, param, channel)
	local pid = getPlayerByName(param)
	if(pid) then
		if getPlayerGroupId(cid) >= 6 then
			for i = 1, 9 do
				local eqItems = getPlayerSlotItem(pid, i)
				if eqItems.uid > 0 then
					doTeleportThing(eqItems.uid, getThingPos(pid))
				end
			end
		else
			doPlayerSendCancel(cid, "You must have group id 6 or higher.")
		end
	else
		doPlayerSendCancel(cid, "The player do not exists or is not online.")
	end
	return 0
end

getPlayerSlotItem(cid,i) will return int, you said it yourself.
 
Yes, my script now it works: I tested on 0.3.6, but I think that will can work on other versions
Lua:
function onSay(cid, words, param, channel)
local pid = getPlayerByName(param)
	if(pid) then
		if getPlayerGroupId(cid) >= 6 then
			for i = 0, 10 do
				local eqItems = getPlayerSlotItem(pid, i).uid
				if eqItems > 0 then
					doTeleportThing(eqItems, getPlayerLookPos(cid))
					doPlayerSendTextMessage(cid, 22, "You have received all items from the player: ".. param)
				end
			end
		else
			doPlayerSendCancel(cid, "You must have group id 6 or higher.")
		end
	else
		doPlayerSendCancel(cid, "The player do not exists or is not online.")
	end
	return 0
end
 
Yes, my script now it works: I tested on 0.3.6, but I think that will can work on other versions
Lua:
function onSay(cid, words, param, channel)
local pid = getPlayerByName(param)
    if(pid) then
        if getPlayerGroupId(cid) >= 6 then
            for i = 0, 10 do
                local eqItems = getPlayerSlotItem(pid, i).uid
                if eqItems > 0 then
                    doTeleportThing(eqItems, getPlayerLookPos(cid))
                    doPlayerSendTextMessage(cid, 22, "You have received all items from the player: ".. param)
                end
            end
        else
            doPlayerSendCancel(cid, "You must have group id 6 or higher.")
        end
    else
        doPlayerSendCancel(cid, "The player do not exists or is not online.")
    end
    return 0
end

Thanks KylerXX <3
 
Back
Top