Vice City Multiplayer

VC:MP => mIRC/pawn Scripting => Script Showroom => Topic started by: Skirmant on January 06, 2010, 05:04:31 PM

Title: Basic RPG System & Commands
Post by: Skirmant on January 06, 2010, 05:04:31 PM
Since R2 came out I decided to show some scripting begginers how to make basic and somewhat popular RPG commands.
The scripts is GUS based, but I'm sure its not hard to reconvert it to any other.

Add this simple script in the spawn signal.

elseif (Police Depot (Washington-Beach) isin $vcmp.area($1)) {
!writeini -n vcmp.skin.ini SKINS $1 Cop
vcmp.msg $1 You spawned as a Cop.
vcmp.setarmour $1 100
}
else {
!writeini -n vcmp.skin.ini SKINS $1 Citizen
vcmp.msg $1 You spawned as a Citizen.
}


(The location depends where your cop skin spawns at)

 elseif (!sus iswm $2) {
   if ($vcmp.cmdcheck(!copcmd,%id) == fail) !halt
   elseif ($readini(vcmp.skin.ini,SKINS,%b) == Citizen) vcmp.msg %id You need to be the law to suspect!
   elseif (!$4-) vcmp.msg %id $2 <name> <reason>
   elseif (%a == -1) vcmp.msg %id No such player online!
   elseif (%a == $vcmp.getid(%name)) vcmp.msg %id You can't suspect yourself.
   elseif ($readini(vcmp.skin.ini,SKINS,%a) != Citizen) vcmp.msg %id You can't suspect a cop!
   elseif ($readini(vcmp.wanted.ini,WANTED,$vcmp.name(%a)) == yes) vcmp.msg %id This player is already wanted!
   else {
     vcmp.say $vcmp.name(%b) suspected $vcmp.name(%a) for $4-
     !writeini -n vcmp.wanted.ini WANTED $vcmp.name(%a) yes
   }
 }


 elseif (!wanted iswm $2) {
   if ($vcmp.cmdcheck(!copcmd,%id) == fail) !halt
   else {
     var %aa = 0,%bb,%cc,%dd
     while (%aa <= 50) {
       if ($readini(vcmp.wanted.ini,WANTED,$vcmp.name(%aa)) == yes) {
         if (!%bb) %bb = $vcmp.name(%aa) $+
         elseif ($numtok(%bb,32) <= 7) %bb = %bb  $vcmp.name(%aa)
         elseif (!%cc) %cc = $vcmp.name(%aa) $+
         elseif ($numtok(%cc,32) <= 7) %cc = %cc  $vcmp.name(%aa)
         elseif (!%dd) %dd = $vcmp.name(%aa) $+
         elseif ($numtok(%dd,32) <= 7) %dd = %dd  $vcmp.name(%aa)
       }
       !inc %aa
     }
     if (%bb) {
       vcmp.say Wanted players: %bb
       if (%cc) vcmp.say %cc
       if (%dd) vcmp.say %dd
     }
     else vcmp.say Wanted players: none
   }
 }


Replace the content of the kill signal with this final script.

 if ($vcmp.name(%killer) == Unknown) !remini vcmp.wanted.ini WANTED $vcmp.name(%victim)
 elseif (($vcmp.name(%victim) != Unknown) && ($vcmp.name(%killer) != Unknown)) {
   if ($readini(vcmp.skin.ini,SKINS,%killer) != Citizen) {
     if ($readini(vcmp.wanted.ini,WANTED,$vcmp.name(%victim)) == yes) {
       vcmp.msg %killer You killed a suspect and got $ $+ 500 as a reward!
       vcmp.cash+ %killer 500    
       !remini vcmp.wanted.ini WANTED $vcmp.name(%victim)
     }
     else vcmp.warn %killer Autowarn Killing an Innocent Civilian
   }
   else {
     !writeini -n vcmp.wanted.ini WANTED $vcmp.name(%killer) yes
     !remini vcmp.wanted.ini WANTED $vcmp.name(%victim)
   }
 }
}


Looks like were done here. Happy role playing  :)
Title: Re: Basic RPG System & Commands
Post by: Javi on January 08, 2010, 10:33:22 PM
Nice script  :D
Title: Re: Basic RPG System & Commands
Post by: MrAcmering on January 09, 2010, 09:03:56 PM
nice  :o
Title: Re: Basic RPG System & Commands
Post by: thijn on January 09, 2010, 11:30:39 PM
not that bad ;)
Title: Re: Basic RPG System & Commands
Post by: Ice on September 15, 2010, 04:44:50 PM
Não consigo usar  :o Como eu coloco isso no meu game mode ?
Title: Re: Basic RPG System & Commands
Post by: Skirmant on September 15, 2010, 05:35:57 PM
Took me a while to find out that you're talking in Galician...
Quote from: Ice on September 15, 2010, 04:44:50 PM
I can not use: As I put it in my game mode?

