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

Dalale

GX
Joined
Jun 13, 2008
Messages
718
Reaction score
2
Location
Sweden
Hello wondring if somone could help me with this action script.
It worked well with 8.31 but now with 8.4 it aint working

IM USING TFS 0.2


This script is working like this
if you have ferumbras hat (5903)
you put it on the coal basin, then when you click on the angel
( 1060 ) you will be tpd to

ntp1pos = {x=1006, y=571, z=6, stackpos=1}







Code:
function onUse(cid, item, frompos, item2, topos)
 
	sacr1pos = {x=818, y=707, z=7, stackpos=1}
	player1pos = {x=819, y=708, z=7, stackpos=1}
		
	sacr1 = getThingfromPos(sacr1pos)
	player1 = getThingfromPos(player1pos)
if item.uid == 1060 then
	if sacr1.itemid == 5903 then

 	ntp1pos = {x=1006, y=571, z=6, stackpos=1}
			
			doTeleportThing(player1.uid,ntp1pos)
			doSendMagicEffect(sacr1pos,CONST_ME_HITBYFIRE)
			doTransformItem(sacr1.uid,8820)
			doTargetCombatHealth(0, cid, COMBAT_FIREDAMAGE, -600, -700, CONST_ME_FIRE)
			doCreatureSay(cid, "Your can feel the ferumbras power flushing through your blood!", TALKTYPE_ORANGE_1)
 
else
			doCreatureSay(cid, "Not enough power to active the portal!", TALKTYPE_ORANGE_1)
			doSendMagicEffect(sacr1pos,CONST_ME_HITBYFIRE)
		end
	end
end

/dALALE
 
Code:
local playerPosition =
{
	{x = 819, y = 708, z = 7, stackpos = STACKPOS_TOP_CREATURE}
}

local newPosition =
{
	{x = 1006, y = 571, z = 6}
}	

local sacrPosition =
{
	{x = 818, y = 707, z = 7, stackpos = STACKPOS_TOP_CREATURE}
}

-- Do not modify the declaration lines below.
local player = {}
local failed = TRUE

function onUse(cid, item, fromPosition, itemEx, toPosition)
 
if item.uid == 1060 and sacr.itemid == 5903 then

for i = 1, #player do
			player[i] = getThingfromPos(playerPosition[i])
			failed = FALSE
						end
					end
	
	if failed == TRUE then
				doCreatureSay(cid, "Not enough power to active the portal!", TALKTYPE_ORANGE_1)
			doSendMagicEffect(sacr1pos,CONST_ME_HITBYFIRE)
				return TRUE
			end

			failed = TRUE
		end

		for i = 1, #player do
			doSendMagicEffect(playerPosition[i], CONST_ME_POFF)
			doTeleportThing(player[i].uid, newPosition[i], FALSE)
			doSendMagicEffect(newPosition[i], CONST_ME_ENERGYAREA)
			doSendMagicEffect(sacr1pos,CONST_ME_HITBYFIRE)
			doTransformItem(sacr1.uid,8820)
			doTargetCombatHealth(0, cid, COMBAT_FIREDAMAGE, -600, -700, CONST_ME_FIRE)
			doCreatureSay(cid, "Your can feel the ferumbras power flushing through your blood!", TALKTYPE_ORANGE_1)
		end
			
		return TRUE
end
I don't check it
 
Code:
local playerPosition =
{
	{x = 819, y = 708, z = 7, stackpos = STACKPOS_TOP_CREATURE}
}

local newPosition =
{
	{x = 1006, y = 571, z = 6}
}	

local sacrPosition =
{
	{x = 818, y = 707, z = 7, stackpos = STACKPOS_TOP_CREATURE}
}

-- Do not modify the declaration lines below.
local player = {}
local failed = TRUE

function onUse(cid, item, fromPosition, itemEx, toPosition)
 
if item.uid == 1060 and sacr.itemid == 5903 then

for i = 1, #player do
			player[i] = getThingfromPos(playerPosition[i])
			failed = FALSE
						end
					end
	
	if failed == TRUE then
				doCreatureSay(cid, "Not enough power to active the portal!", TALKTYPE_ORANGE_1)
			doSendMagicEffect(sacr1pos,CONST_ME_HITBYFIRE)
				return TRUE
			end

			failed = TRUE
		end

		for i = 1, #player do
			doSendMagicEffect(playerPosition[i], CONST_ME_POFF)
			doTeleportThing(player[i].uid, newPosition[i], FALSE)
			doSendMagicEffect(newPosition[i], CONST_ME_ENERGYAREA)
			doSendMagicEffect(sacr1pos,CONST_ME_HITBYFIRE)
			doTransformItem(sacr1.uid,8820)
			doTargetCombatHealth(0, cid, COMBAT_FIREDAMAGE, -600, -700, CONST_ME_FIRE)
			doCreatureSay(cid, "Your can feel the ferumbras power flushing through your blood!", TALKTYPE_ORANGE_1)
		end
			
		return TRUE
end
I don't check it

thanks gonna test it :)

EDIT : It didnt work:/ It said "You cannot use this object"
On the Angel (1060)

Btw This is the errors on the Server Gui :

[05/02/2009 20:38:25] Warning: [Event::loadScript] Can not load script. data/actions/scripts/tools/sacrifice enter.lua
[05/02/2009 20:38:25] data/actions/scripts/tools/sacrifice enter.lua:50: '<eof>' expected near 'end'
 
Last edited:
Code:
function onUse(cid, item, frompos, item2, topos)

sacr1pos = {x = 1040, y = 1027, z = 7, stackpos=1}
getsacr1 = getThingfromPos(sacr1pos)
player1pos = {x = 1039, y = 1027, z = 7, stackpos=1}
	player1 = getThingfromPos(player1pos)

ntp1pos = {x = 1039, y = 1028, z = 7, stackpos=1}


if item.uid == 1060 and getsacr1.itemid == 5903 then
 doTeleportThing(player1.uid,ntp1pos)
			doSendMagicEffect(sacr1pos, CONST_ME_HITBYFIRE)
			doTransformItem(sacr1.uid, 8820)
			doTargetCombatHealth(0, cid, COMBAT_FIREDAMAGE, -600, -700, CONST_ME_FIRE)
			doCreatureSay(cid, "Your can feel the ferumbras power flushing through your blood!", TALKTYPE_ORANGE_1)

 else
doPlayerSendTextMessage(cid,22,"You have to put the Pieces on the right Place ;)")
			doSendMagicEffect(sacr1pos, CONST_ME_HITBYFIRE)

end
return 1
end
 
Back
Top