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

Code:
[13/06/2010 13:33:05] [Error - CreatureScript Interface] 
[13/06/2010 13:33:05] data/creaturescripts/scripts/inquisition.lua:onKill
[13/06/2010 13:33:05] Description: 
[13/06/2010 13:33:05] (luaDoItemSetAttribute) Item not found

[13/06/2010 13:33:05] [Error - CreatureScript Interface] 
[13/06/2010 13:33:05] data/creaturescripts/scripts/inquisition.lua:onKill
[13/06/2010 13:33:05] Description: 
[13/06/2010 13:33:05] (luaAddEvent) Callback parameter should be a function.

[13/06/2010 13:33:05] [Error - CreatureScript Interface] 
[13/06/2010 13:33:05] data/creaturescripts/scripts/inquisition.lua:onKill
[13/06/2010 13:33:05] Description: 
[13/06/2010 13:33:05] (luaDoItemSetAttribute) Item not found

I get this at the latrivan,golgordan part and it lags the server...


anyway to fix it?
 
You don't have any other script like these for 0.2.7, cause 0.3.6 is sux, he open the ot only on 8.54 version :/
Can u help?

if you can at least read you can start have 0.3.6 for 8.54-7

@snow: I have no idea what you have wrong
 
gosh that will put anyone could make a straight by explaining how to put this system because I've tried and failed
 
Thanks to all who will not help me I already could later add these actions in my server ^ ^
 
Could you explain more clear on how to install this?
Be "straight" with your words (instructions).
 