QuoteEscoita. Pola maneira que está falando que eu estou empezando a idea de que está a usar pawno, aínda que este script foi feito para o mIRC. Noutras palabras, o seu bo como un exemplo, pero non pode usalo directamente a menos que estea a usar mIRC para o servidor.

Title: Re: Basic RPG System & Commands
Post by: Robd on November 05, 2010, 11:14:15 PM
nice
Title: Re: Basic RPG System & Commands
Post by: Gamer on April 16, 2011, 11:07:37 PM
Quote from: Skirmant on January 06, 2010, 05:04:31 PM
Since R2 came out I decided to show some scripting begginers how to make basic and somewhat popular RPG commands.
The scripts is GUS based, but I'm sure its not hard to reconvert it to any other.

Add this simple script in the spawn signal.

elseif (Police Depot (Washington-Beach) isin $vcmp.area($1)) {
!writeini -n vcmp.skin.ini SKINS $1 Cop
vcmp.msg $1 You spawned as a Cop.
vcmp.setarmour $1 100
}
else {
!writeini -n vcmp.skin.ini SKINS $1 Citizen
vcmp.msg $1 You spawned as a Citizen.
}


(The location depends where your cop skin spawns at)

 elseif (!sus iswm $2) {
   if ($vcmp.cmdcheck(!copcmd,%id) == fail) !halt
   elseif ($readini(vcmp.skin.ini,SKINS,%b) == Citizen) vcmp.msg %id You need to be the law to suspect!
   elseif (!$4-) vcmp.msg %id $2 <name> <reason>
   elseif (%a == -1) vcmp.msg %id No such player online!
   elseif (%a == $vcmp.getid(%name)) vcmp.msg %id You can't suspect yourself.
   elseif ($readini(vcmp.skin.ini,SKINS,%a) != Citizen) vcmp.msg %id You can't suspect a cop!
   elseif ($readini(vcmp.wanted.ini,WANTED,$vcmp.name(%a)) == yes) vcmp.msg %id This player is already wanted!
   else {
     vcmp.say $vcmp.name(%b) suspected $vcmp.name(%a) for $4-
     !writeini -n vcmp.wanted.ini WANTED $vcmp.name(%a) yes
   }
 }


 elseif (!wanted iswm $2) {
   if ($vcmp.cmdcheck(!copcmd,%id) == fail) !halt
   else {
     var %aa = 0,%bb,%cc,%dd
     while (%aa <= 50) {
       if ($readini(vcmp.wanted.ini,WANTED,$vcmp.name(%aa)) == yes) {
         if (!%bb) %bb = $vcmp.name(%aa) $+
         elseif ($numtok(%bb,32) <= 7) %bb = %bb  $vcmp.name(%aa)
         elseif (!%cc) %cc = $vcmp.name(%aa) $+
         elseif ($numtok(%cc,32) <= 7) %cc = %cc  $vcmp.name(%aa)
         elseif (!%dd) %dd = $vcmp.name(%aa) $+
         elseif ($numtok(%dd,32) <= 7) %dd = %dd  $vcmp.name(%aa)
       }
       !inc %aa
     }
     if (%bb) {
       vcmp.say Wanted players: %bb
       if (%cc) vcmp.say %cc
       if (%dd) vcmp.say %dd
     }
     else vcmp.say Wanted players: none
   }
 }


Replace the content of the kill signal with this final script.

 if ($vcmp.name(%killer) == Unknown) !remini vcmp.wanted.ini WANTED $vcmp.name(%victim)
 elseif (($vcmp.name(%victim) != Unknown) && ($vcmp.name(%killer) != Unknown)) {
   if ($readini(vcmp.skin.ini,SKINS,%killer) != Citizen) {
     if ($readini(vcmp.wanted.ini,WANTED,$vcmp.name(%victim)) == yes) {
       vcmp.msg %killer You killed a suspect and got $ $+ 500 as a reward!
       vcmp.cash+ %killer 500    
       !remini vcmp.wanted.ini WANTED $vcmp.name(%victim)
     }
     else vcmp.warn %killer Autowarn Killing an Innocent Civilian
   }
   else {
     !writeini -n vcmp.wanted.ini WANTED $vcmp.name(%killer) yes
     !remini vcmp.wanted.ini WANTED $vcmp.name(%victim)
   }
 }
}


Looks like were done here. Happy role playing  :)

[Error] -This scripts is  mySQLite(mIRC)
Title: Re: Basic RPG System & Commands
Post by: thijn on April 21, 2011, 10:27:21 PM
what the fuck are you talking about??
There is no such thing as MySQLite (mIRC)
You only have mySQL, sqlite and mIRC >.<

And this is a script for mIRC, ONLY..