New server feature - Event command scripts
NewBuilding works perfectly fine.
Same thing with UseItem.
*msg works as planned, but has one small problem: it does not show the user what he just typed, or even confirm that the command was used correctly.
Buildingpurchase just doesn't seem to work to me.
You can make comments without any prefix; however, in lines with command requiring arguments, the comments are used as arguments. This can be solved by putting // in front of your comments.
MonthDate, GameDate and Listen don't work. I haven't tried the others, but we can safely assume they weren't suddenly implemented without announcement.
You can try to use invalid events; the server program will just give an error in the log, then skip the invalid event.
Same thing with UseItem.
*msg works as planned, but has one small problem: it does not show the user what he just typed, or even confirm that the command was used correctly.
Buildingpurchase just doesn't seem to work to me.
You can make comments without any prefix; however, in lines with command requiring arguments, the comments are used as arguments. This can be solved by putting // in front of your comments.
MonthDate, GameDate and Listen don't work. I haven't tried the others, but we can safely assume they weren't suddenly implemented without announcement.
You can try to use invalid events; the server program will just give an error in the log, then skip the invalid event.
The Usable Items are named "Usable Item 1", "Usable Item 2", etc, until "Usable Item 32", and they work exactly like they should.
The script is very flexible. Identation and case sensitivity don't matter. For example, the following event works perfectly:
However, *command=COMMANDNAME MUST be exactly like that; add even a single space, and it stops working.
The script is very flexible. Identation and case sensitivity don't matter. For example, the following event works perfectly:
Code: Select all
Event( "uSeItEm", "uSaBlE iTeM 1") {
*command=say It's alive! Alive!
OMG COMMENT }
Sorry for posting four times in a row, but a summary of how event scripts work and stuff like that can be found at http://editthis.info/universalwiki/Event_command_script.
- morbydvisns
- Posts: 1889
- Joined: Sun Jan 30, 2005 12:51 am
i use building purchase on ariya no prob... heres the script i use for when houses are purchesed (and theres one the same, for the 'newbuilding' event
Code: Select all
Event( "buildingpurchase","29" )
{
*command=say %Player% has bought itself a house! =)
*command=msg %player% be sure and stock your house with plenty of food items.
*command=msg %player% return home when you leave you will auto-eat while offline to stay alive
*command=grantitem %player% 10 raw chicken
*command=grantitem %player% 10 cooking oil
*command=grantitem %player% 10 steak package
*command=grantitem %player% 10 power
*command=grantitem %player% 10 hemp tea
*command=msg %player% Here are a few helpful items to start with.
}
Last edited by morbydvisns on Thu Apr 12, 2007 1:55 am, edited 2 times in total.
what about the ability to put the buildings name into the message?
maybe a %BUILDINGNAME% entry?
assuming that building number 13 is a town (it is on zoric and sab):
maybe a %BUILDINGNAME% entry?
assuming that building number 13 is a town (it is on zoric and sab):
Code: Select all
Event( "NewBuilding", "13" )
{
*command=say %PLAYER% has established the town of %BUILDINGNAME%
}
hmm..heres an odd one.
i'm a sysop on the world..scripts with granting aren't working
an account with owner powers is on the world (zaroba_owner using the server pc), scripts still aren't working.
they were working fine until the owner account got disconnected a few days ago and i didn't put it back on.
i'm a sysop on the world..scripts with granting aren't working
an account with owner powers is on the world (zaroba_owner using the server pc), scripts still aren't working.
they were working fine until the owner account got disconnected a few days ago and i didn't put it back on.
damn multiple running of scripts...
script says:
Event("UseItem", "Lambchop Meal")
{
*command=grantitem %PLAYER% 1 Salad
*command=grantitem %PLAYER% 1 Lamb Chops
*command=grantitem %PLAYER% 1 Cola
*command=grantitem %PLAYER% 1 Ice Cream
}
ingame it runs it 3 times...
You gained 1 Salad
You were just granted 1 Salad
You gained 1 Pork Chops
You were just granted 1 Pork Chops
You gained 2 Cola
You were just granted 2 Cola
You gained 1 Ice cream
You were just granted 1 Ice Cream
You gained 1 Salad
You were just granted 1 Salad
You gained 1 Pork Chops
You were just granted 1 Pork Chops
You gained 2 Cola
You were just granted 2 Cola
You gained 1 Ice cream
You were just granted 1 Ice Cream
You gained 1 Salad
You were just granted 1 Salad
You gained 1 Pork Chops
You were just granted 1 Pork Chops
You gained 1 Cola
You were just granted 1 Cola
You gained 1 Ice cream
script says:
Event("UseItem", "Lambchop Meal")
{
*command=grantitem %PLAYER% 1 Salad
*command=grantitem %PLAYER% 1 Lamb Chops
*command=grantitem %PLAYER% 1 Cola
*command=grantitem %PLAYER% 1 Ice Cream
}
ingame it runs it 3 times...
You gained 1 Salad
You were just granted 1 Salad
You gained 1 Pork Chops
You were just granted 1 Pork Chops
You gained 2 Cola
You were just granted 2 Cola
You gained 1 Ice cream
You were just granted 1 Ice Cream
You gained 1 Salad
You were just granted 1 Salad
You gained 1 Pork Chops
You were just granted 1 Pork Chops
You gained 2 Cola
You were just granted 2 Cola
You gained 1 Ice cream
You were just granted 1 Ice Cream
You gained 1 Salad
You were just granted 1 Salad
You gained 1 Pork Chops
You were just granted 1 Pork Chops
You gained 1 Cola
You were just granted 1 Cola
You gained 1 Ice cream
- morbydvisns
- Posts: 1889
- Joined: Sun Jan 30, 2005 12:51 am