zpf1986yes 发表于 2010-8-22 14:03:09

酒馆赌钱ERM的修改问题

酒馆赌钱ERM每天可以赌太多次了,人与人对战等太久了,但确实有趣,请问怎样改变每天的赌钱次数,列如每天只能赌3次!

air 发表于 2010-8-22 20:36:59

LZ这个可以不?一天只能赌3次.

ZVSE
_WARNING_#1=IMPORTANT! This file is not in a plain text format. NEVER use any editor except ERM_S for making any kind of changes!
ERMS_PoweredBy=ERM Scripter v. 2003.2.3.1842

**   Tavern Card Game ERM Script Version 1.1 created by Timothy E. Pulver

** This script enhances all standalone Taverns on a map by adding a simple
** gambling game where heroes can gamble away their hard-won gold. It's
** purely a game of chance with few real decisions, but you can choose to
** put down a high or low stake which will determine how much you'll end up
** winning or losing. For example, if there are 3 other players, the low stake
** will be 300 gold and the high stake will be 3000. A hero's luck bonus plays
** a role in the equation too. The higher the luck bonus, the more chance of
** winning. And if the hero knows the Fortune spell (and has enough spell
** points left), he or she will be given the opportunity to cast it. The grand
** prize in this game is a magical pendant in addition to a nice return on your
** gold. However, if a hero gets TOO lucky or wins too often the other card
** players may accuse the hero of cheating or the tavern owner may bar him
** or her from playing for awhile. The tavern also continues to function as
** usual as a place to recruit new heroes.

** To install this script in a map, simply copy & paste the code into a global
** (timed) event. Copy the entire code, from ZVSE to the end. Make sure that
** you disable ALL colours from receiving the event and/or change the event
** day to 500 or later to avoid the ERM script popping up as if it were a
** regular event message.

** And of course, you'll also need to put one or more Taverns on your map for
** the heroes to visit. Happy gambling! :-)

Function #s used in this code: 1, 2

Flags used in this code: 1, 400-408
1=used for many things - tests etc.
400=Q value only - flag not changed
401=true if hero wants to, and is able to play
402=true if hero has enough movement points left to play
403=true if player's gold is less than the game's high stake value
404=true if hero knows fortune spell
405=true if player still wants to play despite being low on gold
406=true if player has enough gold for high stake *or* has enough only for low stake and still wishes to play
407=true if hero casts fortune spell
408=true if player fights monsters to get winnings back

Variables used in this code: v400-v419, z201-z205, w41-w42
v400 = current date - "date too many games were won" by hero
v401 = $players$ = number of card players
v402 = $luck$ = artifact luck/hero's total luck bonus
v403 = $mana$ = hero's current spell points
v404 = $air$ = hero's air magic skill
v405 = $cost$ = cost of casting fortune
v406 = $skill$ = hero's luck skill
v407 = $tluck$ = hero's temporary luck
v408 = $lstake$ = low gold stake
v409 = $hstake$ = high gold stake
v410 = $gold$ = player's current gold
v411 = $stake$ = stake chosen stake for this game
v412 = $result$ = outcome of this game
v413 = $prize$ = artifact pendant prize
v414 = random monster number
v415 = x location of hero
v416 = y location of hero
v417 = l location of hero
v418 = random number for choosing name of "winning card combo"
v419 = new random number for checking for monster "cheating" accusations
v420 = number of players for message display purposes
w41 = number of games won by hero
w42 = date that hero won "too many games"
z201 = $hname$ = Hero's name
z202 = $gcards$ = winning hand for $result$ of 95 or higher
z203 = $you1$ = preface for some game result text
z204 = $you2$ = preface for some other game result text
z205 = message text for knowledge of fortune spell


!#TM1:S1/999/1/1;
!?TM1&1000;
!!VRw1:S0;
!?OB95;            
!!OB998:R;
!!IF:W-1;
!!VRw200:+1;
!!OB998&w200>3:S;
!!IF&w200>3:Q2^还想赌啊?明天来吧^;
!!FU&w200>3:E;      


