gr33nd3v1l
You see a Green Devil.
Hi there, me again.. Been a long long time since i last worked on Genesis...
I deleted the map, as well -.-
Stupid of me.
Well, I've been bored lately, so I'm trying to remake Genesis
And since i haven't scripted in a few years, I'd like some quick helps to remind myself >.<
Alright, first off: I'm trying to make a portal rune. It works like animate dead, but by sacrificing a freshly killed human (so i need a very certain ID, i believe it's from 3058-3066, because it would need to be a player)
After that, it sends a big smoke cloud on 1 square only, and summons a PoI monster at random.
And this is the code that i managed to crash my server with, and now need halp plx.
PS
what's with the downtime?
I deleted the map, as well -.-
Stupid of me.
Well, I've been bored lately, so I'm trying to remake Genesis
And since i haven't scripted in a few years, I'd like some quick helps to remind myself >.<
Alright, first off: I'm trying to make a portal rune. It works like animate dead, but by sacrificing a freshly killed human (so i need a very certain ID, i believe it's from 3058-3066, because it would need to be a player)
After that, it sends a big smoke cloud on 1 square only, and summons a PoI monster at random.
And this is the code that i managed to crash my server with, and now need halp plx.
Lua:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
local area = createCombatArea(AREA_CIRCLE1X1)
setCombatArea(combat, area)
function onTargetTile(cid, pos)
local position = pos
position.stackpos = 255
local item = getThingfromPos(position)
if item.itemid > 0 then
if isInArray(CORPSES, item.itemid) == TRUE then
doRemoveItem(item.uid,1)
if math.random(0, 5) == 0 then
doRemoveItem(itemEx.uid)
local creature = doSummonCreature("Hellhound", pos)
doSendMagicEffect(pos, CONST_ME_BIGCLOUDS)
elseif math.random(0, 5) == 1 then
doRemoveItem(itemEx.uid)
local creature = doSummonCreature("Defiler", pos)
doSendMagicEffect(pos, CONST_ME_BIGCLOUDS)
elseif math.random(0, 5) == 2 then
doRemoveItem(itemEx.uid)
local creature = doSummonCreature("Juggernaut", pos)
doSendMagicEffect(pos, CONST_ME_BIGCLOUDS)
elseif math.random(0, 5) == 3 then
doRemoveItem(itemEx.uid)
local creature = doSummonCreature("Grim Reaper", pos)
doSendMagicEffect(pos, CONST_ME_BIGCLOUDS)
elseif math.random(0, 5) == 4 then
doRemoveItem(itemEx.uid)
local creature = doSummonCreature("Fury", pos)
doSendMagicEffect(pos, CONST_ME_BIGCLOUDS)
elseif math.random(0, 5) == 5 then
doRemoveItem(itemEx.uid)
local creature = doSummonCreature("Dark Torturer", pos)
doSendMagicEffect(pos, CONST_ME_BIGCLOUDS)
end
end
end
end
setCombatCallback(combat, CALLBACK_PARAM_TARGETTILE, "onTargetTile")
function onCastSpell(cid, var)
return doCombat(cid, combat, var)
end
PS
what's with the downtime?
Last edited: