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

[Action] Pick, Items, Monsters (Quest)

Knight God

Member
Joined
Oct 19, 2008
Messages
1,180
Reaction score
21
I wonder if I can help create this script, since I have no time, I apologize if it is too complex to create.
The script I think it's action.

Code:
(+) If you have the requirements.
brokentile1.png *here need use a pick here would be activated the script.
coal1.png *in each coal basin will have to put a certain item "xxxx"
tile1.png *here would have to see a monster, for every tile that is in this area.

* the chest with the prize can not open any person, only the character that runs the script.

Code:
Look like this:
secretquest.png


Code:
(-) if you not have the requirements.
* the script will not run if the character is below level 130.
* if there are items in their places are not run the script.

this is possible?
thanks in advance :)
 
Last edited:
Lua:
local targetaid = 999 -- edit for ground action id
local monster = "Demon" --edit for monster you want summoned
local coalitem = 6500 --Enter item for coal basins
local teleport = {x=920, y=1187, z=10} -- edit for teleport location
local teleportto = {x=950, y=1181, z=7} -- edit for teleport destination
local chest = {x=908, y=1190, z=10} -- edit for chest location 
local stor = 8746 -- edit for storage you want set
local chestt = 1749 -- edit for the chest itemid
local ca = 8746 -- edit for chest action id
local stone, stonee = {x=894, y=1186, z=10}, {x=894, y=1187, z=10} -- edit for stone positions 
local stoneid = 1355 -- edit for item id of stone
 
--Edit below for monster spawns
local t = {
 
    {x=899, y=1185, z=10},
    {x=901, y=1183, z=10},
    {x=903, y=1181, z=10},
    {x=905, y=1179, z=10},
    {x=908, y=1181, z=10},
    {x=911, y=1179, z=10},
    {x=913, y=1181, z=10},
    {x=915, y=1183, z=10},
    {x=917, y=1185, z=10},
    {x=917, y=1189, z=10},
    {x=915, y=1191, z=10},
    {x=913, y=1193, z=10},
    {x=911, y=1195, z=10},
    {x=908, y=1192, z=10},
    {x=905, y=1195, z=10},
    {x=903, y=1193, z=10},
    {x=901, y=1191, z=10},
    {x=899, y=1189, z=10},
    {x=905, y=1190, z=10},
    {x=903, y=1187, z=10},
    {x=903, y=1186, z=10},
    {x=905, y=1183, z=10},
    {x=908, y=1181, z=10},
    {x=911, y=1183, z=10},
    {x=913, y=1186, z=10},
    {x=913, y=1187, z=10},
    {x=911, y=1190, z=10},
    {x=907, y=1187, z=10}
}
 
--edit below for item creation positions     
local b = {
    {x=897, y=1185, z=10},
    {x=899, y=1183, z=10},
    {x=901, y=1181, z=10},
    {x=903, y=1179, z=10},
    {x=905, y=1177, z=10},
    {x=908, y=1179, z=10},
    {x=911, y=1177, z=10},
    {x=913, y=1179, z=10},
    {x=915, y=1181, z=10},
    {x=917, y=1183, z=10},
    {x=919, y=1185, z=10},
    {x=919, y=1188, z=10},
    {x=917, y=1190, z=10},
    {x=915, y=1192, z=10},
    {x=913, y=1194, z=10},
    {x=911, y=1196, z=10},
    {x=908, y=1194, z=10},
    {x=905, y=1196, z=10},
    {x=903, y=1194, z=10},
    {x=901, y=1192, z=10},
    {x=899, y=1190, z=10},
    {x=897, y=1188, z=10}
}
 
-- EDIT THIS CODE OF YOUR ROOM WITH DEMONS SET X Y Z OF YOUR RIGHT CORNER AND X Y Z LEFT CORNER
local time = 60000 -- after how many miliseconds room with demons will get clean? 60000 = 60 seconds so 1000 = 1 second
local room = { -- room with demons
    fromX = 1291,
    fromY = 838,
    fromZ = 7,
    toX = 1294,
    toY = 840,
    toZ = 7
}
-- EDIT THIS CODE OF YOUR ROOM WITH DEMONS SET X Y Z OF YOUR RIGHT CORNER AND X Y Z LEFT CORNER
 
local function valiklis()  
	for x = room.fromX, room.toX do
		for y = room.fromY, room.toY do
			for z = room.fromZ, room.toZ do
				local pos = {x=x, y=y, z=z,stackpos = 253}
				local thing = getThingfromPos(pos)
				if thing.itemid > 0 then 
					doRemoveCreature(thing.uid)
				end
			end
		end
	end
end
 
local function deleteStone()
	local getgate = getThingfromPos({x=894, y=1186, z=10, stackpos=1})
	local getgate2 = getThingfromPos({x=894, y=1187, z=10, stackpos=1})
	doRemoveItem(getgate.uid)
	doRemoveItem(getgate2.uid)
end
 
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if getGlobalStorageValue(7476) == -1 then
		if itemEx.actionid == targetaid then
			   setPlayerStorageValue(cid,stor,1)
				for _, v in pairs(t) do
				doCreateMonster(monster, v)
				end
					for z, c in pairs(b) do
					doCreateItem(coalitem,1,c)
					end
						local pumpuras = doCreateItem(chestt, 1, chest)
						doItemSetAttribute(pumpuras,"aid",ca)
						doCreateTeleport(1387, teleportto, teleport)
						doCreateItem(stoneid, 1, stone)
						doCreateItem(stoneid, 1, stonee)
						setGlobalStorageValue(7476, 1)
						addEvent(setGlobalStorageValue, time, 7476, -1)
						addEvent(valiklis, time)
						addEvent(deleteStone, time)
		end
	end
	return true
