|
You last visited: Today at 18:41
Advertisement
[LUA-FUNCTION] Check coordinate on a map.
Discussion on [LUA-FUNCTION] Check coordinate on a map. within the Metin2 PServer Guides & Strategies forum part of the Metin2 Private Server category.
03/08/2013, 20:42
|
#1
|
elite*gold: 0
Join Date: Jan 2010
Posts: 328
Received Thanks: 434
|
[LUA-FUNCTION] Check coordinate on a map.
Hello community.
Here is original thread ( just prototype ):
With this LUA function you can check your player coordinates.
Add this function to questlib.lua
Quote:
function check_range(x,y,range)
get_x = pc.get_local_x()
get_y = pc.get_local_y()
x1 = x-range
y1 = y-range
x2 = x+range
y3 = y+range
if (get_x > x1 and get_x < x2) and (get_y > y1 and get_y < y3) then
return true
else
return false
end
end
|
Then add this function to your quest_functions file.
check_range
Here is use example quest:
Quote:
-- By -TURK- --
quest check_coord begin
state start begin
when login with pc.get_map_index() == 41 begin
loop_timer("check_coords", 1) -- 1 second
end
when check_coords.timer begin
if check_range(377,576,10) == true then
chat("You're near to Ah-Yu!")
-- pc.warp(x,y)
end
end
end
end
|
/go c1
Go near to Ah-Yu and Voila!
Enjoy  ..
|
|
|
03/08/2013, 21:00
|
#2
|
elite*gold: 0
Join Date: Dec 2008
Posts: 2,825
Received Thanks: 1,538
|
nice !
good to script new events
|
|
|
03/08/2013, 21:03
|
#3
|
elite*gold: 50
Join Date: Nov 2009
Posts: 865
Received Thanks: 1,228
|
Das bringt mich auf Ideen , sauber sowas.
Vielen Dank.
|
|
|
03/08/2013, 21:04
|
#4
|
elite*gold: 0
Join Date: Jun 2012
Posts: 12
Received Thanks: 5
|
great
|
|
|
03/08/2013, 21:06
|
#5
|
elite*gold: 0
Join Date: Jun 2012
Posts: 293
Received Thanks: 200
|
Tskr 
Danke
|
|
|
03/08/2013, 21:20
|
#6
|
elite*gold: 205
Join Date: Jun 2010
Posts: 5,334
Received Thanks: 2,510
|
sehr gut sehr brauchbar danke danke
|
|
|
03/08/2013, 21:21
|
#7
|
elite*gold: 0
Join Date: Feb 2012
Posts: 262
Received Thanks: 200
|
Quote:
Originally Posted by -TÜRK-
Hello community.
Here is original thread ( just prototype ):
With this LUA function you can check your player coordinates.
Add this function to questlib.lua
Then add this function to your quest_functions file.
check_range
Here is use example quest:
/go c1
Go near to Ah-Yu and Voila!
Enjoy  ..
|
And what can you do with that?
Maybe a mission with how kill a monster in a range?
|
|
|
03/08/2013, 21:28
|
#8
|
elite*gold: 0
Join Date: Jan 2010
Posts: 328
Received Thanks: 434
|
Quote:
Originally Posted by MrGanja
And what can you do with that?
Maybe a mission with how kill a monster in a range?
|
Huh ^^ Great Idea. Or event rules..
|
|
|
03/08/2013, 21:30
|
#9
|
elite*gold: 0
Join Date: Feb 2012
Posts: 262
Received Thanks: 200
|
Quote:
Originally Posted by -TÜRK-
Huh ^^ Great Idea. Or event rules..
|
I think it's *** for event PvP.
|
|
|
03/08/2013, 21:32
|
#10
|
elite*gold: 191
Join Date: May 2009
Posts: 1,214
Received Thanks: 2,597
|
You can mark Ah-Yu as target for the same effect.. Same game with positions ( target.pos - command) and Players ( target.pc - command). <:
At last you can check whether you are near a npc / pc with pc.is_near_vid...
The command you show here isn't that tricky as someone think, but maybe someone would need it
You could use your Command for generating special Fields on a map with a bonus while you are standing in it bla..
|
|
|
03/08/2013, 21:33
|
#11
|
elite*gold: 0
Join Date: Aug 2011
Posts: 336
Received Thanks: 37
|
or a function who can only use it when you in rage as a boss example
|
|
|
03/08/2013, 21:37
|
#12
|
elite*gold: 0
Join Date: Jan 2010
Posts: 328
Received Thanks: 434
|
Quote:
Originally Posted by MrGanja
I think it's *** for event PvP.
|
> Ninja, bow race  .
|
|
|
03/08/2013, 21:38
|
#13
|
elite*gold: 0
Join Date: Feb 2012
Posts: 262
Received Thanks: 200
|
Quote:
Originally Posted by Mijago
You can mark Ah-Yu as target for the same effect.. Same game with positions ( target.pos - command) and Players ( target.pc - command). <:
At last you can check whether you are near a npc / pc with pc.is_near_vid...
The command you show here isn't that tricky as someone think, but maybe someone would need it
You could use your Command for generating special Fields on a map with a bonus while you are standing in it bla..
|
This is a circle now a target lol what the **** you tall
|
|
|
03/08/2013, 21:39
|
#14
|
elite*gold: 0
Join Date: Jan 2010
Posts: 328
Received Thanks: 434
|
Quote:
Originally Posted by Mijago
You can mark Ah-Yu as target for the same effect.. Same game with positions ( target.pos - command) and Players ( target.pc - command). <:
At last you can check whether you are near a npc / pc with pc.is_near_vid...
The command you show here isn't that tricky as someone think, but maybe someone would need it
You could use your Command for generating special Fields on a map with a bonus while you are standing in it bla..
|
+ one more good idea ^^
|
|
|
03/08/2013, 21:39
|
#15
|
elite*gold: 0
Join Date: Jan 2013
Posts: 489
Received Thanks: 495
|
DE: Ach du scheiße die Türken attackieren mit Bombenreleases EPvP Saubere Arbeit der junge haut einen nach dem anderen raus hammer!
TR: Yuch be türkler yine elitepvpersi hucumluyor bombareleaslerle Saglam is bu cocuk birden birini disariya vuruyor!
Kind Regards
Prince43™
|
|
|
 |
