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

MoveEvent Inq portals(with orange text, storages to use main room and creating boss portals)

second version?
I'll check it one more time
If its second version that means you have other id of portal or you put wrong position.
Updated a bit script, fixed POSSIBLE problems, now it works 100%
 
Last edited:
btw I'm using 3.6 pl1
how can i add that "creature delay" thingy?
 
I'm gettin this error...

Code:
[Error - CreatureScript Interface]
data/creaturescripts/scripts/InquisitionBosses.lua:onKill
Description:
(luaDoCreateItem) Tile not found

[Error - CreatureScript Interface]
data/creaturescripts/scripts/InquisitionBosses.lua:onKill
Description:
(luaDoItemSetAttribute) Item not found

[Error - CreatureScript Interface]
In a timer event called from:
data/creaturescripts/scripts/InquisitionBosses.lua:onKill
Description:
(luaDoRemoveItem) Item not found

Using TFS 0.3.6 ... any suggestions?
 
Error: (luaDoItemSetAttribute) Item not found

Now using second script...Look:
Code:
<!--InquisitionBosses.lua -->
local config = {
        timeToRemove = 60, -- seconds
		message = "Go into the teleport in 60 seconds, else it will disappear.",
        teleportId = 1387,
        bosses = { -- Monster Name,  Teleport Position
                ["Ushuriel"] = {  pos={ x=1717, y=1255, z=13, stackpos=2 }, aid=7001},
				["Zugurosh"] = {  pos={ x=1683, y=1220, z=8, stackpos=2 }, aid=7002},
				["Madareth"] = {  pos={ x=1758, y=1295, z=8, stackpos=2 }, aid=7003},
                ["Annihilon"] = {  pos={ x=1757, y=1230, z=8, stackpos=2 }, aid=7005},
                ["Hellgorak"] = {  pos={ x=1665, y=1262, z=8, stackpos=2 }, aid=7006}
				},
		brothers ={
        ["Golgordan"] = {pos={ x=1791, y=1261, z=8, stackpos=1 },aid=7004, brother = "Latrivan"},
        ["Latrivan"] = {pos={ x=1791, y=1261, z=8, stackpos=1 },aid=7004, brother = "Golgordan"},
        brothersArea ={
                fromPos = {x = 1784, y = 1250, z = 8},
                toPos = {x = 1800, y = 1261, z = 8}	}	}
}
local function change(position)
	doItemSetAttribute(getTileItemById(position, config.teleportId).uid, "aid", 7200)
    return TRUE
end

function onKill(cid, target, lastHit)
    if(config.bosses[getCreatureName(target)]) then
		local t = config.bosses[getCreatureName(target)]
		local position = t.pos
		doItemSetAttribute(getTileItemById(position, config.teleportId).uid, "aid", t.aid)
        doCreatureSay(cid, config.message, TALKTYPE_ORANGE_1)
		addEvent(change, config.timeToRemove * 1000, position)
	elseif(config.brothers[getCreatureName(target)]) then
		local t = config.brothers[getCreatureName(target)]
        local brother = getCreatureByName(t.brother)
		if(isMonster(brother) == true) then
            if(isInRange(getCreaturePosition(brother), config.brothers.brothersArea.fromPos, config.brothers.brothersArea.toPos) == true) then
                return TRUE
			end
        else
			local position = t.pos
			doItemSetAttribute(getTileItemById(position, config.teleportId).uid, "aid", t.aid)
			doItemSetAttribute(teleport, "aid", t.aid)
			doCreatureSay(cid, config.message, TALKTYPE_ORANGE_1)
			addEvent(removal, config.timeToRemove * 1000, position)
		end
	end
	return TRUE
end

this is in creaturescripts.xml:
Code:
<event type="kill" name="InquisitionBosses" event="script" value="InquisitionBosses.lua"/>

and in login.lua:
Code:
registerCreatureEvent(cid, "InquisitionBosses")

