关灯
开启左侧

[端游] 【千年服务端】太极牌升级NPC脚本

[复制链接]
admin实名认证 发表于 2025-8-12 15:53:41 | 显示全部楼层 |阅读模式 打印 上一主题 下一主题
 
太极牌升级NPC脚本
想当初我们玩官方的时候太极牌是多少人向往的宝贝,可是现在服务器太级装备都是垃圾了,用这个脚本可以稍微为太极剑门带来点门票收入,呵呵.也许有办法让太级牌直接可以升级,但是我实在是能力有限,喜欢的话拿去用吧^_^

首先,TGS\ITEM.SDB下增加以下4样物品

太极牌1级,太极牌,38,身上有太极类武器时才能发挥作用,,,,,,,FALSE,FALSE,193,,,,,,1,,,,10000,,,,,,,,TRUE,,,,,,36,,240,84,84,84,,,,,,,,,,FALSE,,,FALSE,,,,,,,,,,,,,199,,,,,
太极牌2级,太极牌,38,身上有太极类武器时才能发挥作用,,,,,,,FALSE,FALSE,193,,,,,,1,,,,10000,,,,,,,,TRUE,,,,,,45,,300,105,105,105,,,,,,,,,,FALSE,,,FALSE,,,,,,,,,,,,,199,,,,,
太极牌3级,太极牌,38,身上有太极类武器时才能发挥作用,,,,,,,FALSE,FALSE,193,,,,,,1,,,,10000,,,,,,,,TRUE,,,,,,60,,400,140,140,140,,,,,,,,,,FALSE,,,FALSE,,,,,,,,,,,,,199,,,,,
太极牌4级,太极牌,38,身上有太极类武器时才能发挥作用,,,,,,,FALSE,FALSE,193,,,,,,1,,,,10000,,,,,,,,TRUE,,,,,,75,,500,175,175,175,,,,,,,,,,FALSE,,,FALSE,,,,,,,,,,,,,199,,,,,
然后是TGS\NPC.SDB

太极牌锻造师,太极牌锻造师,0,,,,,,,,,,62,81,235,0,0,,,,20000,0,0,0,0,,4,,,,,,,,,,,,,,,TRUE,
接着是TGS\HTLP下建立一个文件   太极牌锻造师.TXT

<trade>
<title>太极牌锻造师</title>
<image name=z81 value=235>
<text>
把太极牌交给我可以帮你锻造
</text>
<command send='close'>关闭</command>
<command send="sheng1">太极牌升1级</command>

<command send="sheng2">太极牌升2级</command>

<command send="sheng3">太极牌升3级</command>

<command send="sheng4">太极牌升4级</command>

</trade>

