I got bored just now and decided to whip up a quick gotoloc and saveloc script for sansan. Admittedtly the alias's have come from Tommis' GUS 9.0 ;)
on *:SIGNAL:vcmp.event.gamecmd {
elseif ($2 == !gotoloc) {
if (!$3) vcmp.adminmsg $1 Error - Missing Information, $2 <Name>
elseif (!$vcmp.name.getloc($3-)) vcmp.adminmsg $1 Error - Absent/Wrong Location Name
else {
vcmp.adminmsg $1 Taking you to location name: $chr(91) $vcmp.name.getloc($3-) $chr(93)
vcmp.setloc $1 $vcmp.axis.getloc($3-)
}
}
elseif ($2 == !saveloc) {
if (!$3) vcmp.adminmsg $1 Error - Missing Information, $2 <Name>
else {
vcmp.adminmsg $1 Location Saved - Name: $chr(91) $3- $chr(93)
!writeini -n vcmp.locations.ini LOCATIONS $round($vcmp.hgetpos.x($1),3) $+ , $+ $round( $vcmp.hgetpos.y($1),3) $+ , $+ $round( $vcmp.hgetpos.z($1)),3) $3-
}
}
;--- Go To Loc Alias'
alias vcmp.name.getloc {
var %a = 0
while (%a <= $ini(vcmp.locations.ini,LOCATIONS,0)) {
if ($1 isin $readini(vcmp.locations.ini,LOCATIONS,$ini(vcmp.locations.ini,LOCATIONS,%a))) !return $readini(vcmp.locations.ini,LOCATIONS,$ini(vcmp.locations.ini,LOCATIONS,%a))
!inc %a
}
}
alias vcmp.axis.getloc {
var %a = 0
while (%a <= $ini(vcmp.locations.ini,LOCATIONS,0)) {
if ($1 isin $readini(vcmp.locations.ini,LOCATIONS,$ini(vcmp.locations.ini,LOCATIONS,%a))) !return $gettok($ini(vcmp.locations.ini,LOCATIONS,%a),1,44) $gettok($ini(vcmp.locations.ini,LOCATIONS,%a),2,44) $gettok($ini(vcmp.locations.ini,LOCATIONS,%a),3,44)
!inc %a
}
}
Quote from: [SDT]F_T_F0RC3 on July 26, 2008, 03:34:09 PM
come from VRocker's GUS 9.0 ;)
hmm, since when is GUS 9.0 of vRocker? :-\ :P
Well whoever made it :P I thought it was VRocker
Tommis ;)
Quote*These scripts have been wrote fully by me, but i still leave Vrocker's name in there, because without him, i wouldnt of made these scripts
Hey,
I completely URGE you to stay away from this. Get rid of the "loc find loop". Once your ini get's too big, every query will go through every single line trying to find the closest match, causing insane amounts of CPU usage (almost always hanging the scripts).
As in my new scripts, just make it go by exact name. And its not case sensitive, so this should work perfectly.
Regards,
Tommis
Same thing happened to me with the pickups.
Try not to search inis with loops in any case.
Using hashes would be a good idea.
My own computer used to run for a hundred miles before giving the result from my pickup ini.
//Windlord
Hmm this script didnt do anything for me, but i trying ???
Yikes... it's like a flame war has unleashed here. K.I.S.S, bazza, stop it, or you'll be banhammered. Stunty2008, don't accuse people of stealing code without referring to a valid source.
Bazza, you are the one offending and insulting people and Force is the one donating pieces of code and being polite to others. Do yourself a favor and leave him alone.
Doesnt work 4 me says Bad Command im workng on how to fix it
For me also........ :(