- Dołączył
- Kwiecień 10, 2009
- Posty
- 597
- Liczba reakcji
- 24
Nie dzia?a mi annihilator. Po u?yciu use na d?wignie nie teleportuje graczy w wyznaczone miejsce. M?g?by kto? naprawi? skrypt?
PHP:
--Anihilator Script by Rahim
local monsters = {
[100] = "demon",
[150] = "demon",
[200] = "demon"
}
local config = {
--Dzwignia
storage = 6217412,
tylkoRaz = "nie",
lvl = 100,
tylkoRazNaDzien = "nie",
summonowacPotwory = "tak",
startUid = 8000,
items = {2494,2400,2431,2112},
players = {
{x=352, y=532, z=14, stackpos=253},
{x=351, y=532, z=14, stackpos=253},
{x=350, y=532, z=14, stackpos=253},
{x=349, y=532, z=14, stackpos=253}},
npos = { --pozycje graczy po teleportowaniu
{x=394, y=536, z=14},
{x=393, y=536, z=14},
{x=392, y=536, z=14},
{x=391, y=536, z=14}},
monsterPos = {
[1] = {"Demon",{x=391,y=534,z=14,stackpos=253}},
[2] = {"Demon",{x=393,y=534,z=14,stackpos=253}},
[3] = {"Demon",{x=392,y=538,z=14,stackpos=253}},
[4] = {"Demon",{x=394,y=538,z=14,stackpos=253}},
[5] = {"Demon",{x=395,y=536,z=14,stackpos=253}},
[6] = {"Demon",{x=396,y=536,z=14,stackpos=253}}
}
}
function onUse(cid,item,frompos,item2,topos)
local found = 0
if item.itemid == 1945 then
for i = 1, #config.players do
local player = getThingfromPos(config.players[i])
if isPlayer(player.uid) ~= TRUE then
doPlayerSendCancel(cid,"You need four players for this quest.")
return TRUE
end
if getPlayerLevel(player.uid) < config.lvl then
doPlayerSendCancel(cid,"Somebody in your team hasn't required level!")
return TRUE
end
if config.tylkoRaz == "tak" then
if getPlayerStorageValue(player.uid,config.storage) == 1 then
doPlayerSendCancel(cid,"Somebody in your team already has a quest.")
return TRUE
end
found = found + 1
end
end
if found == 4 then
for i = 1, 4 do
doTeleportThing(getThingfromPos(config.players[i]).uid,config.npos[i])
doSendMagicEffect(config.npos[i],12)
doSendAnimatedText(config.npos[i],"Fight!",192)
end
if config.tylkoRazDziennie == "tak" then
doTransformItem(item.uid,item.itemid+1)
end
if config.summonowacPotwory ~= "tak" then
return TRUE
end
for y = 1, 6 do
local monster = getThingfromPos(config.monsterPos[y][2])
if monster.uid > 0 then
doCreatureAddHealth(monster.uid,-9999999999)
end
doSummonCreature(getMonster(getPlayerLevel(cid)),config.monsterPos[y][2])
doSendMagicEffect(config.monsterPos[y][2],12)
end
end
return TRUE
end
if getPlayerStorageValue(cid,config.storage) == 1 then
doPlayerSendTextMessage(cid,22,"This's empty.")
return TRUE
end
for i = 1, #config.items do --skrzynki.
if item.uid == config.startUid+i then
setPlayerStorageValue(cid,config.storage,1)
doPlayerAddItem(cid,config.items[i],1)
return TRUE
end
end
return TRUE
end