Rufo
New Member
- Joined
- Jan 9, 2008
- Messages
- 251
- Reaction score
- 1
This script uses a floor of only one ID, example one on the rawr palette, as the player walk on the floor, on the pos you would like, a random monster, configured on the script, will be summoned.
Change the "X" for the pos you want the monsters summons, and the monsters you would like to summon
save in data/movements/scripts/rndsummon.lua
on movements.xml
replace the "X" for the itemid you would like, i recommend itemid 8708(EXAMPLE).
Waiting for your comments and rates, 100% by me
Change the "X" for the pos you want the monsters summons, and the monsters you would like to summon
save in data/movements/scripts/rndsummon.lua
Lua:
--- 100% by rufo
-- Config
Summonpos = {x="XXXX", y="XXXX", z="X"} -- Pos where the monsters should summon
summon1 = Hunter -- Name of a monster
summon2 = Bandit -- Name of a monster
summon3 = Wild Warrior -- Name of a monster
summon = Smuggler -- Name of a monster
-- End config
function onStepIn(cid, item, position, fromPosition)
if isPlayer(cid) == TRUE and math.random(1, 26) == 1 then
doSummonCreature("summon", Summonpos)
elseif isPlayer(cid) == TRUE and math.random(1, 26) == 2 then
doSummonCreature("summon1", Summonpos)
elseif isPlayer(cid) == TRUE and math.random(1, 26) == 3 then
doSummonCreature("summon2", Summonpos)
elseif isPlayer(cid) == TRUE and math.random(1, 26) == 3 then
doSummonCreature("summon3", Summonpos)
end
return TRUE
end
on movements.xml
Code:
<movevent type="StepIn" itemid="XXXX" event="script" value="rndsummon.lua"/>
Waiting for your comments and rates, 100% by me