Jump to content

Recommended Posts

  • Management

Hi guys

 

I'm here with a problem.

 

I'm creating the gm painel for my server, and the option "other event" has to option to choise, pvm and pvp.

 

When the GM activate the event, need to insert the coordinates for the teleporter, and the coordinates is saved in the table called eventos, on db player (player.eventos).

 

The teleporter goes to the table seach for x and y coordinates, something like this:

				local x = mysql_query("SELECT x FROM player.eventos WHERE tipo='pvm'")
				local y = mysql_query("SELECT y FROM player.eventos WHERE tipo='pvm'")	

and the warp is like this:

					pc.warp("..x..", "..y..")

the teleporter is like this:

		when 10682.click begin
			if game.get_event_flag("evento_pvm") == 1 then
				local x = mysql_query("SELECT x FROM eventos WHERE tipo='pvm'")
				local y = mysql_query("SELECT y FROM eventos WHERE tipo='pvm'")			
				local pvm = select ("Participar", "Cancelar")
				if pvm == 1 then
					pc.warp("..x..", "..y..")
				elseif pvm == 2 then
					return
				end
			end

but this isn't teleporting, when I select "Participar" dosen't do nothing, but if I put the coordinates directly in the quest (6843400, 999900) this teleports, the table has the coordinates with the 00.

 

someone can help me with this problem?

 

Thanks everyone

raw

raw

Link to comment
Share on other sites

  • Management

 

change this

pc.warp("..x..", "..y..")

on

pc.warp(x, y)

 

dosen't work :S

		when 10682.click begin
			if game.get_event_flag("evento_pvm") == 1 then
				local x = mysql_query("SELECT x FROM player.eventos WHERE tipo='pvm'")
				local y = mysql_query("SELECT y FROM player.eventos WHERE tipo='pvm'")			
				local pvm = select ("Participar PvM", "Cancelar")
				if pvm == 1 then
					pc.warp(x, y)
				elseif pvm == 2 then
					return
				end
			end
		end

raw

raw

Link to comment
Share on other sites

  • Management

pc.warp(x.x[1], y.y[1])

 

#Solved

 

Thank you very much, now is working!

 

Just one more question:

 

To set the minimun lvl how can I do?

 

I have this:

			if game.get_event_flag("evento_pvm") == 1 then
				local x = mysql_query("SELECT x FROM player.eventos WHERE tipo='pvm'")
				local y = mysql_query("SELECT y FROM player.eventos WHERE tipo='pvm'")	
				local lvl = mysql_query("SELECT lvl FROM player.eventos WHERE tipo='pvm'")
				local pvm = select ("Participar PvM", "Cancelar")
				if pvm == 1 then
					pc.warp(x.x[1], y.y[1])
				elseif pvm == 2 then
					return
				end
			end

where I put the lvl verification?

 

Thanks

raw

raw

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.