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

Need help with my quest.

alekito

Archlord - Retired
Joined
Oct 21, 2008
Messages
150
Reaction score
29
Location
Sweden
Trying to do an quest that when you click an specifik "lever" you spawn 1 monster in the middle and 4 monsters in each corner.. when the 4 monsters are dead a stone gets removed located 4 steps south of where the monster in the middle was, and an tp is created..and if the 1 monster in the middle dies before the other 4, you get tped to a place starting over.

Rep+ for help.



P.S if you dont understand il try to explain what my quest is... im trying to make an part 1/5 quest where this is the first part called "restoration"... the 4 monsters will attack with ue at you/team. while you're standing beside the monster in the middle .. so in order to pass the quest you have to heal the monster in the middle preventing it from dying while killing the other 4 monsters.

This is what i got so far
function onUse(cid, item, fromPosition, itemEx, toPosition)

local name = 'Frozen Demon'
local named = 'Ninja Rabbit'
local pos7 = {x = 1339, y = 1021, z = 7}
local pos = {x = 1343, y = 1024, z = 7}
local pos1 = {x = 1343, y = 1019, z = 7}
local pos9 = {x = 1335, y = 1024, z = 7}
local pos8 = {x = 1335, y = 1019, z = 7}


if item.itemid == 1945 then
doPlayerSendTextMessage(cid,21,"It works !")
doTransformItem(item.uid, item.itemid + 1)
doCreateMonster(name, pos)
doCreateMonster(name, pos1)
doCreateMonster(name, pos8)
doCreateMonster(name, pos9)
doCreateMonster(named, pos7)
elseif item.itemid == 1946 then
doPlayerSendTextMessage(cid,21,"You pulled it back!")
doTransformItem(item.uid, item.itemid - 1)
end
return TRUE
end -- Every Function has to have an own "end" too.
 
Last edited:
well my problem is that im not sure how to add so when the 4 frozen demons are dead an stone gets removed from x.1343.y.1029.z.7.
 
that would work to.. if you could make me one...
To be honest i haven scripted in like 1 year so trying to learn everything again :p

but i do prefer the stone kind of got some great ideas using this type of quest.
 
Last edited:
Just make a spell that checks the area for the 4 monsters:

like:
Lua:
local specs = getSpectators(getCreaturePosition(cid), 7, 7, 0)
local tmp = 0
for _, tid in ipairs(specs) do
   if isMonster(tid) and getCreatureName(tid) == "UE Monster" then
       tmp = tmp + 1
   end
end
if tmp > 0 then
  local rock = getTileItemById(rockpos, rockitemid)
  if rock.itemid == rockitemid then
      doRemoveitem(rock.uid)
  end
end
Then add that spell to the monster you have to heal, and give it an interval of like 5 seconds.
Problem solved :)
 
dont really get it ... you're saying i gonna make my monster in the middle use that spell right? So he can remove the stone when all 4 monsters are dead... But where do i put the rockid/uid. Do i need to make an new local?

Like this?
local specs = getSpectators(getCreaturePosition(cid), 7, 7, 0)
local rockpos = {x = 1339, y = 1021, z = 7}
local rockitemid = xxxx
local tmp = 0
for _, tid in ipairs(specs) do
if isMonster(tid) and getCreatureName(tid) == "Frozen Demon" then
tmp = tmp + 1
end
end
if tmp > 0 then
local rock = getTileItemById(rockpos, rockitemid)
if rock.itemid == rockitemid then
doRemoveitem(rock.uid)
end
end



----------------------------------------------------------------------------------------------------------------------------------------------------------
Not even working.



- - - Updated - - -

Bump
 
Last edited:
Back
Top