What's new

skrypt bardzo potrzebny

Status
Not open for further replies.

Xanius

User
Joined
Nov 19, 2010
Messages
48
Reaction score
0
Je?eli na kratce x 987 y 980 z 5 wypadnie item o id 2696 tepa gacza do temle ktory znajduje sie na pozycji x 987 y 978 z 5
 

Oskar

Forum friend
Joined
Jan 24, 2009
Messages
2,256
Reaction score
331
Odp: skrypt bardzo potrzebny

PHP:
local jaki_item = 2696
local gdzie_ma_teleportowac = {x=987,y=978,z=5}
local uniqueid_kratki = 1111

function onAddItem(moveItem, tileItem, pos, cid)
if getTileThingByPos(pos).uid ~= uniqueid_kratki then
return false
end
	local getpos = getThingFromPos({x=pos.x,y=pos.y,z=pos.z,stackpos=STACKPOS_TOP_FIELD})
	if moveItem.itemid == jaki_item then
		doTeleportThing(cid, gdzie_ma_teleportowac)
		doRemoveItem(moveItem.uid)
	end
return true
end
PHP:
<movevent type="AddItem" itemid="id_itemu" event="script" value="nazwa.lua"/>
 
Status
Not open for further replies.
Top