• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Skrypt

GarQet

Own3d!
Joined
Feb 10, 2009
Messages
1,381
Solutions
14
Reaction score
81
Witam, prosiłbym kogoś aby pomógł mi i napisał jedną część skryptu, mianowicie:
Skrypt sprawdza czy na danej pozycji jest item o ID:1386, jeżeli jest to go kasuje, zaś jeżeli nie ma to nic nie robi.
Proszę o pomoc.
Pozdrawiam GarQet.
 
Code:
local pos = { x=, y=, z=, stackpos = }
local item = getThingFromPos(pos)
if( item.itemid = ) then
     doRemoveItem(item.uid)
end

cos w tym stylu, nie sprawdzane - testnac musisz.
 
LUA:
function onUse(cid, item, frompos, item2, topos)
local pozycja = {
[1111] = {x = 1000, y = 1000, z = 7, stackpos = 1, item = 1386},
[1112] = {x = 1000, y = 1000, z = 7, stackpos = 1, item = 1386}
}
local tbl = pozycja[item.uid]
local przedmiot = tbl.item
local item = getThingFromPos(tbl)
if(item.itemid == przedmiot) then
     doRemoveItem(item.uid, 1)
else
	return TRUE
end
end

Code:
<action uniqueid="1111" script="xxx.lua"/>

Jak się instaluje?
Dodajesz do tabeli pozycja :
[1111] = {x = 1000, y = 1000, z = 7, stackpos = 1, item = 1386},
[item Unique] {x,y,z = pozycja, item = jaki tam ma być item]
100 zł proszę... xd
 
Back
Top