• 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:
Im gonna have to agree with Evan on this, i can somewhat understand what you want, but not completely.
 
Last edited:
i sorry for my bad english, only using basic english learned in school.

well,i need a script if u using pick in the crack medium
the script summon monsters in all orange tiles, and create two stones in exit, teleport to exit and a chest with items, only the player who used the pick on the crack may open the chest.

excuse my english.

PD: if is possible, also to have some time exauste and the same player no longer be activated.
 
Sorry bro ive been really busy with my birthday going on and shit. I will make it when i have free time if nobody has yet
 
i wait for more help man np :)

script:
PHP:
local targetaid = 999 -- edit for ground action id
local monster = "Demon" --edit for monster you want summoned
local item = 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 = 1000 -- edit for storage you want set
local chestt = 2522 -- edit for the chest itemid
local ca = 1000 -- 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}
      }
 
function onUse(cid, item, fromPosition, itemEx, toPosition)
         if itemEx.actionid == targetaid then
         setPlayerStorageValue(cid,stor,1)
         doCreateMonster(monster, t)
         doCreateItem(item,1,b)
         doItemSetAttribute(doCreateItem(cid, chestt, 1), 'aid', ca)
         doCreateTeleport(1387, teleportto, teleport)
         doCreateItem(stoneid, 1, stone)
         doCreateItem(stoneid, 1, stonee)
end
return true
end

error:
errorb1.png
 
Here you are, just replace your posted code to this one. I did not changed any positions it will perfectly fit to you.


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 = 1000 -- edit for storage you want set
local chestt = 2522 -- edit for the chest itemid
local ca = 1000 -- 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}
}
 
function onUse(cid, item, fromPosition, itemEx, toPosition)
	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)
		end
		return true
end
 
Last edited:
the script runs.
+. demons are created.
+. the teleports appear.
+. stones also appear.

-. the box does not appear within the item, the item appears lying on the floor, I mean anyone can pick up.

-. if you do not put the items of sacrifice the script works just.

*. I need you all things, the chest, the teleport, stone and demons have a time and then to disappear.

*. That only the character that executed the script can open the chest.

need help
and
thanks for the help
 
the script runs.
+. demons are created.
+. the teleports appear.
+. stones also appear.

-. the box does not appear within the item, the item appears lying on the floor, I mean anyone can pick up.

-. if you do not put the items of sacrifice the script works just.

*. I need you all things, the chest, the teleport, stone and demons have a time and then to disappear.

*. That only the character that executed the script can open the chest.

need help
and
thanks for the help

You really dont understand anything in scripting and ots stuff however if I started I will end it...

change your old script to this one:

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
 
function onUse(cid, item, fromPosition, itemEx, toPosition)
	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)
					addEvent(valiklis, time)
		end
		return true
end

but dont forget to edit this config of your room positions

Code:
-- EDIT THIS CODE OF YOUR ROOM WITH DEMONS SET X Y Z OF YOUR RIGHT CORNER AND X Y Z LEFT CORNER
local time = 60 -- after how many seconds room with demons will get clean?
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

Add in actions.xml this line:

Code:
<action actionid="8746" script="ba.lua"/>

create in action scripts folder file named ba.lua and in that file write this code.

Lua:
local itemid = 2522

function onUse(cid, item, fromPosition, itemEx, toPosition)
	if getPlayerStorageValue(cid, 8746) == 1 and getPlayerStorageValue(cid, 8747) == -1 then
		doPlayerAddItem(cid, itemid, 1)
		doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have found ".. getItemNameById(itemid) ..".")
		setPlayerStorageValue(cid,8747,1)
			else
		doPlayerSendCancel(cid, "Chest is empty.")
		end
	return true
end
 
Last edited:
rlly nice for you rep+++
:)

*. need function to disappear teleports and stones
*. and the demonic essence not disappear when I use the pick in the crack.

:S
can help me?
 
Last edited by a moderator:
replace old code to this. I dont understand what you mean with demonic essence...

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 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)
					addEvent(valiklis, time)
					addEvent(deleteStone, time)
		end
		return true
end

However my job done here.
 
thank you very much.
Well, the demonic essence need to remove when I use the pick in the crack if i have all items in correct positions, but also to send a message cancel, when you do not have all the items in the correct positions and the script will not run.
 
Back
Top