{
let 战神引擎全系列课程, QQ群:***********
beiZhu:
}
program mir2;
function printStr(Pstr:string;Pid:integer):string;
var len, arrlen, index, temp_len, temp_index, i : integer;
str, temp_str : string;
strArr : array[1..100] of string;
begin
str := Pstr;
len := length(str);
index:=1;
for i:=1 to 100 do
temp_str:= copy(str,index,len);
temp_len := length(temp_str);
temp_index := pos(',',temp_str);
if temp_index = 0 then
strArr[i] := copy(temp_str,0,temp_len);
arrlen:=i; break;
end
else
strArr[i] := copy(temp_str,0,temp_index-1);
index := index + temp_index;
result:=strArr[Pid];
end;
procedure huishouDia;
var i, temp_px, temp_py, px, py, scolor : integer; temp_str, show_str:string; code : Boolean;
if This_Player.GetV(17,26) >= 10 then
This_Npc.NpcDialog(This_Player,'对不起,你错误次数达到10次,无法使用此功能');exit;
px:=This_Player.My_x;
py:=This_Player.My_y;
code:=false;
for i:=1 to 4 do
scolor:=255;
if i = 1 then
temp_str:='A';
if i = 2 then
temp_str:='B';
if i = 3 then
temp_str:='C';
if i = 4 then
temp_str:='D';
temp_px:=random(500)+100;
temp_py:=random(500)+100;
if random(3) = 0 then
if not(code) then
temp_px:=px;
temp_py:=py;
scolor:=222;
code:=true;
show_str:=show_str+'|<'+temp_str+'/fcolor='+inttostr(scolor)+'>: <'+inttostr(temp_px)+' , '+inttostr(temp_py)+' /fcolor='+inttostr(scolor)+'> <选择答案 '+temp_str+'/@huishouYz~'+inttostr(px)+','+inttostr(py)+','+inttostr(temp_px)+','+inttostr(temp_py)+'>';
show_str:=show_str+'|';
This_Npc.NpcDialog(This_Player,
'当前是啥 次数 qing shibai cishu '+inttostr(This_Player.GetV(17,26))+' chao guo 10 ci zuolao'+
'|你当前所在的坐标 '+inttostr(px)+' ,'+inttostr(py)+' 请选择<绿色答案/fcolor=222>|'+
show_str
);
procedure _huishouYz(pstr:string);
var px , py , temp_px, temp_py : integer;
px:=strtoint(printStr(pstr,1));
py:=strtoint(printStr(pstr,2));
temp_px:=strtoint(printStr(pstr,3));
temp_py:=strtoint(printStr(pstr,4));
if (px = temp_px) and (py = temp_py) then
This_Npc.NpcDialog(This_Player,'验证成功,这里开始调用NPC功能');
//domain;
This_Player.SetV(17,26,This_Player.GetV(17,26)+1);
This_Npc.NpcDialog(This_Player,'你已经累计失败10次~在这里要把你关进小黑屋了咯~');
//This_Player.RandomFlyTo('SD001');
//This_Player.PlayerNotice('shibaichaoguo10ci',2);
This_Npc.NpcDialog(This_Player,'验证失败 shibai ci shu + 1');
Begin
if This_Player.GetV(17,26) = -1 then
This_Player.SetV(17,26,0);
huishouDia;
end.