this is in movements:
Code:
local config = {
	bosses={---aid of portal, position where it sends, value it sets, text it shows
		[7001] = {pos={x=1617, y=1495, z=13, stackpos=1}, value=1, text="Entering The Crystal Caves"},
		[7002] = {pos={x=1686, y=1366, z=12, stackpos=1}, value=2, text="Entering The Blood Halls"},
		[7003] = {pos={x=1423, y=1293, z=10, stackpos=1}, value=3, text="Entering The Vats"},
		[7004] = {pos={x=1386, y=1381, z=9, stackpos=1}, value=4, text="Entering The Arcanum"},
		[7005] = {pos={x=1750, y=1405, z==12, stackpos=1}, value=5, text="Entering The Hive"},
		[7006] = {pos={x=1678, y=1391, z=8, stackpos=1}, value=6, text="Entering The Shadow Nexus"}
		},
	mainroom={---aid, position, lowest value that can use this portal, text
		[7101] = {pos={x=1617, y=1495, z=13, stackpos=1}, value=1, text="Entering The Crystal Caves"},
		[7102] = {pos={x=1686, y=1366, z=12, stackpos=1}, value=2, text="Entering The Blood Halls"},
		[7103] = {pos={x=1423, y=1293, z=10, stackpos=1}, value=3, text="Entering The Vats"},
		[7104] = {pos={x=1386, y=1381, z=9, stackpos=1}, value=4, text="Entering The Arcanum"},
		[7105] = {pos={x=1750, y=1405, z=12, stackpos=1}, value=5, text="Entering The Hive"}	
		},
	portals={---aid, position, text
		[7200] = {pos={x=1715, y=1427, z=14}, text="Escaping to the Retreat..."},
		[7201] = {pos={x=1717, y=1256, z=8}, text="Entering Ushuriel's Ward"},
		[7202] = {pos={x=1717, y=1467, z=13}, text="Entering The Sunken Cave"},
		[7203] = {pos={x=1683, y=1220, z=8}, text="Entering The Ward of Zugurosh"},
		[7204] = {pos={x=1671, y=1341, z=9}, text="Entering The Foundry"},
		[7205] = {pos={x=1758, y=1295, z=8}, text="Entering The Ward of Madareth"},
		[7206] = {pos={x=1565, y=1384, z=11}, text="Entering The Battlefield"},
		[7207] = {pos={x=1791, y=1261, z=8}, text="Entering The Ward of The Demon Twins"},
		[7208] = {pos={x=1581, y=1235, z=9}, text="Entering The Soul Wells"},
		[7209] = {pos={x=1757, y=1230, z=8}, text="Entering The Ward of Annihilon"},
		[7210] = {pos={x=1665, y=1262, z=8}, text="Entering Hellgorak's Ward"}	
		},
	storage=77077,---storage used in boss and mainroom portals
	walkback="You don't have enough energy to enter this portal",---message if you cannot use mainroom portal
	e={}	}----dunno whats this but have to be like this to make doCreatureSayWithDelay working, DON'T TOUCH}
function onStepIn(cid, item, position, fromPosition)
	if isPlayer(cid) == TRUE then
		if(config.bosses[item.actionid]) then
			local t= config.bosses[item.actionid]
			if getPlayerStorageValue(cid, config.storage)< t.value then
				setPlayerStorageValue(cid, config.storage, t.value)
			end
			doTeleportThing(cid, t.pos)
			doCreatureSayWithDelay(cid,t.text,19,1, config.e)
		elseif(config.mainroom[item.actionid]) then
			local t= config.mainroom[item.actionid]
			if getPlayerStorageValue(cid, config.storage)>=t.value then
				doTeleportThing(cid, t.pos)
				doCreatureSayWithDelay(cid,t.text,19,1,config.e)
			else
				doTeleportThing(cid, fromPosition)
				doCreatureSay(cid, config.walkback, 19)
			end
		elseif(config.portals[item.actionid]) then
			local t= config.portals[item.actionid]
			doTeleportThing(cid, t.pos)
			doCreatureSayWithDelay(cid,t.text,19,1,config.e)
		end
	end
end

and put in movements.xml:
Code:
<!--INQ -->
<movevent type="StepIn" itemid="1387" event="script" value="Inquisition.lua"/>
(changed citizen.lua to itemid 9773 since all my tps in quest are already 1387 :confused:)

you can see i've already edited parts of the script to my likings. what else must i change?

does it make a difference if i changed the tp itemid?

thx...rep++++++ once i get it all working :blink:
 
