游客您好
  • 点击联系客服

    在线时间:8:30-18:00

    客服微信

    Wkr-3000y-kf

    电子邮件

    3000y@wenkeruan.com
  • 手机版

    随时掌握游戏动态

  • 扫一扫二维码

    添加微信客服

Lv.7 版主
8号会员,9活跃值,2022.09.01 加入
  • 127发帖
  • 123主题
  • 0关注
  • 0粉丝
这个人很懒,什么也没有留下。
独家推荐 更多>

神武奖品兑换员脚本

[复制链接]
异仟年认证商人 发表于 2022-9-5 17:33:01 | 显示全部楼层 |阅读模式 打印 上一主题 下一主题
tgs1000\init\npc.sdb里加
- a/ u3 }# J( E9 U/ e奖品兑换员,奖品兑换员,0,,,,,,,,,,62,81,235,0,0,,,,20000,0,0,0,0,,0,,,,,,,,,,,,,,,TRUE,
2 |* X3 ]9 t, I- I' ztgs1000\script文件加里创建一个文本 名字:奖品兑换员' H; e1 K0 r. ^" E
------------------------------------------------
' h" `% ?+ |3 m: S, U5 [" uunit 奖品兑换员;4 I6 K) p, S" f9 o9 m) H
& q/ ]$ W! {# k
interface2 J3 [/ @! x( ]  Y3 x

" t7 }! I8 }  |! Ffunction  GetToken (aStr, aToken, aSep : String) : String;1 B& u. Q: T0 a! h6 i* O
function  CompareStr (aStr1, aStr2 : String) : Boolean;
. ~5 f  M- ~: W+ E  Mfunction  callfunc (aText: string): string;) s# C) b% _, Z! _  w
procedure print (aText: string);
% h0 w: e/ m/ T( V1 P) Q( c2 Nfunction  Random (aScope: integer): integer;6 u& v/ |* `. y* h6 ~
function  Length (aText: string): integer;. t! m) k" W& B9 o3 X
procedure Inc (aInt: integer);5 g9 i" j  i" d1 R4 H
procedure Dec (aInt: integer);
) ]( o/ p4 s4 U' Y( M: o4 X5 G6 Zfunction  StrToInt (astr: string): integer;
4 J  K# H! M' z0 R" V% Xfunction  IntToStr (aInt: integer): string;' w- u, T; ?3 ?7 j3 P1 w
procedure exit;
) Q. G* J  [: e4 \$ Gprocedure OnGetResult (aStr : String);* q0 D5 _2 x/ B! Z, d5 J% v: b
procedure OnLeftClick (aStr : String);! M3 \8 E! @  a& V8 W9 x  s, c9 Z
procedure OnApproach (aStr : String);% E* g& G0 Y% n6 J; y
procedure OnAway (aStr : String);) J1 _! F0 R, y3 K8 b. a- X
procedure OnArrival (aStr : String);
* x% m$ t1 K/ ~) |; }% [7 Zvar
) C" L1 F0 `. [iCallCount : Integer = 0;+ |0 s8 s- u0 `5 D* B9 v8 w6 M
implementation
3 N, T8 W& E9 u* Y0 Mprocedure OnAway (aStr : String);
5 I# \0 U8 Q) R6 _var
* d* M+ U2 t. e   Str : String;2 K: P: ^% J8 h, i' \( Y
   Race : Integer;
2 w) J/ ~* i* X9 U( W. Qbegin# X- u- G1 X  q* B( ]% R
   Str := callfunc ('getsenderrace');0 H, @) t& n8 p7 k# ?) l- D& e
   Race := StrToInt (Str);
' J: M; I2 V, B   if Race = 1 then begin# z- O+ Q- _; T# t0 z8 H8 b  j- i
      print ('say 拉拉拉拉,贪财老人来喽...');
5 B4 R  s( M4 j8 s: h6 Z+ q5 \   exit;
3 I+ t( O' f* e5 d* }   end;
) e, J5 w, f1 J( r" L$ m' \# jend;
9 @8 G! w  r7 j; Kprocedure OnApproach (aStr : String);, B& G2 c3 F* M0 Q
var( E8 b0 [4 }& q. _' Q; [
   Str : String;
' J  b3 {; }# @# U1 ]   Race : Integer;
8 n% X) D& d3 l* N" Lbegin9 Z5 Y/ W( g, |  e" e
   Str := callfunc ('getsenderrace');( G. e, B- T0 {" G: k, }: f
   Race := StrToInt (Str);, \8 t1 |9 J+ L% I# X
   if Race = 1 then begin' ^' B$ I7 [+ Y- F) C/ K
      print ('say 各位节日快乐...');
: i& p2 W1 U' Z# d, b& k( n   exit;
% }0 W! h; p. @# g9 k( P   end;
; F" {" Z& R* [( i1 }end;% |3 W0 Z* o3 x* @6 V! a. q  o
procedure OnLeftClick (aStr : String);& e: z$ u' _; o1 n% k/ N
var6 k' T0 o- {9 q& L. x
   Str : String;  p- A! H  @0 n! o, X9 g8 ?( n
begin
, L: P- {9 m& L9 Y/ I* u   Str := 'showwindow .\help\奖品兑换员.txt 1';
% O2 c# P+ m, R3 Q+ D* s* }   print (Str);
4 f. O& m3 Y: V8 i8 r# I   exit;
4 @2 u6 S, `" s5 ]* D6 [  b9 c+ zend;
. d: N/ r" X5 r0 ~5 Q. H+ |procedure OnGetResult (aStr : String);
+ S& P4 t) y8 D0 U. p4 X8 Svar
  P5 {( q6 r; d9 v0 ?+ b, I+ q   Str, Name : String;' [, A( ]! x5 w$ d! B
   iRandom, iKind : Integer;
8 H0 m5 {/ u- ]8 h* lbegin
) U  y+ }/ s# P5 n   if aStr = 'jinyuan' then begin
2 H9 z0 v6 E" T4 \( I      Str := callfunc ('getsenderitemexistence 金元:5');
# T- m* N' p9 e$ m- I, o- T      if Str = 'false' then begin" V2 _2 S0 R4 l. g* s1 b/ V4 s
         Str := 'say 哪有免费的午餐?拿5个金元来!';
9 a6 S1 _+ ]! |5 S- O! i: x         print (Str);
+ u6 Z% ], D3 W         exit;' s. y+ h6 ?) ~* t0 W# Y
      end;: h% v/ e, X; h9 j3 B& m) L
      if Str = 'true' then begin  w3 _" p- E) a3 H6 L& S
         Str := 'getsenderitem 金元:5';
