Register for your free account! | Forgot your password?

You last visited: Today at 14:07

  • Please register to post and access all features, it's quick, easy and FREE!

 

A guide to waypointing

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Jul 2005
Posts: 303
Received Thanks: 2
Not grown on my dung but quite useful for making quests and stuff with new added NPCs^^

taken from a post at blizzhackers, credits go to southern

WAYPOINTS

.recroute
.addwp
.saveroute
.rescp

Hi there, this waypoint system I am using in my World save and it works brilliantly.



Please note, when setting a way point after you have created a route, do not assign the waypoint to the npc! Assign it to it's spawn point! Otherwise, if npc killed, he will not resume route. I found this out myself, heh. Actually, I will post the macros I use for route creation:

1) .recroute -> creates the starting point of the route

2) .addwp -> repeat as necessary as you move forward to create the route you want for the npc

3) .saveroute -> do this once your route is complete. NOTE: YOU MUST CREATE A ROUTE THAT LOOPS ON ITSELF, OTHERWISE YOUR NPC WILL REACH THE END OF THE ROUTE AND PROMPTLY DISAPPEAR AS IT FLOATS BACK TO ITS STARTING POINT!

Also, make a note of the end waypoint number and the starting waypoint number

4) .rescp -> you need to reload the scp so that the waypoint takes effect

5) .setwp <number of first waypoint of route) -> click on spawnpoint first

6) spawn the relevant npc you want and watch as it goes it merry way

A useful tip is to create the spawn point first, but not necessarily the npc, so that when you create the route you know where to end on the way back.

You need to create a waypoints.scp file in the scripts folder of your W0W server.

Also, DO MAKE A NOTE OF THE ROUTES YOU CREATE BECAUSE YOU WILL LOSE TRACK OF WHAT IS WHAT&#33;&#33;

You need the following in the command.tcl file, if this is already there, then great:

