Management Karbust 4913 Posted July 24, 2014 Management Share Posted July 24, 2014 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 Link to comment Share on other sites More sharing options...
Management Karbust 4913 Posted July 25, 2014 Author Management Share Posted July 25, 2014 BUMP Link to comment Share on other sites More sharing options...
Management Karbust 4913 Posted July 26, 2014 Author Management Share Posted July 26, 2014 BUMP Link to comment Share on other sites More sharing options...
Vincent 3 Posted July 26, 2014 Share Posted July 26, 2014 change this pc.warp("..x..", "..y..") on pc.warp(x, y) 1 Link to comment Share on other sites More sharing options...
Management Karbust 4913 Posted July 26, 2014 Author Management Share Posted July 26, 2014 I go try again, I already tried that, but I think it wasn't with the new way thanks for your reply Link to comment Share on other sites More sharing options...
Management Karbust 4913 Posted July 26, 2014 Author Management Share Posted July 26, 2014 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 Link to comment Share on other sites More sharing options...
Krixius 13 Posted July 26, 2014 Share Posted July 26, 2014 pc.warp(x.x[1], y.y[1]) #Solved 1 Link to comment Share on other sites More sharing options...
Management Karbust 4913 Posted July 26, 2014 Author Management Share Posted July 26, 2014 I'm go try thanks for your reply Link to comment Share on other sites More sharing options...
Management Karbust 4913 Posted July 27, 2014 Author Management Share Posted July 27, 2014 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 Link to comment Share on other sites More sharing options...
Krixius 13 Posted July 28, 2014 Share Posted July 28, 2014 if pvm == 1 then if pc.get_level() >= 60 then say("Sorry, you dont have the required minimum level for warp") else pc.warp(x.x[1], y.y[1]) end 1 Link to comment Share on other sites More sharing options...
Management Karbust 4913 Posted July 28, 2014 Author Management Share Posted July 28, 2014 but the minimum lvl is defined by the gm who activate the event, and before the npc go to te MySQL table and see what is the minimum lvl, like the my last post thanks for your reply Link to comment Share on other sites More sharing options...
Krixius 13 Posted July 28, 2014 Share Posted July 28, 2014 (edited) I think thats the reply you're searching. Kind Regards. Akroma PD: if you need exclusive events for your server in lua, add me to skype im not so expensive with that things. magical3200 Edited August 17, 2022 by Metin2 Dev Core X - External 2 Internal 1 Link to comment Share on other sites More sharing options...
Management Karbust 4913 Posted July 28, 2014 Author Management Share Posted July 28, 2014 it's that, but is possible do it for te npc see the level on db?? Link to comment Share on other sites More sharing options...
Krixius 13 Posted July 28, 2014 Share Posted July 28, 2014 why you need the lv on the db, i dont understand that really ._. its the same than use event_flag 1 Link to comment Share on other sites More sharing options...
Management Karbust 4913 Posted July 28, 2014 Author Management Share Posted July 28, 2014 you right, is the same It's working, thank you! Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now