8 t4 _2 X- ~. c  e- ~         print (Str);
+ U) \0 W7 c, Q" P         Str := 'say 小子,你的金子是假的!哈哈^_^哈!';
* z! ~) ^$ V/ r0 ]: G         print (str);
5 M0 {5 ?3 l' o, E4 }, _9 A         iRandom := Random (5);
, g8 y" t( A  v2 e/ ~         if iRandom = 1 then begin" B0 c) q# D+ E- e5 t
            Str := callfunc ('checkenoughspace');1 V9 i3 @( Q- Y7 b" ^7 S7 `
            if Str = 'false' then begin! M( S1 a6 j' q  L7 b. ~& Z
               print ('say 物品栏已满~');
% @3 p  k/ Q4 d4 G               exit;
/ m$ F: l* w# ]& e5 V- {. y            end;
- z& U" u  o$ L            iKind := Random (29);! @$ @. n& Q4 E2 n$ b9 J
            if iKind = 0 then begin. y8 l& v5 Q# b+ `- L# |4 l' ]. s
               Str := 'putsendermagicitem 男子英雄铠甲 @奖品兑换员 4';
5 [! m0 Y: U! V" B               print (Str);
1 Y/ k5 C8 U9 c; I6 Y            end;/ E0 c7 J# e5 X9 M7 k7 S! V
            if iKind = 1 then begin* D6 q1 w/ ]) A% D' h: h
               Str := 'putsendermagicitem 女子英雄铠甲 @奖品兑换员 4';$ Y: @4 b1 O/ P5 x# B$ x! h  g
               print (Str);, |5 L. \1 d6 d
            end;
) S  N% U* S: y; g8 M            if iKind = 2 then begin
& H5 Z7 v# V0 H1 Q               Str := 'putsendermagicitem 男子英雄头盔 @奖品兑换员 4';1 h5 _  Y/ A. g* I' l* O% m  |
               print (Str);
; J, w2 N' y% o, Y% X            end;
0 H" I8 i% f! N2 [            if iKind = 3 then begin2 H8 F$ T, r+ ^% Q* W. T
               Str := 'putsendermagicitem 女子英雄头盔 @奖品兑换员 4';
