• 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 I want to Add Excuated at this script REP+

Hesham16

New Member
Joined
Jul 1, 2011
Messages
63
Reaction score
0
could some one add execution to this script then the player can use it every 30 seconds .
Code:
local config = {
	monsters = {
		['Demon'] = {}
		}
	}
 
function onUse(cid, item, fromPosition, itemEx, topos)
local summons = getCreatureSummons(cid)
for _, summoned in ipairs(summons) do
if config.monsters[getCreatureName(summoned)] then
doSendMagicEffect(getPlayerPosition(cid), 12)
doRemoveCreature(summoned)
doPlayerSendTextMessage(cid,27,'You have backed your monster')
return true
end
end
if(getTilePzInfo(getCreaturePosition(cid)) == true) then
	doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You can't summon in pz.")
	return true
end
if table.maxn(getCreatureSummons(cid)) <= 0 then -- ?ndra till max antalet summons
doSummonMonster(cid, 'Demon')
doSendMagicEffect(getPlayerPosition(cid), 28)
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You already have a summon.")
end
return true
end
 
Last edited:
Lua:
local exhaust = createConditionObject(CONDITION_EXHAUSTED)
setConditionParam(exhaust, CONDITION_PARAM_TICKS, 30000)

local config = {
	monsters = {
		['Demon'] = {}
		}
	}
 
function onUse(cid, item, fromPosition, itemEx, topos)
local summons = getCreatureSummons(cid)
	for _, summoned in ipairs(summons) do
		if config.monsters[getCreatureName(summoned)] then
			doSendMagicEffect(getPlayerPosition(cid), 12)
			doRemoveCreature(summoned)
			doPlayerSendTextMessage(cid,27,'You have called back your pet')
			doAddCondition(cid, exhaust)
	return true
	end
end
if(getTilePzInfo(getCreaturePosition(cid)) == true) then
	doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You can't summon in pz.")
	return true
end
	if table.maxn(getCreatureSummons(cid)) <= 0 then -- ?ndra till max antalet summons
		doSummonMonster(cid, 'Demon')
		doSendMagicEffect(getPlayerPosition(cid), 28)
	else
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You already have a summon.")
	end
return true
end
 
not working
Code:
[12/07/2011 07:00:42] [Error - Action Interface] 
[12/07/2011 07:00:42] data/actions/scripts/rune.lua
[12/07/2011 07:00:42] Description: 
[12/07/2011 07:00:42] (luaCreateConditionObject) Condition not found

[12/07/2011 07:00:42] [Error - Action Interface] 
[12/07/2011 07:00:42] data/actions/scripts/rune.lua
[12/07/2011 07:00:42] Description: 
[12/07/2011 07:00:42] (luaSetConditionParam) Condition not found
 
Back
Top