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

Acc Maker/Ot Server Live Stream

patriciou

Member
Joined
Dec 26, 2009
Messages
180
Reaction score
6
Hello Otlanders...

I Really need your Help...

Basically What i need is a Live Stream
On my acc Maker Which will show Temple
on my Ot.. Like on the Picture Below

In Acc maker Website Person Presses :

button.JPG

And then a Window Comes up Like on
The Picture Below:

livestram.JPG

And When the Person Moves in Game (Temple)
Then on LiveStream Person is Moving Too
So basically is Like Watchin People on my Ot
Without Going on it ...


Waiting For Quick Reply REP++ For Help!

Regards
 
If you Would like to See
how it actually Looks like

This is the IP : Rexora.zapto.org

On right hand side there should be
a Button just Press on it :)
 
I need the script to add querys let say ( I dont know how lua works ) whehn X player is in a tile then add to a field called stream_pos_x the X position then to a field called stream_pos_y the Y position etc and when the character moves to another tile the query updates with new positions.
 
Here's some contribution.

LUA:
function onThink()
	function qr() return {getTopCreature({x=32310,y=32170,z=6}) .uid, getTopCreature({x=32312,y=32170,z=6}).uid} end      
	local moved
	for _, v in ipairs(qr()) do
		if v~= 0 then
			local mp = getThingPos(v)
				local n = getCreatureByName('harsky')
				local np = getThingPos(n)
				doSendDistanceShoot(np,mp,CONST_ANI_SPEAR)
			doCreateItem(2019, 2, mp)
			--doCreateItem(2148, 1, mp)
				doSendMagicEffect(mp, 0)
			
			if _ == 1 or (_ == 2 and moved == nil) then
				moved = true
				--doCreatureSay(n,'Take this!',1)
				doCreatureSetSkullType(n,math.random(0,5))
				doMoveCreature(n,np.y==32170 and SOUTH or np.y == 32179 and NORTH or getCreatureLookDir(n)==SOUTH and SOUTH or NORTH)
			end
			--doCreatureSay(v,'Bye',19) doCreatureAddHealth(v,-1) doSendMagicEffect(mp,CONST_ME_YELLOW_RINGS)
		end
	end
	
	--[[
	local s = "{"
	local t = getSpectators({x=32356,y=32228,z=7}, 20, 18, false)
	if t then
		for i = 1, #t do
			local cid = t[i]
			if isPlayer(cid) and isPlayerGhost(cid) == false then
				local p = getThingPos(cid)
				local o = getCreatureOutfit(cid)
				s = s .. '"'..getCreatureName(cid)..'":['.. p.x ..','.. p.y ..','.. p.z ..','.. o.lookType ..','.. o.lookAddons ..','.. o.lookHead ..','.. o.lookBody ..','.. o.lookLegs ..','.. o.lookFeet ..',0,'.. (getCreatureLookDirection(cid)+1) ..',' .. o.lookTypeEx .. ','.. getCreatureSkullType(cid) ..'],';
			end
		end
	end
	s = s .. '}'
	local f = io.open('/var/www/sites/masiyah.se/cache/stream.json',"w")
	f:write(s)
	f:close()]]
	return true
end

It isn't mine but this can help to make the script.
 
Code:
local s = "{"
	local t = getSpectators({x=32356,y=32228,z=7}, 20, 18, false)
	if t then
		for i = 1, #t do
			local cid = t[i]
			if isPlayer(cid) and isPlayerGhost(cid) == false then
				local p = getThingPos(cid)
				local o = getCreatureOutfit(cid)
				s = s .. '"'..getCreatureName(cid)..'":['.. p.x ..','.. p.y ..','.. p.z ..','.. o.lookType ..','.. o.lookAddons ..','.. o.lookHead ..','.. o.lookBody ..','.. o.lookLegs ..','.. o.lookFeet ..',0,'.. (getCreatureLookDirection(cid)+1) ..',' .. o.lookTypeEx .. ','.. getCreatureSkullType(cid) ..'],';
			end
		end
	end
	s = s .. '}'
	local f = io.open('/var/www/sites/masiyah.se/cache/stream.json',"w")
	f:write(s)
	f:close()]]