" f2 q# t5 s4 R+ i. L: p, w               print (Str);! q! _+ r9 @+ I, @5 ^; r
            end;/ v& m4 b/ B3 d7 P8 E# s
            if iKind = 4 then begin
5 E0 t  k5 Y. S. x  o# W               Str := 'putsendermagicitem 男子英雄护腕 @奖品兑换员 4';
8 r9 a) }& |, E/ Z1 e3 {. M) H               print (Str);  m! M" o5 ?5 l  J8 a4 C5 X- @: `
            end;
  a; h. Y9 w2 T$ y( P            if iKind = 5 then begin
$ y5 m: D% V; \( X- ?& P/ }% Z               Str := 'putsendermagicitem 女子英雄护腕 @奖品兑换员 4';
- P/ N6 E+ C: `+ y               print (Str);0 B$ S8 e$ I$ ~/ b
            end;
: q. ~" Y5 G, G7 S            if iKind = 6 then begin
, o, A/ ]) s; \6 }8 P# _* P               Str := 'putsendermagicitem 男子英雄战靴 @奖品兑换员 4';8 U: \+ l+ K0 B  b( r7 E3 H
               print (Str);9 n( G& T3 }! L: m! p/ u! X7 X+ B
            end;
; s1 W* w; e) y- ~1 J: b9 P4 s; Z            if iKind = 7 then begin
7 D- K8 b0 {, I8 B3 q               Str := 'putsendermagicitem 女子英雄战靴 @奖品兑换员 4';
3 Z$ u9 P8 d2 h0 ~- }7 Z& Q6 X& n               print (Str);
+ L: D- ^2 p: O- p9 P6 c9 k* o3 f            end;& V, P/ O; O$ _+ V9 B! \& |1 Y' G$ n
            if iKind = 8 then begin+ x' L& c$ s& \
               Str := 'putsendermagicitem 百炼三*戟 @奖品兑换员 4';
* n, n9 p0 P, W. }; M               print (Str);0 i& [/ m5 d4 |5 K" T
            end;7 L3 f' ~, |: K1 l8 w! v
            if iKind = 9 then begin; O% z( e+ s2 n- F5 \
               Str := 'putsendermagicitem 百炼日本刀 @奖品兑换员 4';5 o; y6 @" P, Y4 r& R
               print (Str);! Y+ t' t- i  V7 c9 @
            end;
9 A7 O8 ?6 v: c/ L           if iKind = 10 then begin
9 |9 D! \0 Q: t$ u               Str := 'putsendermagicitem 百炼忍者剑 @奖品兑换员 4';
% I# t3 L) n  L               print (Str);
8 c  B6 g- Y5 \! `) i" \4 ?            end;
; l( h- _$ [5 E' f2 G+ m           if iKind = 11 then begin9 q* ~3 s7 b+ |9 m
               Str := 'putsendermagicitem 白骨魔棒 @奖品兑换员 4';
4 b4 o* Y8 v0 r' O7 C* b* }! ]               print (Str);
  Y) n( @) n3 B1 d( l2 r, z            end;
$ k/ }) {+ |$ d5 x( l7 \. u/ |% E           if iKind = 12 then begin4 ?# `+ ~( p: m3 b/ p3 Q9 P
               Str := 'putsendermagicitem 生药 @奖品兑换员 4';
& A- g  }$ n7 E3 [4 s# Q+ s               print (Str);
% A% G! H2 h- G) W0 c  w5 @            end;
2 p: \3 j- D- t           if iKind = 13 then begin
2 ?" {# O2 Y+ D) F6 C' `+ {- J9 b               Str := 'putsendermagicitem 男子魔人护腕 @奖品兑换员 4';
( x: ?$ \( d/ G9 ~               print (Str);
" k' ?2 n& I  U& Q* F1 E9 i            end;8 f/ I, c6 y6 S, Z- G2 Q+ z
           if iKind = 14 then begin
  B, V1 o2 K+ i- e+ w               Str := 'putsendermagicitem 女子魔人护腕 @奖品兑换员 4';
: Y3 ?' `5 ?0 z               print (Str);+ U7 b0 o& _7 i0 \& [. X; o
            end;  s' ~' F% w* w+ G6 j( z( r
          if iKind = 15 then begin
/ ~0 @; y1 }& Z               Str := 'putsendermagicitem 金币 @奖品兑换员 4';/ F1 V. N" m8 a2 o8 s( [
               print (Str);
- j& p. r" C  V- H2 F# [            end;' m+ z; w1 W* u" v4 N. B% x9 i
           if iKind = 16 then begin
" k* b  f1 |7 ?% L# V, s% }' r               Str := 'putsendermagicitem 千年水晶原石 @奖品兑换员 4';( }) g5 K9 b6 Z
               print (Str);
6 \. [+ n1 w6 H            end;3 ]0 E  _) _* v- ?, Y! a9 c
           if iKind = 17 then begin% h7 u. `" [7 b6 S
               Str := 'putsendermagicitem 千年水石 @奖品兑换员 4';+ z% r: o. n: T0 x" I
               print (Str);# A$ z! M  l: g+ ~- z  v1 D2 r
            end;
! `, f$ M4 a, U           if iKind = 18 then begin3 B& A6 g+ ]: i# h7 v" d; Z, ~
               Str := 'putsendermagicitem 象牙十字镐 @奖品兑换员 4';
6 s5 E. Y# y* q7 m               print (Str);
& z8 }0 T# {; @. d            end;
' {) _4 c) c0 W& \( e           if iKind = 19 then begin7 t7 t+ V- z# l9 H  Z
               Str := 'putsendermagicitem 男子黄金铠甲 @奖品兑换员 4';
  U6 j6 K& s% }" F; Q1 M6 ?               print (Str);' U$ K0 M4 F+ u' v
            end;9 x' t" g3 E0 F. C
           if iKind = 20 then begin
