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

Freeze GEM

Luciano

Member
Joined
Feb 18, 2010
Messages
998
Reaction score
24
I need a script.
The Freeze GEM.
How it works?
A player X use the freeze GEM on player Y.
player Y cant move, heal, use spell, or say anything for 3 secs (configurable) and each 1 sec apear the efect 41.
after 3 secs he can heal, spell everything again ;P thanks
rep+++
 
Best option is to set a certain storage and then do a source edit and check if the storage is set and if yes stop the action. << easiest way
You could also add a check to every spell and every action script, but you can't deny saying something in lua anyway..
 
PHP:
 local t = 
 {
 item = xxxx ---- ID of the item you want to use
 timemute = xx ---- How long should the player be muted
 }

function onUse(cid, item, fromPosition, itemEx, toPosition)
      if item.itemid == t.item then
	 doMutePlayer(cid, t.timemute)
	 end
  return TRUE
  end

There you go.

I think if the player use the item now it will get effected on himself. I don't know how to fix that, some better scripter need to fix that. I just made the basic
 
PHP:
 local t = 
 {
 item = xxxx ---- ID of the item you want to use
 timemute = xx ---- How long should the player be muted
 }

function onUse(cid, item, fromPosition, itemEx, toPosition)
      if item.itemid == t.item then
	 doMutePlayer(cid, t.timemute)
	 end
  return TRUE
  end

There you go.

I think if the player use the item now it will get effected on himself. I don't know how to fix that, some better scripter need to fix that. I just made the basic
if ur mute you cant do spells but u can still heal :/ theres gotta be exhaust some where
 
the problem is:
i know a bit about ot and so on, and the thing i dont understand is:
COMPILING.
didnt even try ou. y? i dont even know how to start with
 
Well I can do the action but you need to do the function..

Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if not(isPlayer(itemEx.uid)) then return doPlayerSendCancel(cid, "You can only target players." end
		doSendMagicEffect(getThingPos(cid), 41)
		doDisablePlayer(itemEx.uid, 3)
	return true
end
 
Back
Top