Noobish questions, mostly about scripting
Are you referring to "*Itemdetailstext" ?
If you set that, clicking the button will trigger a "ItemDetails" server script event, so you'd implement an OSD or otherwise such as
that help?
If you set that, clicking the button will trigger a "ItemDetails" server script event, so you'd implement an OSD or otherwise such as
Code: Select all
Event( "ItemDetails", "Monkeys" )
{
*msg %PLAYER% Monkeys need no further explanation surely.
}
- morbydvisns
- Posts: 1889
- Joined: Sun Jan 30, 2005 12:51 am
- morbydvisns
- Posts: 1889
- Joined: Sun Jan 30, 2005 12:51 am
Mit, have the var limits etc changed?
I could have sworn we had $gServerTimeVars but they are being treated like temp vars for me. Happening with both 65.8 and 65.9a servers
Could have sworn we had more then 8 $gPlayertimeVars as well. Wasn't the limit upped to 16?
$gBuildingVars. not $gBuildingTimeVars, regular $gBuildingVars. I'm showing 2 with values over 500000000. Thought these were limited to 32k like playervars, or do all vars have higher limits now? Don't want to try and make use of this if it is a bug, but if it isn't a bug, then awesome
I'm also having some issues with playervars.
Login script has this line, $gPlayerTimeVar1=$gPlayerTimeVar1+1
Sometimes the value will go above 1, but more often then not it resets to 1
It works fine on Pandora, but not zoric. Pandora's one is a copy/paste of the file that zoric uses. the only difference is that Pandora is still running 65.8 but zoric is using 65.9a
I could have sworn we had $gServerTimeVars but they are being treated like temp vars for me. Happening with both 65.8 and 65.9a servers
Could have sworn we had more then 8 $gPlayertimeVars as well. Wasn't the limit upped to 16?
$gBuildingVars. not $gBuildingTimeVars, regular $gBuildingVars. I'm showing 2 with values over 500000000. Thought these were limited to 32k like playervars, or do all vars have higher limits now? Don't want to try and make use of this if it is a bug, but if it isn't a bug, then awesome
I'm also having some issues with playervars.
Login script has this line, $gPlayerTimeVar1=$gPlayerTimeVar1+1
Sometimes the value will go above 1, but more often then not it resets to 1
It works fine on Pandora, but not zoric. Pandora's one is a copy/paste of the file that zoric uses. the only difference is that Pandora is still running 65.8 but zoric is using 65.9a
if there isn't already a way, one method I can think of is to use 2 servervars.
1 to record the current top kudos, 1 to record the id # of the player holding it.
When a player logs in, have the join script check their kudos against the servervar storing the current top kudos. If they have more, then set the 2nd var to their ID and announce them as beign the king.
It's not super accurate, but it should work.
1 to record the current top kudos, 1 to record the id # of the player holding it.
When a player logs in, have the join script check their kudos against the servervar storing the current top kudos. If they have more, then set the 2nd var to their ID and announce them as beign the king.
It's not super accurate, but it should work.
You can also do this by triggering an event for all 'active' players using *eventallalive (which triggers a custom event for each active player in turn) and storing the highest kudos so far in a servervar as zar describes.
Be aware though that triggering a script for all the active players could take a long time to excecute if your script is complicated and/or you've got a lot of players active on your world, so you'll need to use it carefully.
Be aware though that triggering a script for all the active players could take a long time to excecute if your script is complicated and/or you've got a lot of players active on your world, so you'll need to use it carefully.
- flametard
- Posts: 1245
- Joined: Sun Apr 01, 2007 2:05 am
- Location: Join NR! faction name: 'NR new recruits' password: 'Truth'
- Contact:
Zar, I hate to ask you to hold my hand and guide me through this script, but seeing as I've never messed with this kinda stuff before, could you write up that into a script for me? Itll help the gameplay on xebec by giving players a goal or a target. And o could use the help figuring out those commands so I can incorporate the into my script
-
- Posts: 84
- Joined: Sun Jan 15, 2012 5:56 pm
i didn't see this thread started when i requested gp for xebec, but i guess it falls under the same sort of though pattern,
do you guys mind considering gp for xebec and see if that does anything to draw players, also if it has not happened the world building limit needs to be upped to accommodate more players.
2 - 4 a month for 100000s or 25000 to 50000s each was the proposed goal for gp on xebec,
do you guys mind considering gp for xebec and see if that does anything to draw players, also if it has not happened the world building limit needs to be upped to accommodate more players.
2 - 4 a month for 100000s or 25000 to 50000s each was the proposed goal for gp on xebec,
I kinda have one made already, from years ago so it could do with some modernization. It doesn't go by kudos though, it's just whoever kills the king becomes the king. So its like playing tag but in reverse. Think I had made it for one of those Free For All Combat worlds I used to run.flametard wrote:Zar, I hate to ask you to hold my hand and guide me through this script, but seeing as I've never messed with this kinda stuff before, could you write up that into a script for me?
pvar 10 holds the status of king
pvar 11 stores players deaths
the &king command can be used to see who is king
Code: Select all
Event( "PlayerLogin" 0 )
{
If ($playervar10=1)
{
sleep(100)
*say The King of Combat %player% has joined!
*say %player% has been killed $playervar11 times!
*say %player% has killed somebody $gplayerkudos times!
*msg %player% you can type &king to advertise your position
}
else
{
sleep(100)
*msg %player% You are not holding the crown.
*msg %player% go and find the crown holder and claim it.
}
}
Event("&command", "king")
{
If ($playervar10=0)
{
*msg %player% You are not holding the crown.
*msg %player% go and find the crown holder and claim it.
*msg %killer% you currently have $gplayerkudos kills.
}
Else If ($playervar10=1)
{
*say The King of Combat, %player%, is here!
*say %player% has been killed $playervar11 times!
*say %player% has killed somebody $gplayerkudos times!
}
Else
{
*msg %player% error in king command.
}
}
event( "playerdeath", 0 )
{
If ($playervar10=0)
{
$playervar11=$playervar11+1
*msg %killer% unfortunatly, %player% was not holding the crown.
*msg %player% you have been killed $playervar11 times so far.
}
Else If ($playervar10=1)
{
$playervar10=0
$playervar11=$playervar11+1
*say The King of Combat, %player%, has been killed!
*say %killer% is the new king!
*msg %killer% you can type &king to advertise your position
*setplayervar %killer% 10 1
}
Else
{
*msg %player% error in player death.
}
}