三千论坛
标题: 一个很好的会员服务脚本 [打印本页]
作者: 异仟年 时间: 2022-9-5 20:48
标题: 一个很好的会员服务脚本
unit 会员服务;! @' V# H1 _# y2 W4 k3 J
" V* V* F& f9 }5 l2 _! Y! w1 Tinterface
' T' n* ^# \0 u$ k/ T$ V* l D/ d# J' I4 p& h0 t
function GetToken (aStr, aToken, aSep : String) : String;& F4 K. |, ]( O) |8 F
function CompareStr (aStr1, aStr2 : String) : Boolean;
. j, r6 I( `: D0 d8 {function callfunc (aText: string): string;
* O9 u u4 o, X& ^1 L: B- Uprocedure print (aText: string);
- Q: J- Z8 ^2 }& o2 Q& N- R; n' Ffunction Random (aScope: integer): integer;% n* ~* w+ I( \/ Q) o4 Z
function Length (aText: string): integer;
( I9 [& ~' O n7 q5 Kprocedure Inc (aInt: integer);
, d2 i) H r1 u# v( D/ Yprocedure Dec (aInt: integer);& D; @4 } D: n
function StrToInt (astr: string): integer;
: r( w- K* N% Y3 |, Y9 \9 ~' H. Sfunction IntToStr (aInt: integer): string;
6 K) f4 i( i0 {, qprocedure exit;( j5 J: P* w7 J# T7 s/ y
$ h9 x {1 R6 k- L7 R( O5 ~procedure OnLeftClick (aStr : String);* ]% E/ _8 H( t) J2 O0 Y4 I
procedure OnGetResult (aStr : String);& m# p( b/ L( _+ e' r
7 c' [3 {' R: I4 K
implementation/ ~# E5 t- X/ u
procedure OnLeftClick (aStr : String);
4 m( v# Y8 j& w, Mvar1 Q: F% J' [+ w. M7 }
Str : String;- v. s1 o: j. ^& u0 L% j/ w1 d
Race : Integer;0 l. E2 j4 _. h
begin
9 V* N( ^. l6 `9 p5 x. i9 M5 i) { Str := callfunc ('getsenderrace');
# t% e: Q$ Z- Z1 G9 l Race := StrToInt (Str);
" q9 s0 F5 T* _) M# f1 U if Race = 1 then begin4 D2 u3 m. |4 Y
Str := 'showwindow .\help\会员服务.txt 0';
0 r3 ^/ d/ C0 H6 f& {, \0 @, k2 c print (Str);
/ c' J* j* C/ i6 C1 a& Q$ c* d* U exit; @, F" P! o$ U' o$ S
end;5 ]; K. V$ U& H9 n" b' ?
end;8 S! n( Z! U( P4 d! ?, ]% ]
procedure OnGetResult (aStr : String);
! d! w+ H7 O8 r8 p$ f, Y$ [: f6 u. ?var5 O" k7 |9 T# n- h. A
Str, Name, MapNo, WqName : String;% L% `& _6 H1 k8 @' N
iCount, MapID : Integer;1 o% o* p8 w& T9 p: e
begin; `% F8 v8 ?5 p9 f3 U
Name := callfunc ('getsendername');) F% x4 U1 r$ q) h% @# K) `, M2 t' k
if aStr = 'close' then begin
# I9 [: T9 F5 R( S, N W exit;
( M- L/ W8 z) O* w3 L% j end;+ S/ F7 o" O! Z
if aStr = 'xuanzhe' then begin% R V' N8 W# X" D }9 V
Str := 'showwindow .\help\会员服务1.txt 0';+ w9 B* ^$ Z9 W
print (Str);
, V3 x) ^* x( G7 V7 s( i6 K# b1 l2 e ? exit;
: w! _. L( `3 _0 x end;3 @, C7 e9 y- V# q0 H4 l2 V- q
if aStr = 'lingqu' then begin
# K2 g3 H9 P$ j& d1 d2 m. q0 Y Str := callfunc ('getsenderitemexistence 烈焰金戒:1');//此物品自己可以设
& ~- [! N3 t* Y# j. `! ?% T if Str = 'false' then begin. N$ P% v9 B8 [1 n0 x9 e+ b- U: T
print ('say 你不是会员吧');, r. w9 ^2 Q5 {: \
exit;1 ^3 l/ V1 `* f. _6 W B
end;% q- K1 J( O! ?% ~8 {- u* m
Str := callfunc ('checkenoughspace 5');
' j! c; J* v4 L& j3 m. j if Str = 'false' then begin
& @3 H) t; P+ Z1 R4 C print ('say 物品栏已满需要5个空格!');; g0 d- A+ d, K0 ~
exit;
2 H/ \1 c4 Z+ a* J6 N end;9 n& o$ N; X" B- I9 Q' J5 N6 W- V
for MapId := 0 to 200 do. i t& G; B" o* e5 R# k5 {
begin
/ ` o+ B( ]4 c; N6 y* n' M1 ^ MapNo := IntToStr (MapID);+ B* K. w& _9 C7 u) u8 u# k
str := 'sendnoticemsgformapuser ' + MapNo;
3 i. N0 ~9 y4 s, F& ]: O Str := Str + ' ';
+ z* X' r* w+ F) R% o& b& E Str := Str + '【会员系统】:『';
9 d$ o# U* t; R2 _) C3 H Str := Str + Name;
f P: ?6 T6 X2 s) H D/ f Str := Str + '』_领取了会员专用修炼物品开始修炼啦! 1';( X3 m; [% r9 R# B4 N
print (str);/ o0 A/ K g7 d6 ]4 _* q; O* w$ u% H1 d
end;
$ d1 W# `/ A- \ print ('putsendermagicitem 修练枪:1 @会员服务 4');# i- f- e1 }9 ^0 i6 o
print ('putsendermagicitem 修练刀:1 @会员服务 4'); 9 H! S+ c, m' o5 g9 M
print ('putsendermagicitem 修练剑:1 @会员服务 4');
- _8 U8 |; Z% W5 x: _2 K6 W6 @ print ('putsendermagicitem 修练斧:1 @会员服务 4');
% ]7 h1 D8 F- q3 j print ('putsendermagicitem 修练拳套:1 @会员服务 4');
7 g! S C7 u& {/ h! Z, ?3 X" { print (Str);
3 ~. J& K' @; w4 u+ L; x3 N2 [ exit;$ S9 k4 y' w, ]% K0 U
end;
5 F- e: {4 I. Y$ w if aStr = 'chuqu' then begin* ^+ ] o- t; u$ z) k2 J, Q' D' E& N
WqName := callfunc ('getsenderwearitemname 9');//检测是不是拿在手上,因为拿在手里就无法删除!特别声明此检测执行命令段由忧郁工作室小飞技术支持协助完成!特别鸣谢小飞支持!
6 N. z; S+ F; N& {8 S if WqName = '修炼枪' then begin
2 f; J$ v9 ^6 a1 B print ('say 你不是吧!想带走修炼武器!');' d5 P4 d2 Y$ s
exit;
" ?' J2 x Q& ]* ]: a2 u1 D) U end;
3 x6 R3 n6 J6 o& c( H if WqName = '修炼剑' then begin
A4 a* @ H/ l print ('say 你不是吧!想带走修炼武器!');7 V N: s- q$ ` J2 q
exit;) V+ E( {5 a5 ` z y; c3 l5 @' Y
end;& {; C' R% ^6 m9 }
if WqName = '修炼刀' then begin- |1 w; g; U8 i8 I) |8 ?; d
print ('say 你不是吧!想带走修炼武器!');
" Q9 T; g* t) M1 _/ ] exit;
1 d$ u1 B$ D6 } end;
$ s$ _% C' Y+ n" N# P" j w if WqName = '修炼斧' then begin
6 I% P0 }' a; H5 t6 m print ('say 你不是吧!想带走修炼武器!');: N' n9 R2 P1 V) M! G
exit;
' J& M/ g+ R- \) l8 O o: Z' R end;
3 q$ b. E" n8 k8 t1 ~) M if WqName = '修炼拳套' then begin& s/ }0 W: _! _' W
print ('say 你不是吧!想带走修炼武器!');
; y6 T5 t# V5 B! F9 g exit;0 x6 {* U) m" E: I3 R: o6 c
end;8 A. |% ]* a9 j0 L% K k
for MapId := 0 to 200 do
$ j. {' R d Y( y, o begin
% O* X8 A9 U4 J MapNo := IntToStr (MapID);+ _; {2 w% ~# X- H9 ~" ]# q& R/ H
str := 'sendnoticemsgformapuser ' + MapNo;- i9 ~6 Y" P, \9 S; D4 X4 z
Str := Str + ' ';
' h( |; a' T; S! w0 o! s- t' k+ e Str := Str + '【会员系统】:『';
4 m% a# C0 j; d Str := Str + Name;
" D% A9 |$ Q5 E' K$ n Str := Str + '』_会员修炼完成.开始闯荡千年江湖! 1';/ U0 m# }& e; j1 K* m3 ?
print (str);+ g' ]% ] o/ ]) t
end;( l3 Q& A: \" B2 @+ u3 d; M% q
print ('getsenderitem 修练枪:1');//出去就全部删除物品' F: e1 u- P0 l& ]: y* ]6 V' @7 u2 E
print ('getsenderitem 修练刀:1');
3 [1 `; D4 p/ _ z print ('getsenderitem 修练剑:1');2 y8 m% T6 p+ Y
print ('getsenderitem 修练斧:1');
! D% ~6 @' {9 n. B4 E" ] print ('getsenderitem 修练拳套:1');
2 _3 e M. G: j7 X& K1 v print (str);1 L) `+ `" Y- N. I w* X' _. p
Str := 'movespace ' + Name;
5 a- w" ?7 @' F) d/ ~! R Str := Str + ' user 1 500 500';$ v1 i* H: @) V
print (Str);" f) @5 k1 {& {0 D' b
exit;/ h+ ^3 K2 F9 a. Q! k
end;$ \- F; M9 @9 `3 e) j
end;, X) V" {5 p7 ~- {
end.
$ S2 d Y5 o- b- [' W
欢迎光临 三千论坛 (http://bbs.3000y.com.cn/) |
Powered by Discuz! X3.4 |