Quote from: Skirmant on January 06, 2010, 04: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.Code Selectelseif (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)Code Selectelseif (!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
}
}Code Selectelseif (!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.Code Selectif ($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)