What could I do wrong? When I enter to Boss Ward teleport is inside, I don't even need to kill the boss, I checked teleports, their aid is good, id too (9773), either positions are good. Orange text appears after killing a boss. Any ideas how to solve this? I'll post my inqbosses.lua placed in creaturescripts/scripts:
Code:
                                      local config = {
                                              timeToRemove = 60, -- seconds
                                      		message = "Go into the teleport in 60 seconds, else it will disappear.",
                                              teleportId = 9773,
                                              bosses = { -- Monster Name,  Teleport Position
                                                      ["Ushuriel"] = {  pos={ x=1859, y=1125, z=11, stackpos=2 }, aid=1001 },
                                      				["Zugurosh"] = {  pos={ x=1823, y=1091, z=11, stackpos=2 }, aid=1002},
                                      				["Madareth"] = {  pos={ x=1899, y=1165, z=11, stackpos=2 }, aid=1003},
                                                      ["Annihilon"] = {  pos={ x=1899, y=1084, z=11, stackpos=2 }, aid=1005},
                                                      ["Hellgorak"] = {  pos={ x=1806, y=1114, z=11, stackpos=2 }, aid=1006}
                                      				},
                                      		brothers ={
                                              ["Golgordan"] = {pos={ x=1942, y=1125, z=11, stackpos=1 },aid=1004, brother = "Latrivan"},
                                              ["Latrivan"] = {pos={ x=1942, y=1125, z=11, stackpos=1 },aid=1004, brother = "Golgordan"},
                                              brothersArea ={
                                                      fromPos = {x = 1926, y = 1119, z = 11},
                                                      toPos = {x = 1942, y = 1131, z = 11}	}	}
                                      }
                                      local function removal(position)
                                      	doRemoveThing(getTileItemById(position, config.teleportId).uid, 1)
                                          return TRUE
                                      end

                                      function onKill(cid, target, lastHit)
                                          if(config.bosses[getCreatureName(target)]) then
                                      		local t = config.bosses[getCreatureName(target)]
                                      	    local teleport = doCreateItem(config.teleportId, t.pos)
                                      		local position = t.pos
                                      		doItemSetAttribute(teleport, "aid", t.aid)
                                              doCreatureSay(cid, config.message, TALKTYPE_ORANGE_1)
                                      		addEvent(removal, 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 teleport = doCreateItem(config.teleportId, t.pos)
                                      			local position = t.pos
                                      			doItemSetAttribute(teleport, "aid", t.aid)
                                      			doCreatureSay(cid, config.message, TALKTYPE_ORANGE_1)
                                      			addEvent(removal, config.timeToRemove * 1000, position)
                                      		end
                                      	end
                                      	return TRUE
                                      end

maybe that other file has an error? Maybe this will help: in that script placed in movements/scripts directory I've added second function, now script looks like this:
Code:
                                          local config = {
                                          	bosses={---aid of portal, position where it sends, value it sets, text it shows
                                          		[1001] = {pos={x=1773, y=1181, z=13, stackpos=1}, value=1, text="Entering The Crystal Caves"},
                                          		[1002] = {pos={x=2073, y=1010, z=14, stackpos=1}, value=2, text="Entering The Blood Halls"},
                                          		[1003] = {pos={x=1856, y=1179, z=12, stackpos=1}, value=3, text="Entering The Vats"},
                                          		[1004] = {pos={x=1740, y=1151, z=15, stackpos=1}, value=4, text="Entering The Arcanum"},
                                          		[1005] = {pos={x=1900, y=1082, z=12, stackpos=1}, value=5, text="Entering The Hive"},
                                          		[1006] = {pos={x=1814, y=1078, 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=1773, y=1181, z=13, stackpos=1}, value=1, text="Entering The Crystal Caves"},
                                          		[2002] = {pos={x=2073, y=1010, z=14, stackpos=1}, value=2, text="Entering The Blood Halls"},
                                          		[2003] = {pos={x=1856, y=1179, z=12, stackpos=1}, value=3, text="Entering The Vats"},
                                          		[2004] = {pos={x=1740, y=1151, z=15, stackpos=1}, value=4, text="Entering The Arcanum"},
                                          		[2005] = {pos={x=1900, y=1082, z=12, stackpos=1}, value=5, text="Entering The Hive"}	},
                                          	portals={---aid, position, text
                                          		[3000] = {pos={x=1865, y=1105, z=14}, text="Entering Inquisition Portals Room"},
                                          		[3001] = {pos={x=1875, y=1125, z=11}, text="Entering The Ward of Ushuriel"},
                                          		[3002] = {pos={x=1874, y=1152, z=13}, text="Entering The Undersea Kingdom"},
                                          		[3003] = {pos={x=1839, y=1091, z=11}, text="Entering The Ward of Zugurosh"},
                                          		[3004] = {pos={x=2059, y=987, z=11}, text="Entering The Foundry"},
                                          		[3005] = {pos={x=1899, y=1153, z=11}, text="Entering The Ward of Madareth"},
                                          		[3006] = {pos={x=1954, y=1029, z=13}, text="Entering The Battlefield"},
                                          		[3007] = {pos={x=1928, y=1125, z=11}, text="Entering The Ward of The Demon Twins"},
                                          		[3008] = {pos={x=1797, y=972, z=11}, text="Entering The Soul Wells"},
                                          		[3009] = {pos={x=1899, y=1099, z=11}, text="Entering The Ward of Annihilon"},
                                          		[3010] = {pos={x=1806, y=1130, z=11}, text="Entering The Ward of Hellgorak"},
                                          		[3011] = {pos={x=1869, y=1086, z=14}, text="Entering The Reward Room"}	},
                                          	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
                                          function doCreatureSayWithDelay(cid,text,type,delay,e,pcid)
	if delay<=0 then
		doCreatureSay(cid,text,type, false,pcid)
	else
		local func=function(pars)
			doCreatureSay(pars.cid,pars.text,pars.type, false,pars.pcid)
			pars.e.done=TRUE
		end
		e.done=FALSE
		e.event=addEvent(func,delay,{cid=cid, text=text, type=type, e=e,pcid=pcid})
	end
end

function doNPCTalkALot(msgs,interval,pcid)
	local e={}
	local ret={}
	if interval==nil then interval=10000 end --10 seconds is default time between messages
		for aux=1,table.getn(msgs) do
		e[aux]={}
		doCreatureSayWithDelay(getNpcCid(),msgs[aux],TALKTYPE_PRIVATE_NP,(aux-1)*interval,e[aux],pcid)
		table.insert(ret,e[aux])
	end
	return(ret)
end
 
could you maybe send me some ss of how it behave? anyway, if you ahve everything in config and map as it should be (in this script SECOND portal should appear only after killing boss and disappear some time later, in second version one and only tp change its aid for some time to make it work like global)

next week I'll try to update it, test on that 0.4 that was available for some time.
 
Here are 2 ss:

Imageshack - inq1.png
Imageshack - inq2.png

You made great script, but, not offensive to you, such a lua/xml noobs like me aren't able to understand all these things. :D Btw I am sure that AID and coordinates are good, I checked them 3 times. I have also no error in console. If you're going to update your script, please explain it in a easy way so that noobs could understand :)
I want be alse sure if I placed script in good directions, this one is in creaturescripts/scripts/inqbosses.lua:
Code:
                                      local config = {
                                              timeToRemove = 60, -- seconds
                                      		message = "Go into the teleport in 60 seconds, else it will disappear.",
                                              teleportId = 9773,
                                              bosses = { -- Monster Name,  Teleport Position
                                                      ["Ushuriel"] = {  pos={ x=1859, y=1125, z=11, stackpos=2 }, aid=1001 },
                                      				["Zugurosh"] = {  pos={ x=1823, y=1091, z=11, stackpos=2 }, aid=1002},
                                      				["Madareth"] = {  pos={ x=1899, y=1165, z=11, stackpos=2 }, aid=1003},
                                                      ["Annihilon"] = {  pos={ x=1899, y=1084, z=11, stackpos=2 }, aid=1005},
                                                      ["Hellgorak"] = {  pos={ x=1806, y=1114, z=11, stackpos=2 }, aid=1006}
                                      				},
                                      		brothers ={
                                              ["Golgordan"] = {pos={ x=1942, y=1125, z=11, stackpos=1 },aid=1004, brother = "Latrivan"},
                                              ["Latrivan"] = {pos={ x=1942, y=1125, z=11, stackpos=1 },aid=1004, brother = "Golgordan"},
                                              brothersArea ={
                                                      fromPos = {x = 1926, y = 1119, z = 11},
                                                      toPos = {x = 1942, y = 1131, z = 11}	}	}
                                      }
                                      local function removal(position)
                                      	doRemoveThing(getTileItemById(position, config.teleportId).uid, 1)
                                          return TRUE
                                      end

                                      function onKill(cid, target, lastHit)
                                          if(config.bosses[getCreatureName(target)]) then
                                      		local t = config.bosses[getCreatureName(target)]
                                      	    local teleport = doCreateItem(config.teleportId, t.pos)
                                      		local position = t.pos
                                      		doItemSetAttribute(teleport, "aid", t.aid)
                                              doCreatureSay(cid, config.message, TALKTYPE_ORANGE_1)
                                      		addEvent(removal, 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 teleport = doCreateItem(config.teleportId, t.pos)
                                      			local position = t.pos
                                      			doItemSetAttribute(teleport, "aid", t.aid)
                                      			doCreatureSay(cid, config.message, TALKTYPE_ORANGE_1)
                                      			addEvent(removal, config.timeToRemove * 1000, position)
                                      		end
                                      	end
                                      	return TRUE
                                      end

this in creaturescripts/creaturescripts.xml:

Code:
    <event type="kill" name="Inquisition" script="inqbosses.lua"/>

and this in creaturescripts/scripts/login.lua:

Code:
	registerCreatureEvent(cid, "Inquisition")

Also my inq bosses have script implemented under flags.
 
Last edited:
first ss doesnt work for some reason, goes to imageshack main
in first version it is designed to: left tp is the one that is always here and goes to the main room, right one appears after killing a boss(ofc you can switch them or put in any other place in room, just: the one that is on map should have aid 3000, and again: in thearcanum portal from one part to another should have position set(theres no reason to script it))

And well, I'll try to explain better, but it wont be tutorial, just release for people that know at least how to copypaste + basic English
 
In mi tfs 0.4
[24/09/2010 18:21:26] [Error - LuaScriptInterface::loadFile] data/movements/scripts/Inquisition/Inquisition Texts.lua:36: '}' expected (to close '{' at line 1) near 'function'
[24/09/2010 18:21:26] [Warning - Event::loadScript] Cannot load script (data/movements/scripts/Inquisition/Inquisition Texts.lua)

:S please help me :S
 
copy again and config again, any errors are caused by your fault(this version works even on 0.4, only old 0.3 and any 0.2 wont support it)
 
Using Ubuntu TFS 0.4

PHP:
[14:9:52.374] [Error - CreatureScript Interface]
[14:9:52.374] data/creaturescripts/scripts/inquisition.lua:onKill
[14:9:52.374] Description:
[14:9:52.374] (luaDoItemSetAttribute) Item not found


when i kill the boss, it says in orange text below me, You have 60 seconds to enter the tp, BUT THE TP DONT APPEAR ANYWHERE :S

I use this too!
http://otland.net/f81/inq-portals-o...ng-boss-portals-62189/index10.html#post994708
and dont work it works but it says, You have 60 seconds to go to teleport, BUT NO TP APPEAR :S
 
Last edited:
Back
Top