Author Topic: gotoloc \save loc for wsv  (Read 4629 times)

0 Members and 1 Guest are viewing this topic.

Offline qwq

  • Street Thug
  • *
  • Posts: 28
    • View Profile
gotoloc \save loc for wsv
« on: October 20, 2009, 01:47:45 pm »
k i have tamas code:
  if ($4) {
    if (!$hget(WSV.Savedlocks,$4)) {
      hadd WSV.Savedlocks $4 $calc($WSV.location($2).x) $calc($WSV.location($2).y) $calc($WSV.location($2).z)
      WSV.msg $2 Location saved sucessfully! Name: $chr(91) $4 $chr(93)
      WSV.msg $2 Coord: $calc($WSV.location($2).x) $calc($WSV.location($2).y) $calc($WSV.location($2).z)
    }
    else WSV.msg $2 Error: This location name is allready saved!
  }
  else WSV.msg $2 Syntax: /c saveloc <locname>
}
elseif ($3 == gotoloc) && ($2 < 100) {
  WSV.cmdlevelcheck $1-
  if ($4) {
    if ($hget(WSV.Savedlocks,$4)) {
      WSV.setlocation $2 $WSV.savedloc($4)
      WSV.say Teleporting: $WSV.name($2) To: $chr(91) $4 $chr(93)
      WSV.msg $2 Location: $WSV.savedloc($4)
    }
    else WSV.msg $2 Error: This location name is not on the saved list.
  }
  else WSV.msg $2 Syntax: /c gotoloc <locname>
}



i put it in the end of wsv
and when i do the cmds its not work say invalid

and with greg lms i load it
it wrote this:HEF (Universal Public Version) LastManStanding Module v1.0 by Greg
---
-
Status - Successfully Loaded.
-
and no lms

what to do

Offline [XT]ariel[X]

  • Wiseguy
  • **
  • Posts: 58
  • Hi all!!
    • View Profile
    • American Server
Re: gotoloc \save loc for wsv
« Reply #1 on: October 21, 2009, 01:23:47 am »
hey scripts create"Repost"....
Clic in image from enter in my web :D

Offline qwq

  • Street Thug
  • *
  • Posts: 28
    • View Profile
Re: gotoloc \save loc for wsv
« Reply #2 on: October 21, 2009, 03:23:40 pm »
thx rulk ill try
but the lms is not inside the wsv
is in different file

Offline qwq

  • Street Thug
  • *
  • Posts: 28
    • View Profile
Re: gotoloc \save loc for wsv
« Reply #3 on: October 22, 2009, 05:11:02 pm »
not working

Offline thijn

  • LU testers
  • VC:MP Veteran
  • *
  • Posts: 667
  • Im proud to be pro.
    • View Profile
    • Vice Underdogs
Re: gotoloc \save loc for wsv
« Reply #4 on: October 22, 2009, 06:27:00 pm »
Try this modified one:
Code: [Select]
on *:START:{
  echo -s -----
  echo -s HEF (Universal Public Version) LastManStanding Module $hef.lms.version by Greg
  echo -s ---
  echo -s -
  echo -s Status - Successfully Loaded.
  echo -s -
}

alias hef.startlms {

  var %i = 1
  set %lmslock = 1

  if ($hget(lms, 0).item <= 1) {
    WSV.say ** LastManStanding has Rejected. Reason: Not enough Players
    if ($hget(lms, 0).item == 1) {
      WSV.setcontrols $WSV.getid($hget(lms, 1).item) 1
      WSV.setarmour $WSV.getid($hget(lms, 1).item) 0
    }
    hfree lms
    unset %lms
    unset %lmslock
    !halt
  }

  else {

    .timerann $+ 1 1 2 hef.annlms $1 ~h~-- GET READY! --
    .timerann $+ 2 1 5 hef.annlms $1 -- 3 --
    .timerann $+ 3 1 6 hef.annlms $1 ~y~-- 2 --
    .timerann $+ 4 1 7 hef.annlms $1 ~y~-- 1 --
    .timerann $+ 5 1 9 hef.annlms $1 ~t~-- FIGHT! --
    .timerrestcontlms 1 8 hef.restcontlms $1
  }
}

alias hef.lms.version !return v1.0

alias hef.annlms {

  var %i = 1

  while ($hget(lms, %i).item != $null) {

    WSV.announce $WSV.getid($hget(lms, %i).item) $2-
    inc %i
  }
}

alias hef.restcontlms {

  var %i = 1

  while ($hget(lms, %i).item != $null) {

    WSV.setcontrols $WSV.getid($hget(lms, %i).item) 1
    inc %i
  }
}


