功能簡介 寫:有人要,那我就公開出來了..
效果很簡單
使用後會執行亂數選擇數字
按照出現數字不同而有不同效果
為避免有人賭到傾家蕩產
所以限定有一定程度的人氣、資金、時間才能使用
這個版本為:
+3:加時間
+2:加人氣
+1:加金錢
0:沒事
-3:扣時間
-2:扣人氣
-1:扣金錢
功能改造經cmi同意 予許轉貼至此
程式碼 寫:@@ITEM
no 1
type 道具
code dice
name 風險骰子
info 寫著+3~-3的骰子
price 20000
limit 10/0.5
plus 1h
scale 個
@@USE
time 0
scale 回
action 丟出
name 擲骰子
info 會出現什麼呢f會出現什麼呢f
arg nocount
use 1 風險骰子
funcb _local_
my($USE)=@_;
if($DT->{rank}>=9000||$DT->{rank}<=1000||$DT->{money}<=200000)
{
return 1;
}
return 0;
_local_
func _local_
my $ret='祈禱之後丟出骰子<BR>';
my $dice=int(rand(7)+1);
if ($dice==7)
{
$ret.='<b>擲出「0」點!!</b><BR>什麼事情都沒有發生......';
}
if ($dice==6)
{
my $cnt=int(rand(5))+5;
$DT->{time} -= 3600*($cnt);
$ret.='<b>擲出「+3」點!!</b><BR>骰子中浮現出女神的身影、為你增加了'.($cnt).'小時的時間';
}
if ($dice==5)
{
my $cnt=int(rand(5))+1;
$DT->{rank} += 100*($cnt);
$ret.='<b>擲出「+2」點!!</b><BR>骰子中浮現出天使的身影、為你增加了'.($cnt).' %的人氣';
}
if ($dice==4)
{
my $cnt=int(rand(5))+5;
$DT->{money} += 10000*($cnt);
$ret='<b>擲出「+1」點!!</b><BR>骰子中浮現出妖精的身影、為你增加了'.($cnt).' 萬元';
}
if ($dice==3)
{
my $cnt=int(rand(5))+5;
$DT->{time} += 3600*($cnt);
$ret.='<b>擲出「-3」點!!</b><BR>骰子中浮現出魔王的身影、奪走了'.($cnt).'小時的時間';
}
if ($dice==2)
{
my $cnt=int(rand(5))+2;
$DT->{rank} -= 100*($cnt);
$ret.='<b>擲出「-2」點!!</b><BR>骰子中浮現出惡魔的身影、奪走了'.($cnt).' %的人氣';
}
if ($dice==1)
{
my $cnt=int(rand(5))+5;
$DT->{money} -= 10000*($cnt);
$ret='<b>擲出「-1」點!!</b><BR>骰子中浮現出哥布林的身影、奪走了'.($cnt).' 萬元';
}
return $ret;
_local_