• 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 a sacrifice table script!

jaroen2

New Member
Joined
Dec 19, 2008
Messages
140
Reaction score
0
Location
The Netherland
okay well this script is probably really easy to make for most of u guys but not for me :blink:

i need a script which makes certain items on a sacrifice table dissappear when u pull the lever. and then when u do that there must be a wall dissapearing aswell which allows players to walk though it and take the reward or something.

i hope someone can make this script for me ^_^

thanx in advance,
Jaroen2
 
PHP:
function onUse(cid,item,frompos,item2,topos)

local sacrificePos	= {x=XXXX, y=XXXX, z=XX, stackpos=1}
local sacrifice		= getThingfromPos(sacrificePos)
local wallPos		= {x=XXXX, y=XXXX, z=XX, stackpos=1}
local wall			= getThingFromPos(WallPos)
local leverPos		= {x=XXXX, y=XXXX, z=XX, stackpos=2}
local lever			= getThingfromPos(leverPos)

	if item.itemid == 1945 then

		if sacrifice.itemid == XXXX then

			doSendMagicEffect(sacrificePos, CONST_ME_HITBYFIRE)
			doRemoveItem(sacrifice.uid, 1)
			doRemoveItem(wall.uid, 1)

		else

			doPlayerSendCancel(cid, "Sorry, not Possible.")
			return 1

		end

	end

end

This should work. Remember to configure all the parts with XXXX to your needs. The script will only work one time per server restart (as in you sacrifice the item, the wall disappears and it won't be back again until the next server restart).

I don't know if you needed the wall to automatically reappear.
 
With timer to create wall, not tested so if any erors post console error:

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

local sacrificePos    = {x=XXXX, y=XXXX, z=XX, stackpos=1}
local sacrifice        = getThingfromPos(sacrificePos)
local wallPos        = {x=XXXX, y=XXXX, z=XX, stackpos=1}
local wall            = getThingFromPos(WallPos)
local leverPos        = {x=XXXX, y=XXXX, z=XX, stackpos=2}
local lever            = getThingfromPos(leverPos)

    if item.itemid == 1945 then

        if sacrifice.itemid == XXXX then

            doSendMagicEffect(sacrificePos, CONST_ME_HITBYFIRE)
            doRemoveItem(sacrifice.uid, 1)
            doRemoveItem(wall.uid, 1)
			addEvent(onTime, 15*60*1000)

        else

            doPlayerSendCancel(cid, "Sorry, not Possible.")
            return 1

        end

    end

end  

function onTime()
local sacrificePos    = {x=XXXX, y=XXXX, z=XX, stackpos=1}
local sacrifice        = getThingfromPos(sacrificePos)
local wallPos        = {x=XXXX, y=XXXX, z=XX, stackpos=1}
local wall            = getThingFromPos(WallPos)
local leverPos        = {x=XXXX, y=XXXX, z=XX, stackpos=2}
local lever            = getThingfromPos(leverPos)
if not(wall.itemid == XXXX) then
doCreateItem(XXXX, 1, wallPos)
end
end
 
With timer to create wall, not tested so if any erors post console error:

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

local sacrificePos    = {x=XXXX, y=XXXX, z=XX, stackpos=1}
local sacrifice        = getThingfromPos(sacrificePos)
local wallPos        = {x=XXXX, y=XXXX, z=XX, stackpos=1}
local wall            = getThingFromPos(WallPos)
local leverPos        = {x=XXXX, y=XXXX, z=XX, stackpos=2}
local lever            = getThingfromPos(leverPos)

    if item.itemid == 1945 then

        if sacrifice.itemid == XXXX then

            doSendMagicEffect(sacrificePos, CONST_ME_HITBYFIRE)
            doRemoveItem(sacrifice.uid, 1)
            doRemoveItem(wall.uid, 1)
			addEvent(onTime, 15*60*1000)

        else

            doPlayerSendCancel(cid, "Sorry, not Possible.")
            return 1

        end

    end

end  

function onTime()
local sacrificePos    = {x=XXXX, y=XXXX, z=XX, stackpos=1}
local sacrifice        = getThingfromPos(sacrificePos)
local wallPos        = {x=XXXX, y=XXXX, z=XX, stackpos=1}
local wall            = getThingFromPos(WallPos)
local leverPos        = {x=XXXX, y=XXXX, z=XX, stackpos=2}
local lever            = getThingfromPos(leverPos)
if not(wall.itemid == XXXX) then
doCreateItem(XXXX, 1, wallPos)
end
end

thnx! but something changed a bit with my idea i now have 4 sacrifice places which each need an item...(like the 10k quest) is it possible to make that for me? :thumbup:
 
thnx! but something changed a bit with my idea i now have 4 sacrifice places which each need an item...(like the 10k quest) is it possible to make that for me? :thumbup:

Just make a copy of that script, something like "sacrifice1.lua", "sacrifice2.lua" and so on, and then simply put in the proper coordinates in each, and fill in the appropriate stuff in actions.xml. Problem solved.
 
Back
Top