on *:signal:WSV.commands: {

if ($3 == lms) {

  if (%lms == on) || ($hget(lms, 0).item != 0) {
    WSV.msg $2 Error - LastManStanding is Already in Progress!
  }

  else {

    hmake lms
    set %lms on

    timer 1 1 WSV.say ** LastManStanding has Started! To Join, type !join Within 20 Seconds.
    timer 1 20 hef.startlms
  }
}

elseif ($3 == join) {

  if (!%lms) WSV.msg $2 Error - LastManStanding is not Active!
  elseif ($hget(lms, $WSV.name($2)) != $null) WSV.msg $2 Error - You Already joined LastManStanding.
  elseif (%lmslock) WSV.msg $2 Error - You Must Wait Until this Round of LMS Ends.
  else {
    hadd -m lms $WSV.name( $2) 1
    WSV.say ** $WSV.name($2) has joined LastManStanding!
    WSV.msg $2 Taking you to LastManStanding. Enjoy!
    WSV.setlocation $2 -754.187866 -1602.638916 23.734970
    WSV.setcontrols $2 0
    WSV.setarmour $2 100
    WSV.sethealth $2 100
  }
}

}

on *:SIGNAL:WSV.kill {

  if ($hget(lms, 0).item != 0) {
    if ($hget(lms, 0).item == 2) && ($hget(lms, $WSV.name($2)) != $null) {
      hdel lms $WSV.name($2)

      if ($hget(lms, 1).item == $null) {
        WSV.say ** LastManStanding has Ended. Winner: No Winner
      }
      else {
        WSV.say ** LastManStanding has Ended. Winner: $hget(lms, 1).item
        WSV.announce $WSV.getid($hget(lms, 1).item) ~h~ $chr(32) $+ congratulations! ~t~you won lastmanstandig!
      }
      hfree lms
      unset %lms
      unset %lmslock
    }
    elseif ($hget(lms, 0).item >= 3) hdel lms $WSV.name($2)
  }
}

on *:SIGNAL:WSV.part: {

  if ($hget(lms, 0).item != 0) {
    if ($hget(lms, 0).item == 2) && ($hget(lms, $WSV.name($2)) != $null) {
      hdel lms $WSV.name($2)

      if ($hget(lms, 1).item == $null) {
        WSV.say ** LastManStanding has Ended. Winner: No Winner
      }
      else {
        WSV.say ** LastManStanding has Ended. Winner: $hget(lms, 1).item
        WSV.announce $WSV.getid($hget(lms, 1).item) ~h~ $chr(32) $+ congratulations! ~t~you won lastmanstandig!
      }
      hfree lms
      unset %lms
      unset %lmslock
    }
    elseif ($hget(lms, 0).item >= 3) hdel lms $WSV.name($2)
  }
}

Offline qwq

  • Street Thug
  • *
  • Posts: 28
    • View Profile
Re: gotoloc \save loc for wsv
« Reply #5 on: October 23, 2009, 01:07:46 pm »
i already did wsv instead vcmp
but when i load it it say it on but when i do !lms its says invalid command

Offline thijn

  • LU testers
  • VC:MP Veteran
  • *
  • Posts: 667
  • Im proud to be pro.
    • View Profile
    • Vice Underdogs
Re: gotoloc \save loc for wsv
« Reply #6 on: October 25, 2009, 12:40:47 am »
did you tried my version?

Offline qwq

  • Street Thug
  • *
  • Posts: 28
    • View Profile
Re: gotoloc \save loc for wsv
« Reply #7 on: October 28, 2009, 03:07:11 pm »
the one u post here?

Offline [XT]ariel[X]

  • Wiseguy
  • **
  • Posts: 58
  • Hi all!!
    • View Profile
    • American Server
Re: gotoloc \save loc for wsv
« Reply #8 on: November 01, 2009, 10:41:03 am »
not is the one several post to saveloc and gotoloc for WSV -.-!
   
improved the script  :D

Code: (Saveloc) [Select]
    elseif ($3 == saveloc) {
      if ($4) {
        writeini -n " $+ $scriptdirSavedLocs.ini" SavedLocs $4 $WSV.location($2)
        WSV.say ยป New Location - Nombre: $WSV.name($2) - Name Saveloc: $4
      }
      else WSV.msg $2 Error - Format: !saveloc <Name> or /c Saveloc <Name>
    }
Code: (Gotoloc) [Select]
    elseif ($3 == gotoloc) {
      if ($readini(" $+ $scriptdirSavedLocs.ini",SavedLocs,$4)) {
        .timer 1 5 /WSV.setlocation $2 $readini(" $+ $scriptdirSavedLocs.ini",SavedLocs,$4)
        WSV.announce $2 ~h~Teleporting to $4
      }
      else WSV.msg $2 Error - Invalid Location.
    }
Clic in image from enter in my web :D