
Nie tylko o Tibii i OTS...

Prosze o skrypt na annihilatora z wszytkimi plikami takimi jak pokoj z nagrodami. Prosze tez o instrukcje jak to wszystko zrobic
Offline
-- Annihilator script by GriZzm0
-- Room check and monster removal by Tworn
--Variables used:
-- player?pos = The position of the players before teleport.
-- player? = Get the thing from playerpos.
--player?level = Get the players levels.
--questslevel = The level you have to be to do this quest.
--questtatus? = Get the quest status of the players.
--demon?pos = The position of the demons.
--nplayer?pos = The position where the players should be teleported too.
--trash= position to send the demons to when clearing, 1 sqm in middle of nowhere is enough
-- starting = Upper left point of the annihilator room area.
-- ending = Bottom right point of the annihilator room area.
--UniqueIDs used:
--7000 = The switch.
function onUse(cid, item, frompos, item2, topos)
if item.uid == 7000 then
if item.itemid == 1946 then
local player1pos = {x=322, y=56, z=9, stackpos=253}
local player1 = getThingfromPos(player1pos)
local player2pos = {x=321, y=56, z=9, stackpos=253}
local player2 = getThingfromPos(player2pos)
local player3pos = {x=320, y=56, z=9, stackpos=253}
local player3 = getThingfromPos(player3pos)
local player4pos = {x=319, y=56, z=9, stackpos=253}
local player4 = getThingfromPos(player4pos)
if isPlayer(player1) == 1 and isPlayer(player1) == 2 and isPlayer(player3) == 1 and isPlayer(player1) == 4 then
local player1level = getPlayerLevel(player1.uid)
local player2level = getPlayerLevel(player2.uid)
local player3level = getPlayerLevel(player3.uid)
local player4level = getPlayerLevel(player4.uid)
local questlevel = 100
if player1level >= questlevel and player2level >= questlevel and player3level >= questlevel and player4level >= questlevel then
local queststatus1 = getPlayerStorageValue(player1.uid,100)
local queststatus2 = getPlayerStorageValue(player2.uid,100)
local queststatus3 = getPlayerStorageValue(player3.uid,100)
local queststatus4 = getPlayerStorageValue(player4.uid,100)
if queststatus1 == -1 and queststatus2 == -1 and queststatus3 == -1 and queststatus4 == -1 then
--if 1==1 then
local demon1pos = {x=338, y=57, z=9}
local demon2pos = {x=339, y=57, z=9}
local demon3pos = {x=336, y=59, z=9}
local demon4pos = {x=334, y=59, z=9}
local demon5pos = {x=335, y=55, z=9}
local demon6pos = {x=337, y=55, z=9}
doSummonCreature("Demon", demon1pos)
doSummonCreature("Demon", demon2pos)
doSummonCreature("Demon", demon3pos)
doSummonCreature("Demon", demon4pos)
doSummonCreature("Demon", demon5pos)
doSummonCreature("Demon", demon6pos)
local nplayer1pos = {x=337, y=57, z=9}
local nplayer2pos = {x=336, y=57, z=9}
local nplayer3pos = {x=335, y=57, z=9}
local nplayer4pos = {x=334, y=57, z=9}
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,1945)
else
doPlayerSendCancel(cid,"Sorry, not possible.")
end
else
doPlayerSendCancel(cid,"Sorry, not possible.")
end
else
doPlayerSendCancel(cid,"Sorry, not possible.")
end
end
if item.itemid == 1945 then
-- Here is the code start:
starting={x=332, y=53, z=9, stackpos=253}
checking={x=starting.x, y=starting.y, z=starting.z, stackpos=starting.stackpos}
ending={x=352, y=61, z=9, stackpos=253}
players=0
totalmonsters=0
monster = {}
repeat
creature= getThingfromPos(checking)
if creature.itemid > 0 then
if getPlayerAccess(creature.uid) == 0 then
players=players+1
end
if getPlayerAccess(creature.uid) ~= 0 and getPlayerAccess(creature.uid) ~= 3 then
totalmonsters=totalmonsters+1
monster[totalmonsters]=creature.uid
end
end
checking.x=checking.x+1
if checking.x>ending.x then
checking.x=starting.x
checking.y=checking.y+1
end
until checking.y>ending.y
if players==0 then
local trash= {x=387, y=41, z=9}
current=0
repeat
current=current+1
doTeleportThing(monster[current],trash)
until current>=totalmonsters
doTransformItem(item.uid,1946)
end
-- Here is the end of it
end
end
return 1
end
Sory ale teraz niestety nie mam czasu wytłumaczyć jak go zrobić ale postaram się w jak najbliższym czasie
Offline

a ja mam problem z dźwignią nie chce teleportować :( jak ktoś wie jak to zrobić był bym wdzięczny
Offline

paligoz tu masz link http://www.otfans.pl/forums/printthread.php?tid=11159
Offline

Wielkie dzieki! Mialem problem bo dzwignia nie teleportowala ale teraz dziala
Offline

mam mały problem niem od czego to jest
starting={x=332, y=53, z=9, stackpos=253}
ending={x=352, y=61, z=9, stackpos=253}
local trash= {x=387, y=41, z=9}
Offline

Ja mam ten sam problem jak porusze dzwignia to nic sie niedzieje A zrobilem na dole wszystko
Offline