|
Similar Threads
|
Game Check Client Version Function + DIF [Like Pong]
05/07/2014 - Metin2 PServer Guides & Strategies - 47 Replies
Hello community.
What is this function?
This function allows to notify update your client.
All new binaries no longer using pong. Just using this finger print instead.
When client version(.exe) not equal with game file client version, game automatically will kick player with a notice. (In 10 Second.)
I think this function is more useful than pong. So, if you encrypt good your client you can use this like pong...
|
CSS Map: Host_EndGame: Map coordinate extents are too large!! Check for errors!
12/11/2012 - Counter-Strike - 9 Replies
Hey,
als ich das gelesen habe, dachte ich WTF???
Guckt euch die Screens an. NULL außer dem Grid. Bei Fehlersuche nur info_player_spawn, was unötig ist für CSS.
Log im Anhang
|
Coordinate
10/17/2012 - Dekaron - 6 Replies
There is process to grab from dekaron the coordinate X and Y of the character?
|
COnquer coordinate in cartesian coordinate ?
02/07/2011 - CO2 Programming - 5 Replies
i m working on my minimap in pro4never proxy, i cleaning map from coquer site and put in picture box
now i want to locate my char in this minimap likes in game :) but the coordinate in game are different view of classic cartesian coordinate :)
some1 had module to trasform Conquer coordinate in cartesian coordinate ?
or explain me why cood traslation in math not work :// :handsdown:
i m working on this sistem
|
z-coordinate
07/06/2010 - Aion Private Server - 0 Replies
anyone managed to manipulate the in game z-position? (overground, standing above the ground without flying...)
found the value as float via uce but nothing happens when i freeze or change it -.-
greetz
|
All times are GMT +1. The time now is 18:41.
|
|