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

[HELP] Talking Teleporter~(more coordinates possible?)~

Martiimeus

●тнυg●ℓιƒє● ρα¢ 4 єνєя
Joined
Feb 3, 2009
Messages
500
Reaction score
1
Location
gєямαηу
Hello I just made this script:

PHP:
--Script by Nadoria!
local pos = {
{x = 3964, y = 3996, z = 7}
}
local timespeed = 5000 -- 5000 = 5 seconds
function onThink(cid, interval, lastExecution)
        doSendMagicEffect(pos[1], 29)
        doSendAnimatedText(pos[1], "Welcome!", 183)
return TRUE
end


But I want to have this effect on random places so how to edit this script to get working it well?


Thanks.:thumbup:
 
declare n variables with 1 different place each one, and then make a function that gives a random number from 0 to n, and the number u get will be the place u will be teleported to
 
Okay again,

This globalevent is set to the temple as : Welcome! but I want to do a second globalevent like : Rotworms about a teleporter or Trainer! about a teleporter... so what I want to say is that I dont want to make it seperate.. just all in one script! ^^
 
So you mislead us by writing 'on random places' [;

try this:
Code:
local signs = {
	{pos = {x = 3964, y = 3996, z = 7}, text = "Welcome!", color = 183, effect = 29},
	{pos = {x = 3964, y = 3996, z = 7}, text = "Rotworms!", color = 183}
}

function onThink(interval, lastExecution, thinkInterval)
	for _, sign in ipairs(signs) do
		if(sign.effect) then
			doSendMagicEffect(sign.pos, sign.effect)
		end

		if(sign.text) then
			doSendAnimatedText(sign.pos, sign.text, sign.color)
		end
	end
	return TRUE
end
 
Ouh man this is just that what I was talkin' 'bout THANK YOU!!!! ^^ gonna rep ya!


maybe me 2? ^^



edit: but hey how to do this when Im adding some coordinates? Should I edit something new or just the coordinates?
 
Last edited:
PHP:
function onThink(interval, lastExecution, thinkInterval)
	for _, sign in ipairs(signs) do
		if(sign.effect) then
			doSendMagicEffect(sign.pos, sign.effect)
		end

		if(sign.text) then
			doSendAnimatedText(sign.pos, sign.text, sign.color)
		end
	end
	return TRUE
end

should I place just these lines again? by every new coordinate?:wub:
 
PHP:
function onThink(interval, lastExecution, thinkInterval)
	for _, sign in ipairs(signs) do
		if(sign.effect) then
			doSendMagicEffect(sign.pos, sign.effect)
		end

		if(sign.text) then
			doSendAnimatedText(sign.pos, sign.text, sign.color)
		end
	end
	return TRUE
end

should I place just these lines again? by every new coordinate?:wub:

no! Just 'signs' ^_^

fe:
Code:
local signs = {
	{pos = {x = 3964, y = 3996, z = 7}, text = "Welcome!", color = 183, effect = 29},
	{pos = {x = 3964, y = 3996, z = 7}, text = "Rotworms!", color = 183, effect = 29},
	{pos = {x = 3964, y = 3996, z = 7}, text = "Rotworms!", color = 183, effect = 29},
	{pos = {x = 3964, y = 3996, z = 7}, text = "Rotworms!", color = 183, effect = 29},
	{pos = {x = 3964, y = 3996, z = 7}, text = "Rotworms!", color = 183, effect = 29},
	{pos = {x = 3964, y = 3996, z = 7}, text = "Rotworms!", color = 183, effect = 29},
	{pos = {x = 3964, y = 3996, z = 7}, text = "Rotworms!", color = 183, effect = 29},
	{pos = {x = 3964, y = 3996, z = 7}, text = "Rotworms!", color = 183, effect = 29},
	{pos = {x = 3964, y = 3996, z = 7}, text = "Rotworms!", color = 183, effect = 29},
	{pos = {x = 3964, y = 3996, z = 7}, text = "Rotworms!", color = 183, effect = 29},
	{pos = {x = 3964, y = 3996, z = 7}, text = "Rotworms!", color = 183, effect = 29},
	{pos = {x = 3964, y = 3996, z = 7}, text = "Rotworms!", color = 183, effect = 29}
}
 
Ouh man this is just that what I was talkin' 'bout THANK YOU!!!! ^^ gonna rep ya!


maybe me 2? ^^



edit: but hey how to do this when Im adding some coordinates? Should I edit something new or just the coordinates?

lawl naab, this script exist already^^ use search function.
 
So you mislead us by writing 'on random places' [;

try this:
Code:
local signs = {
	{pos = {x = 3964, y = 3996, z = 7}, text = "Welcome!", color = 183, effect = 29},
	{pos = {x = 3964, y = 3996, z = 7}, text = "Rotworms!", color = 183}
}

function onThink(interval, lastExecution, thinkInterval)
	for _, sign in ipairs(signs) do
		if(sign.effect) then
			doSendMagicEffect(sign.pos, sign.effect)
		end

		if(sign.text) then
			doSendAnimatedText(sign.pos, sign.text, sign.color)
		end
	end
	return TRUE
end


Lol I copied this script and replaced it with mine.. lol but it doesnt work ! o_O'

Theres nothing on the ground omg :S:eek::confused:


edit:
PHP:
<globalevent name="EffectTile" interval="3" script="effectile.lua"/>

this is already in the globalevents.xml so wtf?! is going on lol
 
Back
Top