• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

[inq skrypt fail]

stellmach11

New Member
Joined
May 28, 2009
Messages
75
Reaction score
0
Witam mam problem na inq [boosy] wszystko działa ładnie otwiera się sciana ale niestety ona już sie wogole nie zamyka (pojawia) proszę o pomoc!

Skrypt:

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

local switchUniqueID = 12615 -- uniqueID of switch
local switchID = 1945
local switch2ID = 1946
local itemID = 5527
local itempos = {x=1110, y=1240, z=12, stackpos=1}
local wallpos = {x=1112, y=1241, z=12, stackpos=1}

local playername = getPlayerName(cid)
local getitem = getThingfromPos(itempos)
local wallchk = getThingfromPos(wallpos)

if item.uid == switchUniqueID and item.itemid == switchID and getitem.itemid == itemID and wallchk.itemid == 1026 then
doSendMagicEffect(itempos,10)
doSendMagicEffect(wallchk,10)
doRemoveItem(getitem.uid,1)
doRemoveItem(wallchk.uid,1)
doTransformItem(item.uid,item.itemid+1)
addEvent(onTimer5, 2*60*1000)
elseif item.uid == switchUniqueID and item.itemid == switch2ID then
doTransformItem(item.uid,item.itemid-1)
else
doPlayerSendCancel(cid,"You need to place the corpse of the slain Madareth.")
end
return 1
end


function onTimer5()

wallnewpos = {x=1112, y=1241, z=12}
doCreateItem(1026,1,wallnewpos)
end
 
Lepiej użyj skryptu KILL BOSS => CREATE TELEPORT => XX SECONDS => TELEPORT ZNIKA .

LUA:
  local bosses =   
                                -- Teleport Takes Player -- Teleport Is Created -- Teleport Actionid --
    {["Ushuriel"] = {x=1345, y=390, z=13}, {x=1398, y=522, z=11}, 7941,
    ["Zugurosh"] = {x=1345, y=390, z=13}, {x=1432, y=521, z=11}, 7942,
    ["Madareth"] = {x=1345, y=390, z=13}, {x=1395, y=548, z=11}, 7943,
    ["Latrivan"] = {x=1345, y=390, z=13}, {x=1430, y=522, z=11}, 7944,
    ["Annihilon"] = {x=1345, y=390, z=13}, {x=1470, y=506, z=11}, 7945,
    ["Hellgorak"] = {x=1310, y=560, z=12}, {x=1475, y=548, z=11}, 7946}

local time = 180 -- Seconds
function onKill(cid, target, lastHit)
        for name, pos in pairs(bosses) do
                if (name == getCreatureName(target):lower()) then
                                                minutes = time:60
                        doCreateTeleport(5023, pos[1], pos[2])
                                                doSendMagicEffect(pos[2], CONST_ME_MAGIC_BLUE)
                                                doItemSetAttribute(getTileItemById(pos[2], 5023).uid, "aid", pos[3])
                        doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'You have '.. minutes ..' seconds until the portal will disapear.')
                        addEvent(doRemoveItem, tpTime * 1000, getTileItemById(pos[2], 5023).uid, 1)
                end
        end
    return true
end
 
Lepiej użyj skryptu KILL BOSS => CREATE TELEPORT => XX SECONDS => TELEPORT ZNIKA .

LUA:
  local bosses =   
                                -- Teleport Takes Player -- Teleport Is Created -- Teleport Actionid --
    {["Ushuriel"] = {x=1345, y=390, z=13}, {x=1398, y=522, z=11}, 7941,
    ["Zugurosh"] = {x=1345, y=390, z=13}, {x=1432, y=521, z=11}, 7942,
    ["Madareth"] = {x=1345, y=390, z=13}, {x=1395, y=548, z=11}, 7943,
    ["Latrivan"] = {x=1345, y=390, z=13}, {x=1430, y=522, z=11}, 7944,
    ["Annihilon"] = {x=1345, y=390, z=13}, {x=1470, y=506, z=11}, 7945,
    ["Hellgorak"] = {x=1310, y=560, z=12}, {x=1475, y=548, z=11}, 7946}

local time = 180 -- Seconds
function onKill(cid, target, lastHit)
        for name, pos in pairs(bosses) do
                if (name == getCreatureName(target):lower()) then
                                                minutes = time:60
                        doCreateTeleport(5023, pos[1], pos[2])
                                                doSendMagicEffect(pos[2], CONST_ME_MAGIC_BLUE)
                                                doItemSetAttribute(getTileItemById(pos[2], 5023).uid, "aid", pos[3])
                        doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'You have '.. minutes ..' seconds until the portal will disapear.')
                        addEvent(doRemoveItem, tpTime * 1000, getTileItemById(pos[2], 5023).uid, 1)
                end
        end
    return true
end

czlowieku, uzywajac tych keyow dla tablicy to: if (name == getCreatureName(target):lower()) then nigdy nie pusci skryptu dalej =/=/=/=/=/=/=//////////=////////// ;[
 
Back
Top