% J+ Q& v- V  _0 ?( B: y/ D4 Y               Str := 'putsendermagicitem 女子黄金铠甲 @奖品兑换员 4';: N+ K- n2 ~4 D9 s7 [! S7 p9 N0 i! k
               print (Str);
- Y9 Q7 L" |/ ~" s            end;& j* l% i- O- o3 G8 c. h( b1 G
           if iKind = 21 then begin3 y6 ~$ w0 K3 S5 Z! W
               Str := 'putsendermagicitem 男子桂林弓服 @奖品兑换员 4';
, A2 u) L- q. E5 z# \) x               print (Str);
1 d9 u0 O. n0 U            end;/ {4 |8 w8 [! O& V% V- F* T, z( T7 ~
           if iKind = 22 then begin
9 q- Y+ @- N* m/ Y/ h) [, f" E               Str := 'putsendermagicitem 女子桂林弓服 @奖品兑换员 4';
$ C* [: |0 s0 r" o5 @; A3 ~3 R               print (Str);: p. r* }* j8 O4 l/ K6 O. t
            end;
" y4 `- F! M9 A           if iKind = 23 then begin- [. S0 N! }! v6 t6 V( `
               Str := 'putsendermagicitem 太极明珠 @奖品兑换员 4';! C, ]* }: Z+ M! m
               print (Str);# I" W, p& Q1 H/ a
            end;
" k% u" i; e4 [6 _9 s, l           if iKind = 24 then begin
5 t" a& m9 B( q: u- N8 x3 S. q2 O               Str := 'putsendermagicitem 狐狸内丹 @奖品兑换员 4';# t+ m# U1 _1 s% Y2 H& \, m
               print (Str);' S2 p) T, }& i/ D: r3 N
            end;
2 p$ N* f5 l- C3 s7 P# S           if iKind = 25 then begin
# h2 U2 _% U$ A               Str := 'putsendermagicitem 白玫瑰 @奖品兑换员 4';
/ o$ W; ~: u! u. u% H9 f               print (Str);9 }2 M% c+ y9 m. W" ?
            end;
% {0 k6 t+ ?7 \5 a- y+ D" c8 `# Y           if iKind = 26 then begin  U5 }& G5 ^9 F) J
               Str := 'putsendermagicitem 红玫瑰 @奖品兑换员 4';
2 ]0 G: D& y) f0 Y               print (Str);5 S3 f& {! b( i& j- R! _
            end;7 y; L) _. f* ^/ r! U: P7 K
           if iKind = 27 then begin
9 i! ^4 ?( Z- h( F3 _               Str := 'putsendermagicitem 灵动八方 @奖品兑换员 4';
6 |5 {1 k* L% f4 k               print (Str);
  e) @4 L: y5 o$ ]" u4 Y' h; q            end;6 E0 b7 Z$ N: x' ~; o
           if iKind = 28 then begin
8 K6 \: V% A4 B  ?4 k8 s               Str := 'putsendermagicitem 男子魔人战靴 @奖品兑换员 4';
* Z  E" p! j- ^: w* ^' Q               print (Str);
. T! z8 N; J; O/ S- q            end;
) r' z: Q7 T5 p' c8 X" j           if iKind = 29 then begin
: j. Y/ k9 L: Y* t3 t% \               Str := 'putsendermagicitem 女子魔人战靴 @奖品兑换员 4';
: W5 i0 b: o8 P( l0 ]2 \1 p               print (Str);
6 e6 o) x$ G3 ?7 ]% A! }/ g5 M/ l/ m            end;' l1 @, ^/ r1 A; p7 m, ]4 p3 U
            Str := 'say 本想趁机摸你两把,可你身材太差了~';
6 v  b+ y0 M/ a3 x8 [- E            print (str);
2 Y$ w8 J  i* D         end;
" s) @* P" J: ]' |5 W" w; \         exit;( X' I2 u; @! L7 v2 ^9 a
      end;
$ j- ?  E7 C$ x# B( Y      exit;1 Z" L- f3 b$ N7 I, e; g, i" b
   end;* m& M) @5 n* j2 s" m" i
