lets start with a basic script every tutorial starts with.
You want the server to say "Hello World!"
but you want it to be a bit more complex, you want the server to say this, when a player says !hello
we now need to decide, wether we want "Hello world" to be public, or just the player who said this can see it.
place this code into your script some where near line 1194 (it doesnt really matter, but near the !info command is a good place to put it)
elseif ($2 == !hello) || ($2 == !pmhello) {
vcmp.msg $2 %id Hello World!
}
ok. that was our first code. now, the part vcmp.msg is the actual "what to do" thing in the script. $2 %id specifies who to send the message to. Hello world, is the parameter on the actual action. therefore, irc has to send a message, defined in parameters.
if we want the "Hello world!" to be public, replace vcmp.msg with vcmp.say
If we want to check weather player has the right to see "hello world", place an IF before the vcmp.msg:
elseif ($2 == !hello) || ($2 == !pmhello) {
if ($vcmp.cmdcheck(!hello,%id) == fail) !halt
else vcmp.msg $2 %id Hello World!
}
now, the if line, does the following
checks if the value after !hello in vcmp.cmdlevel.ini is larger than the players admin level. if it is larger it goes to !halt. if smaller, it ignores !halt and does the next line, which is hello world
!halt, is a storno, but im not sure, if it gives an error message or not.
btw, due to the error (not sure if its an error)
i would like to clear the alias's
well im new to vcmp scripting so i was just searching for tutorials also googling for tutorils. but i found none tutorials. also i found that if i want to learn scripting i have to read the script made by others and understand it. so i have learned something.
well i found that topic of tutorial from
matthiasvegh :
So i can also say that the hello command is wrong its actually :
elseif ($2 == !hello) || ($2 == !pmhello) {
vcmp.msg %id Hello World!
}I have modified many things in GUS and now i know how to change the script.
I added various commands like
weather commands : !rain, !clear, !fog, !eclipse, !storm, etcand the settime command in gus was not working for me ( i also modified it and now it works)
:
!settime, !morning, !noon, !evening, !midnite
now i need to know is : how to make
!time command so that it shows current time shown in top right corner of the game !
Also i want to know how to make a command like
!gotohideout <locname> so only admin lvl 1 can go to that location. and no other player can go to that location.
same as
!gotoloc command but i want gotoloc for all ppl and gotohideout commands only for admins. help me with it.
Also i need help with
buying cars. if u guys dont wana give script for buying cars at least give me the idea how to make it or explain me.