• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Sleep Powder Possible?

Printer

if Printer then print("LUA") end
Senator
Premium User
Joined
Dec 27, 2009
Messages
5,780
Solutions
31
Reaction score
2,299
Location
Sweden?
I need a script, exevo sleep, then it come sleep powder area effect and the player or monster get asleep for 5-7 seconds and they cant move, use any spells or damage by attack and they become to corpse until the wake up.

Rep!
 
Last edited:
To make it properly you would need new condition and small edit in condition outfit and other ways of changing looktype(to prevent changing looktype when player 'sleeps') and edit of onCastSpell and onCombat)I guess)
everything in source

of course it CAN be done in lua but I wouldn't struggle so much
 
LUA:
function onSay(cid,words,param)
	doCreatureSetNoMove(cid, cannotMove)
	doSendMagicEffect(getPlayerPosition(cid),53)
	doCreatureChangeOutfit(cid, corpse) 
	end
	return true
	end


something like this? and Idk the corpse id, i haven't scripted in about 4-5 months so I'm not sure if this will work either :P
 
@up that will make the caster not able to move and will change the casters outfit what if he wants a spell that you can use on other ppl? Try this:
First add this to data/spells/spells.xml:
LUA:
<instant name="Sleep" words="exevo sleep" lvl="40" maglv="35" mana="130" selftarget="1" exhaustion="3000" needlearn="0" script="sleep.lua">
          <vocation name="sorcerer"/>
          </instant>
Edit it as you wish.

Now on data/spells/scripts create a new lua file and name it sleep.lua then add this:
LUA:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, 29)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)

local exhaust = createConditionObject(CONDITION_EXHAUST)
setConditionParam(exhaust, CONDITION_PARAM_SUBID, 1)
setConditionParam(exhaust, CONDITION_PARAM_TICKS, 10000)
setCombatCondition(combat, exhaust)

local disable = createConditionObject(CONDITION_PACIFIED)
setConditionParam(disable, CONDITION_PARAM_TICKS, 12000)
setCombatCondition(combat, disable)

local area = createCombatArea(AREA_CROSS5X5)
setCombatArea(combat, area)


function onCastSpell(cid, var)
    return doCombat(cid, combat, var)
end
This won't change outfit or make it unabe to move, but it won't allow anyone hit by the spell to attack others (except runes).
I found this on my pc if but I didn't make it, if anyone knows who created it I will gladly add credits.
 
Ok, thanks but i hope someone can evolve the script :) also its not only players get to sleep, i want monsters :) and the monster outfit should change to their respectiv corpse id and players dependig what vocation they have ex. sorecerer will have ferumbras dead body i want it editable on the script.

Thanks!

Rep to Luiglic :)
 
Back
Top