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

Mortal Kombat Quest

bolero

MikeHere
Joined
Apr 13, 2009
Messages
1,146
Reaction score
12
Location
Venezuela
Can post here Mortal Kombat quest for tibia rl? I only want the actions script, I have the movement script.
 
I have one script, but when the player finish the quest he are doesn't teleported to final room for search the reward... Here the script..

local t, player = {
pedestals = {
{x=33080, y=31014, z=2},
{x=33081, y=31014, z=2}
},
newPos = {
{x=33059, y=31032, z=3},
{x=33057, y=31034, z=3}
},
area = {
fromX = 33054, toX = 33073,
fromY = 31026, toY = 32356,
z = 3
},
storageDone = 4767,
level = 80
}, {0, 0}

function getCreaturesInRange(position, radiusx, radiusy, showMonsters, showPlayers, showSummons)
local creaturesList = {}
for x = -radiusx, radiusx do
for y = -radiusy, radiusy do
if not (x == 0 and y == 0) then
creature = getTopCreature({x = position.x+x, y = position.y+y, z = position.z, stackpos = 253})
if (creature.type == 1 and showPlayers == TRUE) or (creature.type == 2 and showMonsters == TRUE and (showSummons == FALSE or (showSummons == TRUE and getCreatureMaster(creature.uid) == (creature.uid)))) then
table.insert(creaturesList, creature.uid)
end
end
end
end

local creature = getTopCreature(position)
if (creature.type == 1 and showPlayers == TRUE) or (creature.type == 2 and showMonsters == TRUE and (showSummons == FALSE or (showSummons == TRUE and getCreatureMaster(creature.uid) == (creature.uid)))) then
if not(table.find(creaturesList, creature.uid)) then
table.insert(creaturesList, creature.uid)
end
end
return creaturesList
end

function Wave1()
doSendMagicEffect(getCreaturePosition(doCreateMonster('Baron Brute', {x = 33064, y = 31033, z = 3})), CONST_ME_TELEPORT)
doSendMagicEffect(getCreaturePosition(doCreateMonster('The Axeorcist', {x = 33065, y = 31034, z = 3})), CONST_ME_TELEPORT)
addEvent(Wave2, 30 * 1000)
end

function Wave2()
doSendMagicEffect(getCreaturePosition(doCreateMonster('Menace', {x = 33064, y = 31033, z = 3})), CONST_ME_TELEPORT)
doSendMagicEffect(getCreaturePosition(doCreateMonster('Fatality', {x = 33065, y = 31034, z = 3})), CONST_ME_TELEPORT)
addEvent(Wave3, 35 * 1000)
end

function Wave3()
doSendMagicEffect(getCreaturePosition(doCreateMonster('Incineron', {x = 33064, y = 31033, z = 3})), CONST_ME_TELEPORT)
doSendMagicEffect(getCreaturePosition(doCreateMonster('Coldheart', {x = 33065, y = 31034, z = 3})), CONST_ME_TELEPORT)
addEvent(Wave4, 40 * 1000)
end

function Wave4()
doSendMagicEffect(getCreaturePosition(doCreateMonster('Dreadwing', {x = 33064, y = 31033, z = 3})), CONST_ME_TELEPORT)
doSendMagicEffect(getCreaturePosition(doCreateMonster('Doomhowl', {x = 33065, y = 31034, z = 3})), CONST_ME_TELEPORT)
addEvent(Wave5, 40 * 1000)
end

function Wave5()
doSendMagicEffect(getCreaturePosition(doCreateMonster('Haunter', {x = 33064, y = 31033, z = 3})), CONST_ME_TELEPORT)
addEvent(Wave6, 40 * 1000)
end

function Wave6()
doSendMagicEffect(getCreaturePosition(doCreateMonster('The Dreadorian', {x = 33064, y = 31033, z = 3})), CONST_ME_TELEPORT)
doSendMagicEffect(getCreaturePosition(doCreateMonster('Rocko', {x = 33065, y = 31034, z = 3})), CONST_ME_TELEPORT)
doSendMagicEffect(getCreaturePosition(doCreateMonster('Tremorak', {x = 33064, y = 31032, z = 3})), CONST_ME_TELEPORT)
addEvent(Wave7, 40 * 1000)
end

function Wave7()
doSendMagicEffect(getCreaturePosition(doCreateMonster('Tirecz', {x = 33065, y = 31034, z = 3})), CONST_ME_TELEPORT)
end

function onUse(cid, item, fromPosition, itemEx, toPosition)
local failed = false
for i = 1, #t.pedestals do
player = getTopCreature(t.pedestals).uid
if(not(player > 0 and isPlayer(player) == TRUE and getPlayerStorageValue(player, t.storageDone) < 1 and getPlayerLevel(player) >= t.level)) then
failed = true
break
end
end
if not failed then
if #getCreaturesInRange({x=33063, y=31035,z=3}, 10, 9, FALSE, TRUE) > 0 then
doPlayerSendTextMessage(cid,25, "Some people are already in the arena.")
return true
end
for i = 1, #player do
doTeleportThing(player, t.newPos)
end
Wave1()
doTransformItem(item.uid, 1946)
else
doPlayerSendDefaultCancel(cid, RETURNVALUE_CANNOTUSETHISOBJECT)
end
return true
end
 
Zao Arena
Lever in Zao to get into Arena

PHP:
local t = {
    [4830] = {{x=380,y=746,z=1}, {x=380,y=746,z=4}},
    [4831] = {{x=380,y=746,z=4}, {x=380,y=746,z=1}},
    [4832] = {{x=382,y=754,z=4}, {x=450,y=734,z=10}},
    [4833] = {{x=450,y=734,z=10}, {x=382,y=754,z=4}}
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
    if item.itemid == 1945 then
        local i = t[item.actionid]
        local v = getTopCreature(i[1]).uid
        if isPlayer(v) then
            doTeleportThing(v, i[2])
            doSendMagicEffect(i[1], CONST_ME_TELEPORT)
            doSendMagicEffect(i[2], CONST_ME_TELEPORT)
            doTransformItem(item.uid, 1946)
        else
            return doPlayerSendCancel(cid, 'Sorry, not possible.')
        end
    else
        return doTransformItem(item.uid, 1945)
    end
end

This is the Leverscript

PHP:
function onUse(cid, item, fromPosition, itemEx, toPosition)

  if item.itemid == 1946 then
    return doTransformItem(item.uid, item.itemid - 1)
    elseif(item.actionid == 23232) and item.itemid == 1945 then
      doTeleportThing(getTopCreature({x=467,y=287,z=13}).uid, {x=471,y=317,z=2})
    elseif (item.actionid == 23233) and item.itemid == 1945 then
        doTeleportThing(getTopCreature({x=471,y=317,z=2}).uid, {x=467,y=287,z=13})
    end
      doTransformItem(item.uid, item.itemid + 1)
    return true
end

PHP:
function onUse(cid, item, frompos, item2, topos)
if item.uid == 32145 then
if item.itemid == 1946 then

player1pos = {x=480, y=226, z=2, stackpos=253}
player1 = getThingfromPos(player1pos)

player2pos = {x=481, y=226, z=2, stackpos=253}
player2 = getThingfromPos(player2pos)


  if player1.itemid > 0 and player2.itemid > 0 then

  player1level = getPlayerLevel(player1.uid)
  player2level = getPlayerLevel(player2.uid)


  questlevel = 100

  if player1level >= questlevel then

      queststatus1 = getPlayerStorageValue(player1.uid,6300)
      queststatus2 = getPlayerStorageValue(player2.uid,6300)
   

      if queststatus1 == -1 and queststatus2 == -1 then

    if 1==1 then
    demon1pos = {x=463, y=246, z=3}
        demon2pos = {x=464, y=246, z=3}
 
  doSummonCreature("Baron Brute", demon1pos)
  doSummonCreature("Tirecz", demon2pos)


    nplayer1pos = {x=455, y=246, z=3}
    nplayer2pos = {x=455, y=248, z=3}
 

  doSendMagicEffect(player1pos,2)
  doSendMagicEffect(player2pos,2)


  doTeleportThing(player1.uid,nplayer1pos)
  doTeleportThing(player2.uid,nplayer2pos)


    doSendMagicEffect(nplayer1pos,10)
    doSendMagicEffect(nplayer2pos,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.uid == 32145 then
if item.itemid == 1945 then
doTransformItem(item.uid,1946)




end
end
return 1
end
end
end

This is inside Actions.xml

Code:
        <action uniqueid="4767" event="script" value="Zao/addon.lua"/>
        <action actionid="4830" event="script" value="Zao/zaolever.lua"/>
        <action actionid="4831" event="script" value="Zao/zaolever.lua"/>
        <action actionid="4832" event="script" value="Zao/zaolever.lua"/>
        <action actionid="4833" event="script" value="Zao/zaolever.lua"/>
        <action uniqueid="32145" event="script" value="zao/zao_arena.lua"/>
        <action fromaid="23232" toaid="23233" event="script" value="leverscript.lua"/>

Must change your X - Y -Z coords.
 
thanks it works on tfs 1.0? i'm fixing scripts and i have all tnf same as real only missing arena scripts =/

but this script is a shit doesn't do nothing!
 
Last edited:
Back
Top