Page 7 of 7

Posted: Wed Oct 30, 2013 6:02 pm
by matias
may be you can script in the town window something to change the town name that would be easier

Posted: Thu Jan 23, 2014 8:09 pm
by zaroba
There is the command to change the 'Details' button text for items.
But how does one set the text that is displayed when the button is clicked on?

Posted: Fri Jan 24, 2014 10:44 am
by Mit
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

Code: Select all

Event( "ItemDetails", "Monkeys" )
{
    *msg %PLAYER% Monkeys need no further explanation surely.
}
that help?

Posted: Sat Jan 25, 2014 6:18 pm
by morbydvisns
this didn't work for the one item i tried it with. the code worked when i used useitem instead of details.

Posted: Sat Jan 25, 2014 7:18 pm
by zaroba
Worked for me, thanks mit :)
(although I only tried it with fuel on pandora)

Posted: Sat Jan 25, 2014 8:29 pm
by morbydvisns
the 3 or 4 things i've tried this with have no response.

Posted: Thu Jan 30, 2014 5:17 pm
by zaroba
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

Posted: Sun Feb 02, 2014 7:01 pm
by flametard
is there a way for the script to determine if a player has the most kudos on the planet? I want to make it so the person on xebec with the most kudos is called the king or queen when they log in.

Posted: Sun Feb 02, 2014 11:10 pm
by zaroba
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.

Posted: Mon Feb 03, 2014 12:23 pm
by Mit
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.

Posted: Tue Feb 04, 2014 11:36 pm
by flametard
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

Posted: Wed Feb 05, 2014 12:36 am
by ultramarine
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,

Posted: Wed Feb 05, 2014 2:26 am
by zaroba
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?
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.

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.
		}
	}