end;
3 L& q0 d, D- Y  B" S" E. F+ c. cend.
+ S2 s( G! |' i6 q* b2 K------------------------------------------------) {& n  Z$ U7 h6 a1 p6 O' e) U/ d, D
tgs1000\script文件夹里得script.sdb里
9 [  q# }6 L. q( K' l8 V最后一行加入) C+ X, q  C7 E7 j, x
--------------------
* {( d# y% O# H% l5 @130,奖品兑换员.txt,,  
4 F8 o1 U: t$ U+ B9 N/ v--------------------: a) \6 U; y7 u. V5 I
然后在tgs1000\help里建个文本文件 名字: 兑换员0 G6 P% `  x/ q- B* r
内容如下
% v  d* t9 I" g. [8 i' o------------------------------------------------
$ C# V* d7 V( R/ h<trade>
) M0 U8 [1 E! p3 x; [& a<title>奖品兑换员</title>( a7 Q! W' u0 ^5 N3 S/ ]1 s
<image name=z81 value=235>
, `/ W- m7 f! H$ L, m8 E- W2 H<text>
% e6 f2 {3 u, k- x8 x8 w8 c天下没有免费的午餐,努力吧!
+ }+ ^5 L4 C  o! b  ?</text>* Z% C; \' h7 h; V+ {
<command send='close'>关闭</command>9 Q8 k. u% s; f% {: e2 E* E; u
<command send="jinyuan">天下没有免费的午餐,拿5个金元来!</command>
. W0 U: ]' e1 c, O' M; O& v</trade>mand send="jinyuan">交换好运来,祝您好运</command>; B4 S7 U5 g/ L( Y4 E5 ?+ u
</trade>
* @( \1 V6 R' \$ N-----------------------------------------------------
) k: D- }0 T( U0 D( j, S9 ^$ r然后在NpcSetting目录下建立一个.sdb文件,命名为:奖品兑换员
" [$ @( M+ d: ]' p8 v: r+ w里面内容写成:
/ H$ i, ^% F0 c8 a( g* L& y$ J6 _8 ^5 P( Y3 U
Name,boSelfSay,boMain,MainNumber,HearString,SayString,NeedItem,GiveItem,CountLimit,RecoverTime,DelayTime,! g8 X. J6 \) T: X7 Q1 D/ v
1,TRUE,,,,我可是可以换到英雄装备的噢^_^!,,,,,1800,3 _+ i3 r2 ]4 J# _
-----------------------------------------------------% t" S" I0 a% ?( o! R" k
tgs1000\Setting文件夹里得CreateNpc1.sdb里加
! c2 g) I' r/ p; S6 n-----------------------------
( ?: h$ r& G8 ?/ a' m6 j* d( _104,奖品兑换员,524,474,1,5,130,奖品兑换员.sdb,

  J1 r0 \: q" J
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

三千游戏官方客服

扫一扫二维码

添加qq客服

Powered by Discuz!X3.4 ©2001-2013 Comsenz Inc.闽公网安备 35099902000100号增值电信业务经营许可证 闽B2-20220593 闽ICP备2023014375号