That part of code can help , so the system stores all data of players in a cache and then you can use it to display all
 
Actually the script that narko posted I dont undersntand what the 1st part does? is it even necessary? if not someone convert the final script into lua so I can do the stream thingy
 
That script which got posted, is for checking through globalevent, when someone enter that area. It should update it on the livestream.
 
No, you dont need change anything. We are the one which need to change the temple area:

LUA:
function qr() return {getTopCreature({x=32310,y=32170,z=6}) .uid, getTopCreature({x=32312,y=32170,z=6}).uid} end

LUA:
doMoveCreature(n,np.y==32170 and SOUTH or np.y == 32179 and NORTH or getCreatureLookDir(n)==SOUTH and SOUTH or NORTH)
 
Well I need to change it for testing, so where should the corners position go?

With this script

Code:
function onThink()

	local s = "{"
	local t = getSpectators({x=1203,y=952,z=7}, 20, 18, false)
	if t then
		for i = 1, #t do
			local cid = t[i]
			if isPlayer(cid) and isPlayerGhost(cid) == false then
				local p = getThingPos(cid)
				local o = getCreatureOutfit(cid)
				s = s .. '"'..getCreatureName(cid)..'":['.. p.x ..','.. p.y ..','.. p.z ..','.. o.lookType ..','.. o.lookAddons ..','.. o.lookHead ..','.. o.lookBody ..','.. o.lookLegs ..','.. o.lookFeet ..',0,'.. (getCreatureLookDirection(cid)+1) ..',' .. o.lookTypeEx .. ','.. getCreatureSkullType(cid) ..'],';
			end
		end
	end
	s = s .. '}'
	local f = io.open("C:/Users/Asus/Desktop/Pixel/stream.txt","w")
	f:write(s)
	f:close()

	return true
end

I get
{"Raggaer":[1202,953,7,302,0,0,0,0,0,0,3,0,0],}

I just need to select more tiles cause Im just selecting one ;S
 
Last edited:
The first North-West Top Corner and North-East Bottom Corner of temple!
LUA:
getTopCreature({x=northwestx,y=northwesty,z=7}) .uid, getTopCreature({x=northeastx,y=northeasty,z=7}).uid} end

This row, not sure:
But its a npc named "harsky".
LUA:
doMoveCreature(n,np.y==32170 and SOUTH or np.y == 32179 and NORTH or getCreatureLookDir(n)==SOUTH and SOUTH or NORTH)

- - - Updated - - -

Raggaer login on otland chat so i can maybe help with the configure part:
http://otland.net/chat.php
 
Code:
function onThink()

	local s = ""
	local t = getSpectators({x=1203,y=952,z=7}, 20, 18, false)
	if t then
		for i = 1, #t do
			local cid = t[i]
			if isPlayer(cid) and isPlayerGhost(cid) == false then
				local p = getThingPos(cid)
				local o = getCreatureOutfit(cid)
				s = s .. '<name>'..getCreatureName(cid)..'</name><posx>'.. p.x ..'</posx><posy>'.. p.y ..'</posy><posz>'.. p.z ..'</posz><looktype>'.. o.lookType ..'</looktype><lookaddon>'.. o.lookAddons ..'</lookaddon><lookhead>'.. o.lookHead ..'</lookhead><lookbody>'.. o.lookBody ..'</lookbody><lookfeet>'.. o.lookLegs ..'</lookfeet>'.. o.lookFeet ..'</lookfeet>0,'.. (getCreatureLookDirection(cid)+1) ..',' .. o.lookTypeEx .. ','.. getCreatureSkullType(cid) ..'],';
			end
		end
	end
	s = s .. ''
	local f = io.open("C:/Users/Asus/Desktop/Pixel/stream.txt","w")
	f:write(s)
	f:close()

	return true
end

Can you add in that code the code to have xtopconer and xbotcorner please?
Code:
local t = getSpectators({x=1203,y=952,z=7}, 20, 18, false)
Like convert this to support more tiles
 
I think this theard is dead, me and Raggaer tried, but didnt work. I dont know if he luckly made it now. So we wait until he answer.
 
Back
Top