if you changed tpid in every place wheere it appears in BOTH scripts its ok,
are you sure that you put good positions in script?(remember: in second version its position of portal EXISTING on map in boss room, and that tp have to be the same id as in scripts
and one more thing: if you have just downloaded inq map, in some places there are 2 tps on one tile :D
 
THANKS FOR HELPING!! CHANGED POSITIONS IN INQUISITIONBOSSES.LUA TO BOSSROOM TP POSITIONS!!

rep+++ for sure :D

thx again man...!!!
 
just use second creaturescript and in positions put position of existing portal in boss rooms
ofc portal have to be the same id as in script
 
zakius if u can upload map inq with all teleports aid,position and i copy only script and it work, because im not good scripter and idk how to make it :p
 
I dont have clean map and my pc is too weak to cut it from my map...
Just change all portals to 9773 and give them aid
in main room 2000+number
in seals 3000+number(just go the same way you go making quest and all numbers will be ok)
and portals sending back to main room aid 3000
 
It is great. We can edit it, and use with other teleports. Thanks alot.

Yours,
Harond.
 
I have problem

35bft6u.jpg



and mine script

local config = {
bosses={---aid of portal, position where it sends, value it sets, text it shows
[1001] = {pos={x=32881, y=31270, z=11, stackpos=1}, value=1, text="Entering The Crystal Caves"},
[1002] = {pos={x=32837, y=21283, z=11, stackpos=1}, value=2, text="Entering The Blood Halls"},
[1003] = {pos={x=32753, y=31338, z=12, stackpos=1}, value=3, text="Entering The Vats"},
[1004] = {pos={x=32860, y=31328, z=12, stackpos=1}, value=4, text="Entering The Arcanum"},
[1005] = {pos={x=32954, y=31429, z=11, stackpos=1}, value=5, text="Entering The Hive"} },
[1006] = {pos={x=32772, y=31441, z=12, stackpos=1}, value=6, text="Entering The Shadow Nexus"}
},
mainroom={---aid, position, lowest value that can use this portal, text
[2001] = {pos={x=32881, y=31270, z=11, stackpos=1}, value=1, text="Entering The Crystal Caves"},
[2002] = {pos={x=32837, y=21283, z=11, stackpos=1}, value=2, text="Entering The Blood Halls"},
[2003] = {pos={x=32753, y=31338, z=12, stackpos=1}, value=3, text="Entering The Vats"},
[2004] = {pos={x=32860, y=31328, z=12, stackpos=1}, value=4, text="Entering The Arcanum"},
[2005] = {pos={x=32954, y=31429, z=11, stackpos=1}, value=5, text="Entering The Hive"} },
portals={---aid, position, text
[3000] = {pos={x=32768, y=31214, z=13}, text="Entering Inquisition Portals Room"},
[3001] = {pos={x=32806, y=31347, z=11}, text="Entering The Ward of Ushuriel"},
[3002] = {pos={x=32893, y=31200, z=11}, text="Entering The Undersea Kingdom"},
[3003] = {pos={x=32838, y=31346, z=11}, text="Entering The Ward of Zugurosh"},
[3004] = {pos={x=32856, y=31260, z=11}, text="Entering The Foundry"},
[3005] = {pos={x=32820, y=31386, z=11}, text="Entering The Ward of Madareth"},
[3006] = {pos={x=32751, y=31266, z=12}, text="Entering The Battlefield"},
[3007] = {pos={x=32855, y=31386, z=11}, text="Entering The Ward of The Demon Twins"},
[3008] = {pos={x=32947, y=31272, z=12}, text="Entering The Soul Wells"},
[3009] = {pos={x=32895, y=31346, z=11}, text="Entering The Ward of Annihilon"},
[3010] = {pos={x=32900, y=31388, z=11}, text="Entering The Ward of Hellgorak"} },
storage=56123,---storage used in boss and mainroom portals
walkback="You don't have enough energy to enter this portal",---message if you cannot use mainroom portal
e={} }----dunno whats this but have to be like this to make doCreatureSayWithDelay working, DON'T TOUCH}
function onStepIn(cid, item, position, fromPosition)
if isPlayer(cid) == TRUE then
if(config.bosses[item.actionid]) then
local t= config.bosses[item.actionid]
if getPlayerStorageValue(cid, config.storage)< t.value then
setPlayerStorageValue(cid, config.storage, t.value)
end
doTeleportThing(cid, t.pos)
doCreatureSayWithDelay(cid,t.text,19,1, config.e)
elseif(config.mainroom[item.actionid]) then
local t= config.mainroom[item.actionid]
if getPlayerStorageValue(cid, config.storage)>=t.value then
doTeleportThing(cid, t.pos)
doCreatureSayWithDelay(cid,t.text,19,1,config.e)
else
doTeleportThing(cid, fromPosition)
doCreatureSay(cid, config.walkback, 19)
end
elseif(config.portals[item.actionid]) then
local t= config.portals[item.actionid]
doTeleportThing(cid, t.pos)
doCreatureSayWithDelay(cid,t.text,19,1,config.e)
end
end
end

What is not good ? srr for mine english
 
Back
Top