三千论坛
标题: 一个很好的会员服务脚本 [打印本页]
作者: 快要发癫啦 时间: 2023-3-8 09:11
标题: 一个很好的会员服务脚本
unit 会员服务;
2 x' z" Z/ D/ w) l1 ?
0 i" J* E' \ H4 C# | uinte**ce; v( m; i/ C, O* d2 P6 S
v# F, B# ?9 t: G, g6 m3 ^
function GetToken (aStr, aToken, aSep : String) : String;7 V4 T. ~8 F' Z" X( k
function CompareStr (aStr1, aStr2 : String) : Boolean;
* {6 K/ E; \" `( S3 Efunction callfunc (aText: string): string;
b+ |, i- a: Q3 B% vprocedure print (aText: string);) ]# J: Z/ y/ [, a
function Random (aScope: integer): integer;) R: R5 ^, r& F1 n( s6 q
function Length (aText: string): integer;8 a' d# t- b) v2 u
procedure Inc (aInt: integer);
! X1 X' D4 \; W% W. A3 ^. Aprocedure Dec (aInt: integer);# z X' L( z: v I' v
function StrToInt (astr: string): integer;
% Z/ U# t9 [5 u3 @/ H# `! `: u# _, X$ _9 ufunction IntToStr (aInt: integer): string;
+ ~- r& _ x8 n, W Qprocedure exit;! G1 c% u) U. m* g
" t3 B" D; W5 H' O- X- N
procedure OnLeftClick (aStr : String); R6 v. g9 K& i4 ^
procedure OnGetResult (aStr : String);2 M. m3 `6 r' |
) \1 U/ t) e# v, T
implementation
, Q3 P3 t$ A$ e# L) Z; yprocedure OnLeftClick (aStr : String);% C) z( T Z, s7 O& F5 Q3 R
var
& L, z4 u" [( K1 `( N0 g5 j Str : String;9 W' \3 U" f& T* ?4 p8 ~
Race : Integer;
, s4 z. \# n3 s; |+ Zbegin1 G' {0 _; R- f: K8 V
Str := callfunc ('getsenderrace');
( y, Z2 }8 c& b2 _ Race := StrToInt (Str);& K6 C4 L+ a; C& c; z% ]
if Race = 1 then begin) r# E! r3 S/ _% d: r
Str := 'showwindow .\help\会员服务.txt 0';
& q6 [( g y- Z! w print (Str);
- A( L* {+ e! Y8 A" ^6 I+ T exit; + H7 c, B# _1 Y. s
end;
- j1 U4 K" W9 m7 q! G Q p5 xend;" x- k: W" m& d
procedure OnGetResult (aStr : String);
. e* U% _$ Y4 S" ^/ i: V+ C% [var
; C# X* R0 [9 i1 @ Str, Name, MapNo, WqName : String;: B9 D2 }2 o' f6 ^
iCount, MapID : Integer;! x8 C& l6 ]$ }5 _' L/ O
begin, H- x# s0 y+ M, w
Name := callfunc ('getsendername');0 q8 H% b& l9 z: R+ p. ~
if aStr = 'close' then begin
! ^" H" f5 ]+ Y" {# s exit;! n& R" D+ e6 T* |) n! I4 @* T
end;
" P5 ?% m3 k. }- H1 c7 _ if aStr = 'xuanzhe' then begin% U+ B. a8 u# {3 Y$ c
Str := 'showwindow .\help\会员服务1.txt 0';
$ \. \5 S$ u# A. o print (Str);
# Y9 D/ [+ d: N/ E7 k u# p2 @+ J exit;, e; q! n' t+ P
end;
% g) v; ^8 K2 s) m- g* j& N; @ if aStr = 'lingqu' then begin
, d; q1 n. I% Y Str := callfunc ('getsenderitemexistence 烈焰金戒:1');//此物品自己可以设
# }7 c6 F c* ?' u2 R! d. p1 _ z2 K if Str = 'false' then begin
8 P0 K' _: x" n) @6 } m! B! | print ('say 你不是会员吧');
7 X# I' e6 G f( C exit;: a/ ]6 [( A: B
end;
2 d# w+ u; u! W9 ~ Str := callfunc ('checkenoughspace 5');
3 q) g5 D4 U m/ {7 C% o! b if Str = 'false' then begin
$ z s5 ~& U6 v print ('say 物品栏已满需要5个空格!');: S1 \, {0 C0 {0 k- F
exit;1 J @( @3 e2 I2 a: S; M
end;2 j) f" A8 U: h/ R( J* c
for MapId := 0 to 200 do
4 u5 _6 T# Z3 m& G begin! K+ d7 V5 X/ r, n! k) M) q
MapNo := IntToStr (MapID);& h6 J9 k5 z5 s8 i" ~+ ?! \
str := 'sendnoticemsgformapuser ' + MapNo;1 a$ T8 p1 H. K0 B
Str := Str + ' ';: W( h+ [* w( r& G
Str := Str + '【会员系统】:『';" L" f0 d9 r7 [( i
Str := Str + Name;
# x4 L" `2 ^& B5 r8 z Str := Str + '』_领取了会员专用修炼物品开始修炼啦! 1';* \8 V7 V: A" j2 I3 x; u
print (str);, ^7 R9 G. j" q0 @4 H4 i! E
end;# x2 V, f* l! A# e n
print ('putsendermagicitem 修练枪:1 @会员服务 4');
( J" M% b2 P g3 B$ H9 n print ('putsendermagicitem 修练刀:1 @会员服务 4');
* L$ S U& X8 \2 V! Y print ('putsendermagicitem 修练剑:1 @会员服务 4');) n. ~2 q# R% X# R$ D$ E \
print ('putsendermagicitem 修练斧:1 @会员服务 4');. v; Q+ _4 K \" ?- T
print ('putsendermagicitem 修练拳套:1 @会员服务 4');0 Q* X. [9 G* y4 p/ r
print (Str);
! H" C0 v0 ^. ]5 A; ~- B! j. @ exit;: o/ e( S( H+ I7 o8 {$ M& C, Y/ `4 ?
end;
/ n* D8 J" w. Y1 b! X: Y7 e+ v if aStr = 'chuqu' then begin
8 h, ~' h. ?5 x) i- R" | WqName := callfunc ('getsenderwearitemname 9');//检测是不是拿在手上,因为拿在手里就无法删除!特别声明此检测执行命令段由忧郁工作室小飞技术支持协助完成!特别鸣谢小飞支持!
/ P& ]0 C( l3 _ if WqName = '修炼枪' then begin
) k$ ?+ I) k5 v$ O! m' |- ~: W print ('say 你不是吧!想带走修炼武器!');2 _3 ~, z, O7 h; v: s) Z' S$ H
exit;
0 M1 n# x& E& e" p. e end;
8 t7 v# ^5 M" g" z0 G8 P- ? if WqName = '修炼剑' then begin
* |) w$ Y z* M: b& b print ('say 你不是吧!想带走修炼武器!');
' ]8 N% E9 d v; f! p; \ exit;5 e9 |2 E: A$ b( e3 w2 f
end;4 P* \) y* f! s' `
if WqName = '修炼刀' then begin
5 d# F/ N$ s- V; H+ u4 M4 E print ('say 你不是吧!想带走修炼武器!');( H) g2 ?; G0 }/ D( ^' n7 u# H5 F" \
exit;
5 @2 j7 g* ~ W D end;
1 Y% _# ^+ O: B% l3 | if WqName = '修炼斧' then begin
. i6 P7 @2 _3 T4 `8 T print ('say 你不是吧!想带走修炼武器!');6 ]; x \2 y" j
exit;
7 V; j5 ^) x( n) x end; O$ U' }- f2 S) u; s9 Z
if WqName = '修炼拳套' then begin& }* N5 t2 {' }' @
print ('say 你不是吧!想带走修炼武器!');# O7 z- n# E- \6 f( N% V
exit;
9 B5 d, ?. X6 A3 r end;: l8 ^6 _% Q- |* G9 P
for MapId := 0 to 200 do
, o& w8 g. q4 @* f9 x* a begin
. |& W `0 h( V$ M5 ? MapNo := IntToStr (MapID);
2 j6 z5 o" G* l" Y7 v0 w str := 'sendnoticemsgformapuser ' + MapNo;
( N" r* B2 U, H; u8 k9 M Str := Str + ' ';
- D5 g, w6 u8 D" q Str := Str + '【会员系统】:『';* V; M; ~7 ]2 d- ^1 [% {
Str := Str + Name;
' ^6 z6 }; M3 r$ F Str := Str + '』_会员修炼完成.开始闯荡千年江湖! 1';2 h5 ?1 T3 H. y# g7 A! k
print (str);
T5 g1 e. A( \& y; e! C end;# d+ |) d! _( {1 |, W; o3 f
print ('getsenderitem 修练枪:1');//出去就全部删除物品
* s2 T) y- I7 n* S print ('getsenderitem 修练刀:1');
3 v5 {) ~2 \" c3 x/ C3 t print ('getsenderitem 修练剑:1');
4 w* n. q5 k: [) \7 H1 k& Q print ('getsenderitem 修练斧:1');
3 X8 C. L: Y, [0 u print ('getsenderitem 修练拳套:1');) N! r: O, o1 z8 c
print (str);; `! e3 h5 ^, U1 F6 C
Str := 'movespace ' + Name;
, m/ A8 S/ N' e. y5 z# I4 ~ Str := Str + ' user 1 500 500';
1 R/ J" _3 ?* v& q* o. [3 X, X9 F2 J print (Str);
' H# r( H% T: s% A$ H$ f exit;
- \5 \0 Q. j/ ?& N end;" c+ [7 f& ~+ e' a5 |
end;
1 O5 z9 {4 i- d; {+ Oend.
; R) x0 k4 }/ N0 L
欢迎光临 三千论坛 (http://bbs.3000y.com.cn/) |
Powered by Discuz! X3.4 |