!!IF:V1/0 V400/0 V401/0 V402/0 V403/0 V404/0 V405/0 V406/0 V407/0 V408/0;


!#MCv401:S@players@;
!#MCv402:S@luck@;
!#MCv403:S@mana@;
!#MCv404:S@air@;   
!#MCv405:S@cost@;
!#MCv406:S@skill@;
!#MCv407:S@tluck@;[v407can now also be referenced as $tluck$
                              - hero's temporary luck)]
!#MCv408:S@lstake@; [v408can now also be referenced as $lstake$
                                 - low gold stake]
!#MCv409:S@hstake@; [v409can now also be referenced as $hstake$
                                 - high gold stake]
!#MCv410:S@gold@;   [v410can now also be referenced as $gold$
                              - player's current gold]
!#MCv411:S@stake@;[v411can now also be referenced as $stake$
                                 - stake chosen for this game]
!#MCv412:S@result@; [v412can now also be referenced as $result$
                              - outcome of game]
!#MCv413:S@prize@;[v413can now also be referenced as $prize$
                               - artifact pendant prize]

!#MCz201:S@hname@;[z201 can now also be referenced as $hname$
                            - hero's name]
!#MCz202:S@gcards@;[z202can now also be referenced as $gcards$
                            - winning hand for $result$ of 95 or higher]

!#MCz203:S@you1@;   
!#MCz204:S@you2@;    [z204can now also be referenced as $you2$


!!VR$luck$:S0;   !!VR$mana$:S0;
!!VR$air$:S0;    !!VR$cost$:S0;
!!VR$skill$:S0;   !!VR$tluck$:S0;
!!VR$lstake$:S0;   !!VR$hstake$:S0;
!!VR$gold$:S0;    !!VR$stake$:S0;
!!VR$result$:S0;   !!VR$prize$:S0;

!!HE-1:W>=300;
!!IF&1:V401/1 V402/1;

!!VR$players$:S2 R3;
!!IF&401/1000:Q401^这是一张%$players$玩家的游戏扑克,来想压下赌注来玩吗?^;


!!HE-1:B0/?$hname$;
!!IF:W-1;            
!!VRv400:S0;      


!!VRv400&w42>0:Sc0 -w42;
!!VRv400&w42>0::4;
!!VRw41&w42>0/v400>=1:-v400 -1;
!!VRw42&v400>=1/w42>0:Sc0;
!!IF&401/w41>=10/1000:V401/0 M^酒馆的主人走到你面前说:“对不起,%$hname$,你最近赢得太多了,我建议你把牌放下休息一会儿。”^;


!!IF&-402/1000:M^你在赌场的四周观望了一下,但最后所有的玩家最后都回家了。^;




!!FU1&401/1000:P;

!!IF&1000:Q1^你想四周观察一下小酒馆吗?^;
!!OB998&-1/1000:S;

---------------------------------------------------------------------------------------

!?FU1;

!!IF:V402/0;


!!VR$luck$:S0;
!!HE-1:A2/45/>0/>0;   
!!VR$luck$&1:+1;
!!HE-1:A2/46/>0/>0;   
!!VR$luck$&1:+1;
!!HE-1:A2/47/>0/>0;   
!!VR$luck$&1:+1;
!!HE-1:A2/48/>0/>0;   
!!VR$luck$&1:+1;
!!HE-1:A2/108/>0/>0;   
!!VR$luck$&1:+3;

!!HE-1:S9/?$skill$;
!!HE-1:R1/?$tluck$;


!!VR$luck$:+$skill$;
!!VR$luck$:+$tluck$;

!!HE-1:M=51/1;
!!IF&1:V404/1;   

!!HE-1&-404:A2/1052/>0/>0; [If hero doesn't know spell, check if hero has
                                                Fortune scroll]
!!IF&1:V404/1;

!!HE-1:A2/85/>0/>0;
!!VR$luck$&1:S0;
!!IF&1:V404/0;

----------

!!HE-1:I?$mana$;   

