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

Could someone edit my script

jbh1993

New Member
Joined
Jan 3, 2012
Messages
109
Reaction score
2
I need it so when u step on it keeps doing effeft, and when u step of it stops but i cant get the stepout to work so i removed it from the script but here is what i got so far.

Lua:
local config = {
 positions = {
  ["Test"] = { x = 1020, y = 1008, z = 7 },
  ["Test "] = { x = 1020, y = 1007, z = 7 },
},

 effects = {
   31
 },

 colors = {
  TEXTCOLOR_YELLOW
 }
}

function onStepIn(cid, item, position, fromPosition)
 for text, pos in pairs(config.positions) do
  doSendMagicEffect(pos, config.effects[math.random(1, #config.effects)])
  doSendAnimatedText(pos, text, config.colors[math.random(1, #config.colors)])
 end
 return TRUE
end
 
onStepin = start doing effect every second
onStepOut = stop doing the effect?

Is that how you want it?

onstepin
-give storage x 1
-start an addevent that inherit cid

addevent
- if x storage is 1 then
- do effect
- call itself in 1 second

onstepout
- give storage x 0.
That way, the repeating addevent scripts stops.
 
Back
Top