接着是TGS\SCRIPT下建立一个文件 太极牌锻造师.TXT

  1. unit 太极牌锻造师;

  2. interface

  3. function  GetToken (aStr, aToken, aSep : String) : String;
  4. function  CompareStr (aStr1, aStr2 : String) : Boolean;
  5. function  callfunc (aText: string): string;
  6. procedure print (aText: string);
  7. function  Random (aScope: integer): integer;
  8. function  Length (aText: string): integer;
  9. procedure Inc (aInt: integer);
  10. procedure Dec (aInt: integer);
  11. function  StrToInt (astr: string): integer;
  12. function  IntToStr (aInt: integer): string;
  13. procedure exit;

  14. procedure OnLeftClick (aStr : String);
  15. procedure OnGetResult (aStr : String);

  16. implementation

  17. procedure OnGetResult (aStr : String);
  18. var
  19.    Str, Name : String;
  20.    iCount, iKind : Integer;
  21. begin
  22.    if aStr = 'close' then begin
  23.       exit;
  24.    end;
  25.      if aStr = 'sheng1' then begin
  26.       Str := callfunc ('getsenderitemexistence 太极牌:1');
  27.       if Str = 'false' then begin
  28.          print ('say 没太极牌怎么升级啊?');
  29.          exit;
  30.       end;
  31.       Str := callfunc ('checkenoughspace');
  32.       if Str = 'false' then begin
  33.          print ('say 你的包包太小了');
  34.          exit;
  35.       end;

  36.       print ('getsenderitem 太极牌:1');

  37.       iKind:= Random (4);
  38.       if iKind = 0 then begin
  39.          Str := 'putsendermagicitem 太极牌1级 @太极牌锻造师 4';
  40.          print (Str);
  41.       end;
  42.       if iKind = 1 then begin
  43.          Str := 'putsendermagicitem 太极牌1级 @太极牌锻造师 4';
  44.          print (Str);
  45.       end;
  46.       if iKind = 2 then begin
  47.          Str := 'putsendermagicitem 太极牌1级 @太极牌锻造师 4';
  48.          print (Str);
  49.       end;
  50.       if iKind = 3 then begin
  51.          print (Str);
  52.       end;
  53.       print ('say 无论如何,都要感谢你让我看到太极剑门的壮大');
  54.    end;
  55.      if aStr = 'sheng2' then begin
  56.       Str := callfunc ('getsenderitemexistence 太极牌1级:1');
  57.       if Str = 'false' then begin
  58.          print ('say 没有太极牌或者太极牌不是1段');
  59.          exit;
  60.       end;
  61.       Str := callfunc ('checkenoughspace');
  62.       if Str = 'false' then begin
  63.          print ('say 你的包包太小了');
  64.          exit;
  65.       end;
  66.       print ('getsenderitem 太极牌1级:1');

  67.       iKind:= Random (2);
  68.       if iKind = 0 then begin
  69.          Str := 'putsendermagicitem 太极牌2级 @太极牌锻造师 4';
  70.          print (Str);
  71.       end;
  72.       if iKind = 1 then begin
  73.          print (Str);
  74.       end;
  75.      
  76.       print ('say 无论如何,都要感谢你让我看到太极剑门的壮大');
  77.    end;
  78.      if aStr = 'sheng3' then begin
  79.       Str := callfunc ('getsenderitemexistence 太极牌2级:1');
  80.       if Str = 'false' then begin
  81.          print ('say 没太极牌或者太极牌不是2段');
  82.          exit;
  83.       end;
  84.       Str := callfunc ('checkenoughspace');
  85.       if Str = 'false' then begin
  86.          print ('say 你的包包太小了');
  87.          exit;
  88.       end;
  89.       print ('getsenderitem 太极牌2级:1');

  90.       iKind:= Random (3);
  91.       if iKind = 0 then begin
  92.          Str := 'putsendermagicitem 太极牌3级 @太极牌锻造师 4';
  93.          print (Str);
  94.       end;
  95.       if iKind = 1 then begin
  96.          Str := 'putsendermagicitem 太极牌3级 @太极牌锻造师 4';
  97.          print (Str);
  98.       end;
  99.       if iKind = 2 then begin
  100.          print (Str);
  101.       end;
  102.      
  103.       print ('say 无论如何,都要感谢你让我看到太极剑门的壮大');
  104.    end;
  105.      if aStr = 'sheng4' then begin
  106.       Str := callfunc ('getsenderitemexistence 太极牌3级:1');
  107.       if Str = 'false' then begin
  108.          print ('say 没太极牌或者太极牌不是3段');
  109.          exit;
  110.       end;
  111.       Str := callfunc ('checkenoughspace');
  112.       if Str = 'false' then begin
  113.          print ('say 你的包包太小了');
  114.          exit;
  115.       end;
  116.       print ('getsenderitem 太极牌3级:1');

  117.       iKind:= Random (4);
  118.       if iKind = 0 then begin
  119.          Str := 'putsendermagicitem 太极牌4级 @太极牌锻造师 4';
  120.          print (Str);
  121.       end;
  122.       if iKind = 1 then begin
  123.          print (Str);
  124.       end;
  125.       if iKind = 2 then begin
  126.          print (Str);
  127.       end;
  128.       if iKind = 3 then begin
  129.          print (Str);
  130.       end;
  131.      
  132.       print ('say 无论如何,都要感谢你让我看到太极剑门的壮大');
  133.    end;
  134. end;
  135. end;

  136. procedure OnLeftClick (aStr : String);
  137. var
  138.    Str : String;
  139.    Race : Integer;
  140. begin
  141.    Str := callfunc ('getsenderrace');
  142.    Race := StrToInt (Str);
  143.    if Race = 1 then begin
  144.       Str := 'showwindow .\help\太极牌锻造师.txt 1';
  145.       print (Str);
  146.       exit;
  147.    end;
  148. end;

  149. end.
复制代码

 
VIP介绍
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

  • 最佳新人

    注册账号后积极发帖的会员
  • 活跃会员

    经常参与各类话题的讨论,发帖内容较有主见
  • 热心会员

    经常帮助其他会员答疑
  • 推广达人

    积极宣传本站,为本站带来更多注册会员
  • 宣传达人

    积极宣传本站,为本站带来更多的用户访问量
  • 灌水之王

    经常在论坛发帖,且发帖量较大
  • 突出贡献

    长期对论坛的繁荣而不断努力,或多次提出建设性意见
  • 优秀版主

    活跃且尽责职守的版主
  • 荣誉管理

    曾经为论坛做出突出贡献目前已离职的版主
  • 论坛元老

    为论坛做出突出贡献的会员

0关注

7粉丝

3752帖子

排行榜
作者专栏

QQ交流群&&微信订阅号

QQ交流群

微信订阅号

吾爱尚玩资源基地永久域名:

Www.523.Games

在线管理员QQ:1589479632

邮箱:Email@523play.com

QQ交流群:558936238

Copyright   ©2015-2116  吾爱尚玩资源基地|523.Games