Kod:
[plevel 2]
votejail
[function votejail]
if (<restest 1 i_maj_jailvote >)&&(<eval <var.voteon>> = 0 )
findid.i_maj_jailvote.trigger=@equip
if (STRMATCH(<args>,))
var.jailreason=Undisclosed Reasons
else
var.jailreason=<args>
endif
return 1
endif
if (<eval <var.voteon>> = 0 )
if (STRMATCH(<args>,))
var.jailreason=Undisclosed Reasons
newitem=i_maj_jailvote
act.equip
return 0
else
var.jailreason=<args>
newitem=i_maj_jailvote
act.equip
return 0
endif
else
sysmessage=A Jail Vote is already being conducted by <uid.<var.voteon>.cont.name>, please wait another <uid.<var.voteon>.timer/2> seconds to hold another Jail Vote.
return 1
endif
[itemdef i_maj_jailvote]
id=i_memory
name=Jail Vote [!!do not remove!!]
type=t_eq_script
on=@create
attr=attr_decay
on=@equip
timer=10 //10 seconds to target a player (prevents quick vote results)
src.sysmessage=Target the player you wish to jail for "<var.jailreason>"
target
return 0
on=@unequip
if (<src.restest 2 i_maj_jailvote>)
return 0
else
src.f_majority_wins
//This makes sure the voting session for the targeted player will end in 2 mins(no more no less).
return 0
endif
on=@targon_item
src.sysmessage=You cannot hold a Jail Vote on items.
remove
return 1
on=@targon_char
if (<src.targ.isgm> = 1 )||(<src.targ.brain> > 0 )
src.sysmessage=You cannot do this on staff members or NPCs.
remove
return 1
else
var.voteon=<uid>
var.jailname=<src.targ.name>
var.jailuid=<src.targ.uid>
serv.allclients menu maj_jailvote
timer=60*2 //2 minutes to vote
src.serv.allclients sysmessage=You have 2 minutes to vote.
return 1
endif
on=@timer
cont.f_majority_wins
remove
return 1
[menu maj_jailvote]
Do you wish to have <var.jailname> jailed for "<var.jailreason>"?
on=0 Yes, jail <var.jailname>!
if (<eval <var.jailuid>> = 0 ) //voting is over or hasnt begun.
src.sysmessage=Voting is over...
return 1
else
src.serv.allclients sysmessage=<src.name> has voted YES on the jailing of <var.jailname>...
var.yesjail=<eval <var.yesjail>>+1
if (<eval <var.yesjail>> > <eval <serv.clients>/2> )
try uid.<var.jailuid>.jail
serv.allclients sysmessage 5<eval { 1 5 }>% of the players on <serv.name> has voted YES on the jailing of <var.jailname>!
var.jailuid=
var.jailname=
var.jailreason=
var.yesjail=
var.nojail=
try uid.<var.voteon>.remove
var.voteon=
return 0
endif
endif
on=0 No, Don't jail <var.jailname>!
if (<eval <var.jailuid>> = 0 ) //voting is over or hasnt begun.
src.sysmessage=Voting is over...
return 1
else
serv.allclients sysmessage=<src.name> has voted NO on the jailing of <var.jailname>...
var.nojail=<eval <var.nojail>>+1
if (<eval <var.nojail>> > <eval <serv.clients>/2> )
//try uid.<var.jailuid>.jail
serv.allclients sysmessage=5<eval { 1 5 }>% of the players on <serv.name> has voted NO on the jailing of <var.jailname>!
serv.allclients sysmessage=-
serv.allclients sysmessage=<var.jailname> will NOT be jailed...
var.jailuid=
var.jailname=
var.jailreason=
var.yesjail=
var.nojail=
try uid.<var.voteon>.remove
var.voteon=
return 0
endif
endif
on=0 View Vote Status
if (<eval <var.jailuid>> = 0 ) //voting is over or hasnt begun.
src.sysmessage=Voting is over...
return 1
else
src.sysmessage=So Far: <eval <var.yesjail>> Player(s) Has Voted YES On Jailing <var.jailname>.
src.sysmessage=-
src.sysmessage=So Far: <eval <var.nojail>> Player(s) Has Voted NO On Jailing <var.jailname>.
src.menu maj_jailvote
endif
[function f_majority_wins]
if (<eval <var.jailuid>> = 0 ) //voting is over or hasnt begun.
//src.sysmessage=Voting is over....
return 1
else
if (<eval <var.nojail>> = <eval <var.yesjail>> )
serv.allclients sysmessage=The vote on the jailing of <var.jailname> was inconclusive.
serv.allclients sysmessage=-
serv.allclients sysmessage=A GM will now decide the fate of <var.jailname>.
var.jailuid=
var.jailname=
var.jailreason=
var.yesjail=
var.nojail=
var.voteon=
return 1
elseif (<eval <var.nojail>> > <eval <var.yesjail>> )
serv.allclients sysmessage=Majority of the voters has voted NO on the jailing of <var.jailname>.
serv.allclients sysmessage=-
serv.allclients sysmessage=Therfore <var.jailname> will NOT be jailed.
var.jailuid=
var.jailname=
var.jailreason=
var.yesjail=
var.nojail=
var.voteon=
return 1
elseif (<eval <var.nojail>> < <eval <var.yesjail>> )
serv.allclients sysmessage=Majority of the voters has voted Yes on the jailing of <var.jailname>.
serv.allclients sysmessage=-
serv.allclients sysmessage=Therfore <var.jailname> is now being jailed.
try uid.<var.jailuid>.jail
var.jailuid=
var.jailname=
var.jailreason=
var.yesjail=
var.nojail=
var.voteon=
return 1
endif
endif
votejail
[function votejail]
if (<restest 1 i_maj_jailvote >)&&(<eval <var.voteon>> = 0 )
findid.i_maj_jailvote.trigger=@equip
if (STRMATCH(<args>,))
var.jailreason=Undisclosed Reasons
else
var.jailreason=<args>
endif
return 1
endif
if (<eval <var.voteon>> = 0 )
if (STRMATCH(<args>,))
var.jailreason=Undisclosed Reasons
newitem=i_maj_jailvote
act.equip
return 0
else
var.jailreason=<args>
newitem=i_maj_jailvote
act.equip
return 0
endif
else
sysmessage=A Jail Vote is already being conducted by <uid.<var.voteon>.cont.name>, please wait another <uid.<var.voteon>.timer/2> seconds to hold another Jail Vote.
return 1
endif
[itemdef i_maj_jailvote]
id=i_memory
name=Jail Vote [!!do not remove!!]
type=t_eq_script
on=@create
attr=attr_decay
on=@equip
timer=10 //10 seconds to target a player (prevents quick vote results)
src.sysmessage=Target the player you wish to jail for "<var.jailreason>"
target
return 0
on=@unequip
if (<src.restest 2 i_maj_jailvote>)
return 0
else
src.f_majority_wins
//This makes sure the voting session for the targeted player will end in 2 mins(no more no less).
return 0
endif
on=@targon_item
src.sysmessage=You cannot hold a Jail Vote on items.
remove
return 1
on=@targon_char
if (<src.targ.isgm> = 1 )||(<src.targ.brain> > 0 )
src.sysmessage=You cannot do this on staff members or NPCs.
remove
return 1
else
var.voteon=<uid>
var.jailname=<src.targ.name>
var.jailuid=<src.targ.uid>
serv.allclients menu maj_jailvote
timer=60*2 //2 minutes to vote
src.serv.allclients sysmessage=You have 2 minutes to vote.
return 1
endif
on=@timer
cont.f_majority_wins
remove
return 1
[menu maj_jailvote]
Do you wish to have <var.jailname> jailed for "<var.jailreason>"?
on=0 Yes, jail <var.jailname>!
if (<eval <var.jailuid>> = 0 ) //voting is over or hasnt begun.
src.sysmessage=Voting is over...
return 1
else
src.serv.allclients sysmessage=<src.name> has voted YES on the jailing of <var.jailname>...
var.yesjail=<eval <var.yesjail>>+1
if (<eval <var.yesjail>> > <eval <serv.clients>/2> )
try uid.<var.jailuid>.jail
serv.allclients sysmessage 5<eval { 1 5 }>% of the players on <serv.name> has voted YES on the jailing of <var.jailname>!
var.jailuid=
var.jailname=
var.jailreason=
var.yesjail=
var.nojail=
try uid.<var.voteon>.remove
var.voteon=
return 0
endif
endif
on=0 No, Don't jail <var.jailname>!
if (<eval <var.jailuid>> = 0 ) //voting is over or hasnt begun.
src.sysmessage=Voting is over...
return 1
else
serv.allclients sysmessage=<src.name> has voted NO on the jailing of <var.jailname>...
var.nojail=<eval <var.nojail>>+1
if (<eval <var.nojail>> > <eval <serv.clients>/2> )
//try uid.<var.jailuid>.jail
serv.allclients sysmessage=5<eval { 1 5 }>% of the players on <serv.name> has voted NO on the jailing of <var.jailname>!
serv.allclients sysmessage=-
serv.allclients sysmessage=<var.jailname> will NOT be jailed...
var.jailuid=
var.jailname=
var.jailreason=
var.yesjail=
var.nojail=
try uid.<var.voteon>.remove
var.voteon=
return 0
endif
endif
on=0 View Vote Status
if (<eval <var.jailuid>> = 0 ) //voting is over or hasnt begun.
src.sysmessage=Voting is over...
return 1
else
src.sysmessage=So Far: <eval <var.yesjail>> Player(s) Has Voted YES On Jailing <var.jailname>.
src.sysmessage=-
src.sysmessage=So Far: <eval <var.nojail>> Player(s) Has Voted NO On Jailing <var.jailname>.
src.menu maj_jailvote
endif
[function f_majority_wins]
if (<eval <var.jailuid>> = 0 ) //voting is over or hasnt begun.
//src.sysmessage=Voting is over....
return 1
else
if (<eval <var.nojail>> = <eval <var.yesjail>> )
serv.allclients sysmessage=The vote on the jailing of <var.jailname> was inconclusive.
serv.allclients sysmessage=-
serv.allclients sysmessage=A GM will now decide the fate of <var.jailname>.
var.jailuid=
var.jailname=
var.jailreason=
var.yesjail=
var.nojail=
var.voteon=
return 1
elseif (<eval <var.nojail>> > <eval <var.yesjail>> )
serv.allclients sysmessage=Majority of the voters has voted NO on the jailing of <var.jailname>.
serv.allclients sysmessage=-
serv.allclients sysmessage=Therfore <var.jailname> will NOT be jailed.
var.jailuid=
var.jailname=
var.jailreason=
var.yesjail=
var.nojail=
var.voteon=
return 1
elseif (<eval <var.nojail>> < <eval <var.yesjail>> )
serv.allclients sysmessage=Majority of the voters has voted Yes on the jailing of <var.jailname>.
serv.allclients sysmessage=-
serv.allclients sysmessage=Therfore <var.jailname> is now being jailed.
try uid.<var.jailuid>.jail
var.jailuid=
var.jailname=
var.jailreason=
var.yesjail=
var.nojail=
var.voteon=
return 1
endif
endif
Yorumlar
Henüz yorum yapılmamıştır.
|
OylamalarOylama :![]()
Üyelerin oylama ortalaması (10 dışında) : Henüz Oylanmamış
Oylar: 0 |
Benzer Sayfalar
| Sayfalar | Yorumlar | Gönderen | Tarih |
| Staff Book ve Jail Sistemi | 0 | Mesh | 20-06-2011 |
| Jail | 0 | aldarson | 27-06-2010 |
| Vote Sandals | 0 | ubeyid | 23-08-2009 |
| Vote Half Apron | 0 | ubeyid | 23-08-2009 |
| Vote Glasses | 0 | ubeyid | 23-08-2009 |