"setwp" { return [Commands::setwp &#036;player &#036;cargs] }
"addwp" { return [Commands::addwp &#036;player &#036;cargs] }
"showwp" { return [Commands::showwp &#036;player &#036;cargs] }
"recroute" { return [Commands::recroute &#036;player &#036;cargs] }
"saveroute" { return [Commands::saveroute &#036;player &#036;cargs] }

AND:

proc setwp { player cargs} {
if {[GetPlevel &#036;player]<4} {return "You are not allowed to use this command"}
if {&#33;[string is integer &#036;cargs]} {return "This waypoint doesn&#39;t exist&#33;"}
SetWayPoint [GetSelection &#036;player] &#036;cargs
return "OK: WP &#036;cargs set for selected NPC"
}

proc addwp { player cargs } {
if {[GetPlevel &#036;player]<4} {return "You are not allowed to use this command"}
set pname [GetName &#036;player]
if {[file exists "scripts/recwaypoints"]} {
set recroutefile [open "scripts/recwaypoints" r]
set latestadded [gets &#036;recroutefile]
set firstofroute [gets &#036;recroutefile]
close &#036;recroutefile
} else {
set latestadded 0
}
set hwaypoint [open "scripts/LatestWaypoint.txt" r]
set LatestWayP [expr { [gets &#036;hwaypoint] + 1 }]
close &#036;hwaypoint
set curPos [GetPos &#036;player]
set map [lindex &#036;curPos 0]
set x [lindex &#036;curPos 1]
set y [lindex &#036;curPos 2]
set z [lindex &#036;curPos 3]
if {&#036;latestadded==0} {
set hwaypointout [open "scripts/waypoints.scp" "a+"]
} else {
set hwaypointout [open "scripts/waypoints.scp" "a+"]
puts &#036;hwaypointout "next=&#036;LatestWayP&#092;n"
}
set outline1 {[point }
set outline2 {]}
puts &#036;hwaypointout "&#036;outline1&#036;LatestWayP&#036;outline2"
if {&#036;latestadded==0} {
puts &#036;hwaypointout "pos=&#036;x &#036;y &#036;z&#092;n"
} else {
puts &#036;hwaypointout "pos=&#036;x &#036;y &#036;z"
}
close &#036;hwaypointout
set hwaypoint [open "scripts/LatestWaypoint.txt" w]
puts &#036;hwaypoint &#036;LatestWayP
close &#036;hwaypoint
if {&#036;latestadded==0} {
return "Waypoint &#036;LatestWayP created."
} else {
set recroutefile [open "scripts/recwaypoints" w]
puts &#036;recroutefile &#036;LatestWayP
puts &#036;recroutefile &#036;firstofroute
close &#036;recroutefile
return "Waypoint &#036;LatestWayP created for route and linked to Waypoint &#036;latestadded."
}
}

proc showwp { player cargs } {
if {[GetPlevel &#036;player]<4} {return "You are not allowed to use this command"}
if {&#33;[string is integer &#036;cargs]} {return "This waypoint doesn&#39;t exist&#33;"}
set curPos [lrange [string trim [split [GetScpValue "waypoints.scp" "point &#036;cargs" "pos"]] "&#092;&#092;&#092;{&#092;}"] end-3 end]
set x [expr {round([lindex &#036;curPos 0])}]
set y [expr {round([lindex &#036;curPos 1])}]
SendPOI &#036;player 2 &#036;x &#036;y 6 1637 "WayPoint &#036;cargs"
return "WayPoint &#036;cargs shown."
}

proc recroute { player cargs } {
if {[GetPlevel &#036;player]<4} {return "You are not allowed to use this command"}
set pname [GetName &#036;player]
if {[file exists "scripts/recwaypoints"]} {
return "Finish current route before creating another one&#33;"
}
set hwaypoint [open "scripts/LatestWaypoint.txt" r]
set LatestWayP [expr { [gets &#036;hwaypoint] + 1 }]
close &#036;hwaypoint
set curPos [GetPos &#036;player]
set map [lindex &#036;curPos 0]
set x [lindex &#036;curPos 1]
set y [lindex &#036;curPos 2]
set z [lindex &#036;curPos 3]
set hwaypointout [open "scripts/waypoints.scp" "a+"]
set outline1 {[point }
set outline2 {]}
puts &#036;hwaypointout "&#036;outline1&#036;LatestWayP&#036;outline2"
puts &#036;hwaypointout "pos=&#036;x &#036;y &#036;z"
close &#036;hwaypointout
set hwaypoint [open "scripts/LatestWaypoint.txt" w]
puts &#036;hwaypoint &#036;LatestWayP
close &#036;hwaypoint
set recroutefile [open "scripts/recwaypoints" w]
puts &#036;recroutefile [expr &#036;LatestWayP - 1]
# then to record the first one
puts &#036;recroutefile &#036;LatestWayP
close &#036;recroutefile
return "Route begun."
}

proc saveroute { player cargs } {
if {[GetPlevel &#036;player]<4} {return "You are not allowed to use this command"}
set pname [GetName &#036;player]
if {[file exists "scripts/recwaypoints"]} {
set recroutefile [open "scripts/recwaypoints" r]
set latestadded [gets &#036;recroutefile]
set firstofroute [gets &#036;recroutefile]
close &#036;recroutefile
set nothing [file delete "scripts/recwaypoints"]
set hwaypointout [open "scripts/waypoints.scp" "a+"]
puts &#036;hwaypointout "next=&#036;firstofroute&#092;n"
close &#036;hwaypointout
return "Route saved, WayPoint &#036;latestadded linked to WayPoint &#036;firstofroute."
} else {
return "Begin a route before trying to save it&#33;"
}
}

Cheers fenger



seth0815 is offline  
Old   #2
 
elite*gold: 0
Join Date: Aug 2005
Posts: 420
Received Thanks: 36
ich tippe auf Ctrl+C/Ctrl+V^^

/edit jaaa ok du hasts net selber geschrieben, seh ich jetz gard das du das erwähnst^^


gangsta is offline  
Reply



« Previous Thread | Next Thread »

Similar Threads
[GUIDE]Wieder ein neuer Level-Guide!+30 NEUE OX FRAGEN*Schwer*
So habe mir mal die Mühe gemacht um euch zu sagen wo man am besten Levelt: Level 1-5 -Bei den Wildhunden/Hungrigen...
6 Replies - Metin2 PServer Guides & Strategies
[GUIDE] How to Skill Guide für alle Klassen (Teil 1/2 Krieger und Ninjas)
So hier ist mein erster Guide hoffe er gefällt euch 1. Der Krieger 1.1 Der Körper Krieger Die Vorteile des Körper-Kriegers ( KK )...
3 Replies - Metin2 Guides & Templates
[GUIDE] Item Filter Guide | Cabal Crafting & Dungeon Guide by Dewa Gempak.
Since its his work, just SHARING it here, i just gonna link his URL from his work. because i dont like copy and pasting other ppl's guides: ...
5 Replies - Cabal Guides & Templates



All times are GMT +2. The time now is 14:07.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Abuse
Copyright ©2017 elitepvpers All Rights Reserved.