Vice City Multiplayer

VC:MP 0.3 => mIRC/pawn Scripting => Topic started by: Dudu on October 07, 2009, 06:14:31 pm

Title: How to weather?...
Post by: Dudu on October 07, 2009, 06:14:31 pm
Hy!
Need this script: random weather after 10 minutes.
Anything help me?
Thx!
Title: Re: How to weather?...
Post by: Mattz on October 07, 2009, 10:54:51 pm
err. Which scripts are you using FBS, GUS or WSV?
Title: Re: How to weather?...
Post by: Dudu on October 08, 2009, 11:20:31 pm
err. Which scripts are you using FBS, GUS or WSV?

GUS
Title: Re: How to weather?...
Post by: Mattz on October 09, 2009, 04:50:44 pm
Try this, I dont remember if 'timer 0' works in mirc Yea it does work

Code: [Select]
on *:SIGNAL:vcmp.connected:{

 ;This selects a random weather from 0 to 9
 var %rweather = $rand(0,9)

  ;This sets a different weather every 10 mins
 .timer 0 600 vcmp.setweather %rweather

}

on *:DIALOG:vcmp.dialog:sclick:2:{
 
   ;Kills all the timers
   .timers off
 
}
Title: Re: How to weather?...
Post by: MrAcmering on October 10, 2009, 11:38:09 am
I'm using FBS...  ::) can anyone give me the weather cmd?
Title: Re: How to weather?...
Post by: creepers on October 10, 2009, 12:46:16 pm
D: fbs has the weather cmd

/c sw
Title: Re: How to weather?...
Post by: Javi on October 10, 2009, 01:47:56 pm
Here's the script I worked on. It's kind of XE's !gw, but for every level and using /c

Command: /c gw <Any number here>
Scripts: Requires FBSV0.2
Code: [Select]
 }  
elseif ($3 == gw) {
    if ($FBS.lin($1, $2) == $null) vcmp.msg $1 $2 You must either register or be logged in.
    elseif ($FBS.Level($1, $2) < 1) vcmp.msg $1 $2 Error, You must either register or be logged in.
    elseif ($4 !isnum) vcmp.msg $1 $2 Error - Correct Syntax: /c $3
    else {
      vcmp.setweather $1 4
      vcmp.settime $1 12 00
      vcmp.say $1 ** $vcmp.name($1, $2) set good weather!
    }
STATUS: Working
Title: Re: How to weather?...
Post by: MrAcmering on October 10, 2009, 05:12:25 pm
ty forze, but for weather changing every 10 mins? (FBS0.2)
Title: Re: How to weather?...
Post by: Force on October 10, 2009, 05:23:08 pm
Code: [Select]
on *:SIGNAL:vcmp.connected:{
  ;This sets a different weather every 10 mins
 .timer 0 600 vcmp.chooseweather
}

alias vcmp.chooseweather
{
  var %weather = $rand(0,9)
  vcmp.setweather %weather
}

Note: UNTESTED

I haven't done mIRC for a long time so no idea if that works or not.
Title: Re: How to weather?...
Post by: Javi on October 10, 2009, 05:28:57 pm
Here's my attempt  :P

Code: [Select]
  elseif ($3 == rw) {
    if ($FBS.lin($1, $2) == $null) vcmp.msg $1 $2 You must either register or be logged in as Admin Level 5.
    elseif ($FBS.Level($1, $2) < 5) vcmp.msg $1 $2 Error, You must be at least Admin Level 5.
    elseif ($4 !isnum) vcmp.msg $1 $2 Error - Correct Syntax: /c $3
    else {
      var %rweather = $rand(0,9)
      set %rw on
      timer 1 1 vcmp.setweather $1 %rweather
      timer 1 1 vcmp.say $1 ** Weather changed automatically.
      timer 1 600 vcmp.setweather $1 %rweather
      timer 1 600 vcmp.say $1 ** Weather changed automatically.
      timer 1 1200 vcmp.setweather $1 %rweather
      timer 1 1200 vcmp.say $1 ** Weather changed automatically.
      timer 1 1800 vcmp.setweather $1 %rweather
      timer 1 1800 vcmp.say $1 ** Weather changed automatically.
      timer 1 2400 vcmp.setweather $1 %rweather
      timer 1 2400 vcmp.say $1 ** Weather changed automatically.
      timer 1 3000 vcmp.setweather $1 %rweather
      timer 1 3000 vcmp.say $1 ** Weather changed automatically.
      timer 1 3600 vcmp.setweather $1 %rweather
      timer 1 3600 vcmp.say $1 ** Weather changed automatically.
      timer 1 3600 vcmp.say $1 ** Random Weather has finished.
      timer 1 3600 set %rw off
    }

This will set a random weather every 10 minutes, after an hour, it will stop.
If you want do activate it do: /c rw

NOTE:
Not tested
Title: Re: How to weather?...
Post by: thijn on October 11, 2009, 09:32:34 pm
^^This will not set the weather randomly.
This will set the weather every 10 mins to thesame weather as it was 10 mins before.
Title: Re: How to weather?...
Post by: Javi on October 11, 2009, 10:12:36 pm
Really?  :o

I thought the var:
      var %rweather = $rand(0,9)
Would set a variable that changes, from 1 to 9  ???
Title: Re: How to weather?...
Post by: [AoD]NC on October 11, 2009, 10:39:56 pm
Forze, this will choose a weather id from 0 to 9. But this will choose only once.

Example:
It will chose the number 5. And every time the weather will be "changed" to 5 v_v.
Create a new function and then call it :0 [like Force]. Or do like Mattz [if this code isnt tammered ofc :D ].

And btw instead of creating hundreds of timers with message "weather changed" do a "repeat timer" Like timer 5 60 [calling 5 times every 60 secs].
Title: Re: How to weather?...
Post by: Javi on October 12, 2009, 01:13:15 am
Thank you for your help, I needed it.

Forze: Proud nab (very) scripter  :-[

BTW How is that of calling a variable ":O" ? LOL
Title: Re: How to weather?...
Post by: evil_night13 on October 12, 2009, 04:54:47 pm
good to see Mattz and Force active in the script section ;)
Title: Re: How to weather?...
Post by: thijn on October 13, 2009, 04:17:10 pm
I don't see Force, And I don't see Mattz ???