What's new
  • logo_cipsoft
    Latest servers:
    New servers will open on: 19th Feb 2025:
    Noctalia (Open PvP) Ignitera (Open PvP) us_logo Xybra (Open PvP)

Actions Item po naci?ni?ciu znika

Status
Not open for further replies.

Matt

Banned
Joined
May 9, 2013
Messages
595
Reaction score
45
A? tak mi si? nudzi o tej godzinie, ?e z nud?w napisa?em pro?ciutki skrypt.

Opis: Po naci?ni?ciu d?wigni, wybrana przez nas rzecz po prostu znika.
Skrypt:

Wchodzimy sobie do data/actions/scripts i tworzymy plik rzecz.lua do kt?rego wklejamy to:
PHP:
function onUse(cid, item, frompos, item2, topos)
gatepos = {x=686, y=1068, z=7, stackpos=1}  --po?o?enie item'a.
getgate = getThingfromPos(gatepos)
if item.uid == 1234 and item.itemid == 1945 and getgate.itemid == 1355 then
doRemoveItem(getgate.uid,1)
doTransformItem(item.uid,item.itemid+1)
elseif item.uid == 1234 and item.itemid == 1946
and getgate.itemid == 0 then
doCreateItem(1355,1,gatepos)
doTransformItem(item.uid,item.itemid-1)
else
doPlayerSendCancel(cid,"Sorry, not possible.")
end
return 1
end

1355 - ID rzeczy, kt?ra ma znikn?? po naci?ni?ciu.


actions.xml wklejamy:
PHP:
<action uniqueid="1234" script="rzecz.lua" />

Proste ale dla ludzi, kt?rzy lubi? dodawa? wszystko do swoich serwer?w ot 7.6 mo?e by?.
 
Status
Not open for further replies.
Top