!!HE-1&404:S15/?$air$;

!!VR$cost$&404/$air$=0:S7;
!!VR$cost$&404/$air$>=1:S5;


!!VRz205&$air$=0:S^你拥有有关{幸运之神} 魔法的知识^;
!!VRz205&$air$=1:S^你施放了初级{幸运之神} 魔法^;
!!VRz205&$air$=2:S^你施放了高级{幸运之神} 魔法^;
!!VRz205&$air$=3:S^你施放了专家级{幸运之神} 魔法^;

!!VR$air$&404/$air$=0:S1;


!!IF&404/$mana$>=$cost$:Q407/9/51/2^%Z205,你想施放{幸运之神}来提高你赌博的运气吗?^;

!!VR$cost$:S$cost$ *-1;


!!IF&407:Q400/35/$cost$/1^你施放了{幸运之神},你的运气提高了^;

!!HE-1&407:Id$cost$;      
!!VR$luck$&407:+$air$;


!!IF&$luck$=-1:Q400/13/1/1^你觉得今天有点倒霉。

{(幸运值%$luck$)}^;

!!IF&$luck$=-2:Q400/13/1/13/1/1^你觉得今天有些幸运。

{(幸运值%$luck$)}^;

!!IF&$luck$=-3:Q400/13/1/13/1/13/1/1^你觉得今天非常幸运!

{(幸运值%$luck$)}^;

!!IF&$luck$<=-4:Q400/13/1/13/1/13/1/1^你觉得今天倒大霉了。

{(幸运值%$luck$)}^;

!!IF&$luck$=1:Q400/11/1/1^你觉得今天有一点点幸运。

