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

A doubt

icaro1988

New Member
Joined
Jul 1, 2009
Messages
63
Reaction score
1
I have the following script

Lua:
local config = {
	monster = {
		"Ashmunrah","Dipthrah","Mahrdis","Morguthis","Omruc","Rahemos","Thalas","Vashresamun"
	},
	storage = 12211,
	time = 20 * 60
}
local p = {{x=241, y=282, z=6},{x=295, y=267, z=7},{x=308, y=246, z=7}}
           

function onUse(cid, item, fromPosition, itemEx, toPosition)

		doSummonCreature(config.monster[math.random(1, #config.monster)],p[1])
                doSendMagicEffect(p[2],30)		
		setGlobalStorageValue(config.storage, os.time())
		doBroadcastMessage('The '..config.monster[math.random(1, #config.monster)]..' invade the small island')


end


I wanted to make the monster that was chosen for all the message, the more I can not, what happens is that appears a kind of monster summoned and appears in the message to every other monster!
 
Lua:
local t = {
	'Ashmunrah','Dipthrah','Mahrdis','Morguthis','Omruc','Rahemos','Thalas','Vashresamun'
}

function onUse(cid, item, fromPosition, itemEx, toPosition)
	local r = math.random(#t)
	doCreateMonster(t[r], {x=241, y=282, z=6})
	doSendMagicEffect({x=295, y=267, z=7}, CONST_ME_FIREWORK_BLUE)		
	doSetStorage(12211, os.time())
	doBroadcastMessage('The '..t[r]..' invade the small island')
	return true
end
 
Thanks Cyko~

You must spread some Reputation around before giving it to Cykotitan again. o/

More future will give you a reputation, thanks!
 
Back
Top