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

[XML] Make me a script?

Bladefist

New Member
Joined
Oct 26, 2010
Messages
65
Reaction score
0
Location
Carlin
I wonder if someone could make me a xml script..

A lever with ID 1945 when used will summon 1 or serveral mobs at X, Y, Z

Unique id 5556 or something...

Please comment.. I think I can do the rest, thanks :)
 
At actions.xml add
XML:
<action uniqueid="5556" event="script" value="yourfile.lua"/>
If you want I could make the script too, but i don't get what you mean with "serveral mobs"
 
This was the best that I could do:
Code:
local from = {x=, y=, z=} --- the start sqm
local to = {x=, y=, z=} -- the end sqm
local creatures = {"demon", "dragon"} -- the creatures
 
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if item.itemid == 1946 then
		return doTransformItem(item.uid, 1945)
	end
 
	for x = from.x, to.x do
		for y = from.y, to.y do
[B]---SOMETHING'S MISSING HERE...AND IT ISN'T MARIO---[/B]
		end
	end

	return doTransformItem(item.uid, 1946)
end
I suppose you can complete it with some loops (I'm not really good at those) and doSummonCreature(monstername, position) [I have my doubts whether it's a real function or not because it doesn't appears in 'luascript.cpp', but it's the only one related to summoning a monster in certain position.]

OR...create a raid file and use this:
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if item.itemid == 1946 then
		return doTransformItem(item.uid, 1945)
	end

	doExecuteRaid(name)
	return doTransformItem(item.uid, 1946)
end
 
Back
Top