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

step-in create effect

Djivar

AKA Wickedviruz
Joined
Sep 28, 2009
Messages
1,641
Reaction score
19
Location
Sweden,edsbyn
Hello dear OtLanders, I'm asking for a script o_O
and i want it ti be like this, when you log in to the
server for the first time in tempel you will get
An effect over a teleport and the effect number is 56
But this will only show one time, and thats when you log in
And when after that i want like the same script. when you step in
on a teleport and are in the new pos there will be a new effect
on another place, but this will only be the first time you step in
on the teleport. and ofc the effect is going to be 56,
That one who help/make the script for me is going to get rep+
And if you dont understan try to leave a comment so i can explain better

yours Djivar
 
Here, add this code into your login.lua file (within the function onLogin(cid)):
Lua:
local effectPosition = {x=1000, y=1000, z=7}

    if getPlayerStorageValue(cid,9759) == -1 then
		doSendMagicEffect(effectPosition,56)
		setPlayerStorageValue(cid,9759,1)
	end

then go to movements/scripts and add a file called teleport_effect.lua then add this code to it:
Lua:
function onStepIn(cid, item, pos)

local effectPosition = {x=1000, y=1000, z=7}

    if item.actionid == 49330 and getPlayerStorageValue(cid,9760) == -1 then
		doSendMagicEffect(effectPosition,56)
		setPlayerStorageValue(cid,9760,1)
	end
end

after you added that go into movements.xml and add this:
PHP:
<movevent type="StepIn" actionid="49330" event="script" value="teleport_effect.lua"/>

Now all you need to do is set the effectPosition variables for the scripts and add the actionid 49330 tot he tile you want the player to step in to activate the effect.

Hope it helps! Rep++
 
i want it in defferent places how?
not just in 1 plce!

then you stop being a noob and learn to copy and paste...

Lua:
function onStepIn(cid, item, pos)	

local effectPosition = {x=1000, y=1000, z=7}
local effectPosition1 = {x=1000, y=1000, z=7}
local effectPosition2 = {x=1000, y=1000, z=7}
local effectPosition3 = {x=1000, y=1000, z=7}

    if item.actionid == 49330 and getPlayerStorageValue(cid,9760) == -1 then
                doSendMagicEffect(effectPosition,56)
		doSendMagicEffect(effectPosition1,56)
		doSendMagicEffect(effectPosition2,56)
		doSendMagicEffect(effectPosition3,56)
                setPlayerStorageValue(cid,9760,1)
        end
end

and

Lua:
local effectPosition = {x=1000, y=1000, z=7}
local effectPosition1 = {x=1000, y=1000, z=7}
local effectPosition2 = {x=1000, y=1000, z=7}
local effectPosition3 = {x=1000, y=1000, z=7}

    if getPlayerStorageValue(cid,9759) == -1 then
		doSendMagicEffect(effectPosition,56)
		doSendMagicEffect(effectPosition1,56)
		doSendMagicEffect(effectPosition2,56)
		doSendMagicEffect(effectPosition3,56)
		setPlayerStorageValue(cid,9759,1)
	end
 
Back
Top