end

replace your script.
 
Last edited:
AWSOME script =) lol anyways, how could i reconfig it to instead of spawning the demonic essesnces on the coal basins, that the players would have to put the demonic essences there on the coal basins to then use the action id 999 object.....

This is how my version of your script looks like.... NVM I GOT IT WOKING, Here it is, if anyone else wants it also...
Code:
--CRAFTED / CREATED By: Erikas Kontenis
-- EDITED / RESCRIPTED By: Tachi / Gansir


local targetaid = 999 -- edit for ground action id
local monster = "Demon" --edit for monster you want summoned
local coalitem = 6500 --Enter item for coal basins
local teleport = {x=1238, y=1063, z=7} -- edit for teleport location
local teleportto = {x=1305, y=1377, z=6} -- edit for teleport destination
local chest = {x=1229, y=1071, z=7} -- edit for chest location 
local stor = 8746 -- edit for storage you want set
local chestt = 1747 -- edit for the chest itemid
local ca = 8746 -- edit for chest action id
local stone1, stone2, stone3 = {x=1227, y=1058, z=7}, {x=1228, y=1058, z=7}, {x=1229, y=1058, z=7} -- edit for stone positions 
local stoneid = 1354 -- edit for item id of stone
local removePos = {x=1230, y=1056, z=7} ---- pos of the item
 
 
--Edit below for monster spawns
local t = {
 
    {x=1223, y=1060, z=7},
    {x=1226, y=1060, z=7},
    {x=1228, y=1060, z=7},
    {x=1234, y=1060, z=7},
    {x=1231, y=1061, z=7},
    {x=1236, y=1062, z=7},
    {x=1226, y=1062, z=7},
    {x=1223, y=1063, z=7},
    {x=1225, y=1063, z=7},
    {x=1229, y=1063, z=7},
    {x=1233, y=1063, z=7},
    {x=1237, y=1063, z=7},
    {x=1235, y=1065, z=7},
    {x=1227, y=1065, z=7},
    {x=1224, y=1065, z=7},
    {x=1225, y=1067, z=7},
    {x=1229, y=1067, z=7},
    {x=1233, y=1067, z=7},
    {x=1237, y=1067, z=7},
    {x=1236, y=1068, z=7},
    {x=1226, y=1068, z=7},
    {x=1231, y=1069, z=7},
    {x=1234, y=1070, z=7},
    {x=1228, y=1070, z=7}
}
 
-- EDIT THIS CODE OF YOUR ROOM WITH DEMONS SET X Y Z OF YOUR RIGHT CORNER AND X Y Z LEFT CORNER
local time = 60000 -- after how many miliseconds room with demons will get clean? 60000 = 60 seconds so 1000 = 1 second
local room = { -- room with demons
    fromX = 1223,
    fromY = 1059,
    fromZ = 7,
    toX = 1238,
    toY = 1070,
    toZ = 7
}
-- EDIT THIS CODE OF YOUR ROOM WITH DEMONS SET X Y Z OF YOUR RIGHT CORNER AND X Y Z LEFT CORNER
 
local function valiklis()  
    for x = room.fromX, room.toX do
        for y = room.fromY, room.toY do
            for z = room.fromZ, room.toZ do
                local pos = {x=x, y=y, z=z,stackpos = 253}
                local thing = getThingfromPos(pos)
                if thing.itemid > 0 then 
                    doRemoveCreature(thing.uid)
                end
            end
        end
    end
end
 
local function deleteStone()
    local getgate = getThingfromPos({x=1227, y=1058, z=7, stackpos=1})
    local getgate2 = getThingfromPos({x=1228, y=1058, z=7, stackpos=1})
    local getgate3 = getThingfromPos({x=1229, y=1058, z=7, stackpos=1})
    local teleportpos = getThingfromPos({x=1238, y=1063, z=7, stackpos=1})
    local chestpos = getThingfromPos({x=1229, y=1071, z=7, stackpos=1})
    doRemoveItem(getgate.uid)
    doRemoveItem(getgate2.uid)
    doRemoveItem(getgate3.uid)
    doTransformItem(teleportpos.uid, 5069)
    doTransformItem(chestpos.uid, 5068)
end
 
function onUse(cid, item, fromPosition, itemEx, toPosition)
    local removeItem = getThingfromPos({x=1230, y=1056, z=7, stackpos=1})
    if(removeItem.itemid == 2160) then
        doRemoveItem(removeItem.uid, 1)
        if getGlobalStorageValue(7476) == -1 then
            if itemEx.actionid == targetaid then
                setPlayerStorageValue(cid,stor,1)
                
                for _, v in pairs(t) do
                    doCreateMonster(monster, v)
                end
                
                local pumpuras = doCreateItem(chestt, 1, chest)
                doItemSetAttribute(pumpuras,"aid",ca)
                doCreateTeleport(1387, teleportto, teleport)
                doCreateItem(stoneid, 1, stone1)
                doCreateItem(stoneid, 1, stone2)
                doCreateItem(stoneid, 1, stone3)
                setGlobalStorageValue(7476, 1)
                addEvent(setGlobalStorageValue, time, 7476, -1)
                addEvent(valiklis, time)
                addEvent(deleteStone, time)
            end
        end
    else
        doPlayerSendCancel(cid,"Put the right item in the right spot!")
    end
    return true
end
 
Last edited:
Back
Top Bottom