Shidhun 
Journeyman

Posts: 59
Likes Given: 5
Likes Received: 3 in 3 posts
Joined: Jul 2012
Reputation: 1
![]()
|
RE: Race selection script
A simple version would be this "racegate"
You need to change the following things on the gate, to adjust it properly :
Name --> The Name of the Race
Color --> Body-Color of the race
Morep --> The Coordinates to which the player should go
Of course this is not a complex script. You could add a Gump-Menu for GMs, to easily change the Racegate and so on. This is a very (!) simple version.
Code:
[itemdef i_racegate]
ID=i_moongate_red //or what ever you want
name=Race-Selector
type=t_script
weight=1000.0
on=@create
attr=attr_move_never
on=@click
if !<src.isgm>
message Race-Gate for <name>
else
message Race : <name>
message Color : <color>
message MoreP : <morep>
endif
return 1
on=@step
if (<morex> == 0)&&(<morey> == 0)
src.sysmessage @026 Please page for a gamemaster, the Racegate is broken
return 1
endif
if strmatch(<src.tag0.race>,<name>))
src.sysmessage @,,1 You allready belong to this race.
else
sdialog d_select_race
endif
[DIALOG d_select_race]
50,71
//nodispose
//´noclose
page 0
resizepic 0 0 3000 320 285
dhtmlgump 20 50 280 40 0 0 <def.center><def.BFONT>color="#444444"><def.big>Do you really want to belong to the race of <name>?<def.BFONTE><def.centere>
radio 20 110 2510 2511 0 1
radio 20 150 2510 2511 1 2
dhtmlgump 40 110 250 40 0 0 <def.BFONT>color="#440000"><def.big>Yes i want to belong to this race<def.BFONTE>
dhtmlgump 40 150 250 40 0 0 <def.BFONT>color="#440000"><def.big>Oh no, i just slipped and fell on this tile<def.BFONTE>
button 130 223 2117 2118 1 0 100
dhtmlgump 150 220 200 30 0 0 <def.BFONT>color="#444444"><def.big>Accept<def.BFONTE>
[DIALOG d_select_race BUTTON]
On=0
return 1
on=100
if <argchk[1]>
src.tag.race <name>
SOUND=snd_spell_gate_travel
SRC.GO <morep>
SRC.COLOR <color>
else
src.sysmessageua 030,0,0,enu You choose, not to be a member of this race
src.go <put the general starting coordinates here, the player MUST NOT stay on the tile, else the dialog will fire again with the simple @step-trigger you are using>
endif
return 1
|
|
09-16-2013 09:59 PM |
|
|