{(幸运值+%$luck$)^;
!!IF&$luck$=2:Q400/11/1/11/1/1^你觉得今天非常幸运!

{(幸运值+%$luck$)^;
!!IF&$luck$=3:Q400/11/1/11/1/11/1/1^你觉得今天出乎意料的幸运!

{(幸运值+%$luck$)^;
!!IF&$luck$=4:Q400/11/1/11/1/11/1/1^你觉得今天超级幸运!

{(幸运值+%$luck$)^;
!!IF&$luck$=5:Q400/11/1/11/1/11/1/1^你觉得今天极端幸运!

{(幸运值+%$luck$)^;
!!IF&$luck$=6:Q400/11/1/11/1/11/1/1^你觉得今天惊人的幸运!

{(幸运值+%$luck$)^;
!!IF&$luck$=7:Q400/11/1/11/1/11/1/1^你觉得今天让人不能相信的幸运!

{(幸运值+%$luck$)^;
!!IF&$luck$>=8:Q400/11/1/11/1/11/1/1^你觉得今天特别的幸运!

{(幸运值+%$luck$)^;

!!VR$luck$:S$luck$ *7;

----------

!!VR$lstake$:S100 *$players$;   
!!VR$hstake$:S$lstake$ *10;   

!!OW:R-1/6/?$gold$;

!!IF&$gold$<$lstake$:V402/1;
!!IF&$gold$<$hstake$:V403/1;


!!IF&402:M^你的钱已经用完了,你必须离开这里了。^;


!!IF&-402/403:Q405/36/$lstake$/2^你的钱已经不多了,你还要继续玩吗?^;

!!IF&-402/403/405:V406/1;


!!IF&-402/-403:Q405/36/$lstake$/36/$hstake$/7^选择的下的赌注^;

!!VR$stake$&-402/405:S$lstake$;      
!!VR$stake$&-402/-403/-405:S$hstake$;

!!IF&-402/-403:V406/1;

!!FU2&406:P0;      


----------------------------------------------------------------------------------

!?FU2;

!!HE-1:R1/0;         
!!HE-1:Wd-4;         


!!VR$you1$&$luck$<0:S^你证明了你不幸运的感觉。^;
!!VR$you1$&$luck$>0:S^你的幸运并不管用。^;
!!VR$you1$&$luck$=0:S^你^;
!!VR$you2$&$luck$>=0:S^你^;
!!VR$you2$&$luck$<0:S^你的不幸运并没有阻碍你的胜利。^;

----------

!!VR$result$:S1 T99;
!!VR$result$:+$luck$;


!!IF&$result$<=30:Q401/13/1/1^%$you1$玩了一场失败的赌博,使你损失了所有的赌注,一共是:

{%$stake$黄金}。^;

!!VR$stake$&$result$<=30:S$stake$ *-1;
!!OW&$result$<=30:R-1/6/d$stake$;      
!!VRw41&$result$<=30/w41>1:-2;
!!VRw41&$result$<=30/w41=1:-1;

----------


!!VR$stake$&$result$>30/$result$<=60:S$stake$:2;      

[...and display this message]
!!IF&$result$>30/$result$<=60:Q401/13/1/1^%$you1$发现你并不幸运后退出了赌场,你只损失了一半的赌注,一共是:

{%$stake$黄金}。^;

!!VR$stake$&$result$>30/$result$<=60:S$stake$*-1;
!!OW&$result$>30/$result$<=60:R-1/6/d$stake$;
!!VRw41&$result$>30/$result$<=60/w41>0:-1;

----------


!!IF&$result$>60/$result$<=75:Q401/36/0/1^%$you1$困难地玩完了赌博,算了一算,你不赢不亏。^;

----------


!!IF&$result$>75/$result$<=95:Q401/6/$stake$/1^%$you2$完美地胜利了,赌注翻了两翻,总共赚到了:

{%$stake$黄金}!!^;
!!VRw41&$result$>75/$result$<=95:+1;

----------

!!VR$prize$&$result$>95:S100 R8;   
!!VR$stake$&$result$>95:S$stake$*2;


!!VRv418:S0;
!!VRv418&$result$>95:S1 R5;
!!VR$gcards$&v418=1:S^五个A^;
!!VR$gcards$&v418=2:S^三张同牌^;
!!VR$gcards$&v418=3:S^五个K^;
!!VR$gcards$&v418=4:S^同花顺^;
!!VR$gcards$&v418=5:S^五个Q^;
!!VR$gcards$&v418=6:S^五个J^;


!!IF&$result$>95:Q401/6/$stake$/8/$prize$/1^你玩了一场惊险的赌博,得到了%$gcards$。你算了一下你的赌注,赢了{%$stake$} {黄金} 和一个奖品:一条充满魔力的项坠。^;

!!HE-1&$result$>95:A$prize$;      
!!VRw41&$result$>95:+2;

----------

!!OW&$result$>75:R-1/6/d$stake$;

----------

!!VRw42&w41>=10:Sc0;

----------




!!VRv419:S0;
!!VRv414&$result$>100:S0 T144;
!!VRv414&v414=122:S0 T121;
!!VRv414&v414=124:S0 T121;
!!VRv414&v414=126:S0 T121;
!!VRv414&v414=128:S0 T121;

!!HE-1:P?v415/?v416/v417;


!!VRv419&$result$>100:S$result$ T50;
!!VRv419&$result$>100:-100;


!!VRv420&v419>40:S$players$ *65536 +v414;
!!IF&v419>40:Q408/21/v420/2^其他%$players$玩家拍着桌子控告你作弊,你是否打败他们来获得你的黄金和项坠?^;


!!IF&v419>40/-408:Q1/36/$stake$/8/$prize$/1^他们拿着你的战利品离开了,嘲笑着你的懦弱。^;
!!VR$stake$:*-1;
!!OW&v419>40/-408:R-1/6/d$stake$;
!!HE-1&v419>40/-408:A3/$prize$/1/1;


!!IF&v419>40/408:M^愤怒的赌徒向你发起了攻击!^;
!!HE-1&v419>40/408:Tv415/v416/v417/v414/$players$;

zpf1986yes 发表于 2010-8-22 21:07:28

AIR你真是神人,爱死你咯
页: [1]
查看完整版本: 酒馆赌钱ERM的修改问题

捐赠