Page 2 of 3

Posted: Wed Apr 04, 2007 1:25 pm
by morbydvisns
thats cool im not going anywhere Xd

Posted: Wed Apr 04, 2007 4:50 pm
by Malkiah
This is uber coolness, I think the best addition to the server ever.

Posted: Wed Apr 04, 2007 4:51 pm
by VDZ
Not for three months? o.O

Posted: Tue Apr 10, 2007 4:05 am
by Theros_12
So do all the codes people have posted work or do only the ones mit posted work?

Posted: Wed Apr 11, 2007 5:27 am
by VDZ
The stuff Mit has confirmed will work.
As for the unconfirmed stuff, we don't know yet.

Posted: Wed Apr 11, 2007 6:47 pm
by VDZ
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.

Posted: Wed Apr 11, 2007 6:56 pm
by VDZ
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:

Code: Select all

Event(                   "uSeItEm",         "uSaBlE iTeM 1") {
*command=say It's alive! Alive!
OMG COMMENT }
However, *command=COMMANDNAME MUST be exactly like that; add even a single space, and it stops working.

Posted: Wed Apr 11, 2007 7:09 pm
by VDZ
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.

Posted: Wed Apr 11, 2007 8:22 pm
by morbydvisns
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.
} 

Posted: Wed Apr 11, 2007 10:47 pm
by Mit
i feel ive struck a nerve here, vdz ;] Glad you seem to be enjoyin it :) and it seems to be working to the level i expected. Will try to get a few more of the events done soon.

Posted: Thu Apr 12, 2007 7:53 am
by VDZ
Mit wrote:i feel ive struck a nerve here, vdz ;]
Uh...is that a good thing or a bad thing? (I'm not English :P)
Anyways, yeah, I'm pretty interested in this stuff.
The real awesomeness comes when conditional operations are added, though.

Posted: Fri Apr 27, 2007 2:06 pm
by zaroba
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):

Code: Select all

Event( "NewBuilding", "13" ) 
{ 
*command=say %PLAYER% has established the town of %BUILDINGNAME% 
} 

Posted: Fri May 04, 2007 1:29 pm
by zaroba
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.

Posted: Tue May 22, 2007 3:24 am
by zaroba
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

Posted: Tue May 22, 2007 3:52 am
by morbydvisns
i had this prob when i was putting them in the gamescript.mts file and each time i refresh it would add another layer of scripting for somehow... when started using the servergamescript and only weaps in gamescript, all was well

Posted: Tue May 22, 2007 8:00 pm
by Archlord
so if I wanted a random player(s) house removed, money taken, Uterly humiluated I could use this 'event command' thingy to do it?

Would it take effect all at random or it a set time? Or both?

Posted: Tue May 22, 2007 8:48 pm
by VDZ
Archlord wrote:so if I wanted a random player(s) house removed, money taken, Uterly humiluated I could use this 'event command' thingy to do it?
Nope. There's no randomness yet.

Posted: Tue May 22, 2007 11:07 pm
by Jayecifer
There is no true random when it comes to programming. There is always a pattern.

Posted: Wed May 23, 2007 12:58 am
by Archlord
Patterns, that'll take a little bit of work But it'll do.

THX 8)

Posted: Wed May 23, 2007 1:22 pm
by VDZ
Jayecifer wrote:There is no true random when it comes to programming. There is always a pattern.
Alright, have it your way: There is no way to produce a seemingly random result yet.