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

Lua help inq problem

dunnish

New Member
Joined
Jun 18, 2009
Messages
277
Solutions
1
Reaction score
3
hello can some one help me http://www14.speedy*****malware.localhost/files/28030505/download/help.png

what's wrong ;) thx for help
 
Last edited:
Perhaps you should tell us your problem, what script (inquisition holds alot of scripts), who you are and why you are who you are and then perhaps you could give us some cookies?
 
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 = 246, y = 351, z = 12, stackpos=2 }, aid=2001},
["Zugurosh"] = { pos={ x = 390, y = 525, z = 13, stackpos=2 }, aid=2002},
["Madareth"] = { pos={ x = 340, y = 460, z = 13, stackpos=2 }, aid=2003},
["Annihilon"] = { pos={ x = 637, y = 472, z = 13, stackpos=2 }, aid=2005},
["Hellgorak"] = { pos={ x = 335, y = 581, z = 10, stackpos=2 }, aid=2006}
},
brothers ={
["Golgordan"] = {pos={ x = 505, y = 345, z = 13, stackpos=1 },aid=2004, brother = "Latrivan"},
["Latrivan"] = {pos={ x = 505, y = 345, z = 13, stackpos=1 },aid=2004, brother = "Golgordan"},
brothersArea ={
fromPos = {x = 505, y = 345, z = 13},
toPos = {x = 408, y = 413, z = 13} } }
}
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
help me!!!!!!!!!
 
Last edited:
what a shitty code, do not use quote for code ok?
anyway try
Code:
local config = 
{
    time = 60, -- seconds
    teleportId = 5023,
    bosses = 
	{ -- Monster Name,  Teleport Position, aid, optional brothers name
		["Ushuriel"] = {  pos={ x=1383, y=615, z=11}, aid=1001},
		["Zugurosh"] = {  pos={ x=1415, y=614, z=11}, aid=1002},
		["Madareth"] = {  pos={ x=1398, y=655, z=11}, aid=1003},
		["Annihilon"] = {  pos={ x=1473, y=615, z=11}, aid=1005},
        ["Hellgorak"] = {  pos={ x=1478, y=657, z=11}, aid=1006},
		["Golgordan"] = {	pos={ x=1433, y=655, z=11}, aid=1004, brother = "Latrivan"},
        ["Latrivan"] = {	pos={ x=1433, y=655, z=11}, aid=1004, brother = "Golgordan"}
	}
}
local function changeBack(position)
	doItemSetAttribute(getTileItemById(t.pos, config.teleportId).uid, "aid", 3000)
end
function onKill(cid, target, lastHit)
    if(local t = config.bosses[getCreatureName(target)]) then
		if t.brother then if(isMonster(getCreatureByName(t.brother))) then return true end end
	    doItemSetAttribute(getTileItemById(t.pos, config.teleportId).uid, "aid", t.aid)
        doCreatureSay(cid, "Go into the teleport in "..config.timeToRemove.." seconds, else it will disappear.", 19)
		addEvent(changeBack, config.time * 1000, t.pos)
	end
	return true
end
configure it as you need, tested it before deleting few lines but should work

ah, and it works like global so it changes escape tp instead of creating another one but you should figureout how to configure movements
 
Back
Top