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

ACTION crowbar

Atlas

GM Atlas
Joined
Jun 7, 2007
Messages
79
Reaction score
0
Location
Wroclaw
Hello i need some help.

I need to create second mission for postman quest.
Postman2.png


In this mission you need to use crowbar on mailbox and u need to add storage id
i scripted this

Code:
local storage = 9999
local getstorage = getPlayerStorageValue(cid, storage)

function onUse(cid, item, fromPosition, itemEx, toPosition)
	if(itemEx.itemid == 2593 and getstorage == 3) then
		doSendMagicEffect(toPosition, CONST_ME_BLOCKHIT)
		setPlayerStorageValue(cid, storage, 4)
		return true
	end

	return false
end
But i need to check if player is using crowbar on specified localisation for example Position: [X: 32013] [Y: 31562] [Z: 4].

Can someone help me with this?:)
 
NO! you dont need to check the position where he is using it

all you need is to assign an unique id (uid) to the mailbox in the map editor.
3434 in this example


Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)

local mailuid = 3434
local storage = 9999
local getstorage = getPlayerStorageValue(cid, storage)

	if(itemEx.itemid == 2593 and itemEx.uid == mailuid and getstorage == 3) then
		doSendMagicEffect(toPosition, CONST_ME_BLOCKHIT)
		setPlayerStorageValue(cid, storage, 4)	
	return true
end
end


:D
 
Back
Top