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

[YurOT-7.60] - dzwignia tworząca przedmiot

Dark Magican

Batory 7.72 - map developer.
Joined
Jun 30, 2009
Messages
34
Reaction score
17
Location
Legnica
Witam, potrzebuje skrypt na dzwignię która tworzy item, który znika po kilku sekundach. Chciałbym aby to był teleport, mam skrypt ale nie potrafię sobie poradzić z dodaniem czasówki, Pozdrawiam ;)


Code:
function onUse(cid, item, frompos, item2, topos)
item1pos = {x=1155, y=1177, z=8, stackpos=1} -- pos gdzie ma lezec 1 itemek
item2pos = {x=1155, y=1179, z=8, stackpos=1} -- pos gdzie ma lezec 2 itemek
nagrodapos = {x=1154, y=1177, z=8, stackpos=2} -- pos gdzie ma sie pojawic nagroda
tppos = {x=1148, y=1178, z=8, stackpos=1} -- pos gdzie ma sie pojawic nagroda
gdzietp = {x=1154, y=1177, z=8, stackpos=1} -- pos gdzie ma sie pojawic nagroda
item1 = getThingfromPos(item1pos)
item2 = getThingfromPos(item2pos)
if item.uid == 6666 and item.itemid == 1945 and item1.itemid == 2376 and item2.itemid == 2376 then -- XXXX - id 1 itemka OOOO - id 2 itemka
doRemoveItem(item1.uid,1)
doRemoveItem(item2.uid,1)
  doCreateItem(2412,1,nagrodapos)
    addTeleport(5023, tppos, gdzietp)
doPlayerSendTextMessage(cid,22,"Stworzyles taki i taki miecz.")
doTransformItem(item.uid,item.itemid+1)
elseif item.uid == 6666 and item.itemid == 1946 then
doTransformItem(item.uid,item.itemid-1)
else
doPlayerSendTextMessage(cid,22,"Nie mozliwe.")
end
return 1
end
 
Back
Top