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 Skrypt na anni lever !

Status
Not open for further replies.

Sezamek112

Active User
Joined
Sep 15, 2012
Messages
68
Reaction score
2
Witam! (Nie moje autorstwo!)

A wi?c wchodzimy w data/actions/scripts i tworzymy plik o nazwie annilever.lua

A w nim :
-- annihilator lever

function onUse(cid, item, frompos, item2, topos)

if item.uid == 7000 and item.itemid == 1945 then
player1pos = {x=788, y=128, z=8, stackpos=253}
player1 = getThingfromPos(player1pos)

player2pos = {x=789, y=128, z=8, stackpos=253}
player2 = getThingfromPos(player2pos)

player3pos = {x=790, y=128, z=8, stackpos=253}
player3 = getThingfromPos(player3pos)

player4pos = {x=791, y=128, z=8, stackpos=253}
player4 = getThingfromPos(player4pos)
dzwignia = os.clock()


if player1.itemid > 0 and player2.itemid > 0 and player3.itemid > 0 and player4.itemid > 0 then
queststatus1 = getPlayerStorageValue(player1.uid,8899)
queststatus2 = getPlayerStorageValue(player2.uid,8899)
queststatus3 = getPlayerStorageValue(player3.uid,8899)
queststatus4 = getPlayerStorageValue(player4.uid,8899)

if queststatus1 == -1 and queststatus2 == -1 and queststatus3 == -1 and queststatus4 == -1 then
nplayer1pos = {x=805, y=123, z=8}
nplayer2pos = {x=806, y=123, z=8}
nplayer3pos = {x=807, y=123, z=8}
nplayer4pos = {x=808, y=123, z=8}

doSendMagicEffect(player1pos,2)
doSendMagicEffect(player2pos,2)
doSendMagicEffect(player3pos,2)
doSendMagicEffect(player4pos,2)

doTeleportThing(player1.uid,nplayer1pos)
doTeleportThing(player2.uid,nplayer2pos)
doTeleportThing(player3.uid,nplayer3pos)
doTeleportThing(player4.uid,nplayer4pos)

doSendMagicEffect(nplayer1pos,10)
doSendMagicEffect(nplayer2pos,10)
doSendMagicEffect(nplayer3pos,10)
doSendMagicEffect(nplayer4pos,10)

doTransformItem(item.uid,item.itemid+1)
else
doPlayerSendCancel(cid,"Somebody in your team has already done this quest.")
end
else
doPlayerSendCancel(cid,"You need four players for this quest.")
end

elseif item.uid ==7000 and item.itemid == 1946 then
if (dzwignia - os.clock()) > 30 then
doTransformItem(item.uid,item.itemid-1)
end
if getPlayerAccess(cid) > 0 then
doTransformItem(item.uid,item.itemid-1)
end
end
return 1
end

Potem wchodzimy w data/actions/actions.xml
I dodajemy linijke:
<action uniqueid="8899" script="annilever.lua" />

Potem dajemy na mapie lever i prawym properties uniqueid : 8899

Pomog?em daj reputa :)
 

tytan53

Advanced User
Joined
Dec 13, 2008
Messages
195
Reaction score
11
Odp: Skrypt na anni lever !

?adna pomoc, pe?no tego na forum i na dodatek nie Twoje :)
Pozdrawiam.
 

tytan53

Advanced User
Joined
Dec 13, 2008
Messages
195
Reaction score
11
Odp: Skrypt na anni lever !

Przecie? nie napisa?em ?e ukrad?e? tylko napisa?em ?e nie masz czym si? chwali? bo nie Twoje :) pozdrawiam kolego :)
 

Sezamek112

Active User
Joined
Sep 15, 2012
Messages
68
Reaction score
2
Odp: Skrypt na anni lever !

Ale na samym pocz?tku odrazu spiny ;S wida? gimbus jeste?
?adna pomoc, pe?no tego na forum i na dodatek nie Twoje
Pozdrawiam.
 

tytan53

Advanced User
Joined
Dec 13, 2008
Messages
195
Reaction score
11
Odp: Skrypt na anni lever !

Przecie? ja tylko powiedzia?em co my?l?, nie spina?em si? do nikogo :)

Pozdro.
 
Status
Not open for further replies.
Top