手游哥源码网

 找回密码
 立即注册

QQ登录

只需一步,快速开始

查看: 560|回复: 0

[战神脚本]拍卖行脚本

[复制链接]

525

主题

525

帖子

34万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
347978
QQ
发表于 2022-6-10 17:31:36 | 显示全部楼层 |阅读模式
资源信息
主题类型:
游戏平台:
操作系统:
架设难度:
角色类别:
购买/下载资源:
  • 普通用户: 1500 手游币
  • VIP用户:1500 手游币
  • 永久会员 : 免费推荐
价格 1500 手游币
提示:
1.下载异常请联系联系手游哥QQ:4660647;
2.本网站所有素材来源于网络,仅供参考和学习使用,如下载请于24小时内自行删除;
3.本站所有资源均已经过火绒安全软件查杀,放心下载;
4.因苹果端需要指定设备,所以本站所有苹果APP需用户自行评测。
注:* 本站资源统一解压密码:syg6,请知悉! *
请将《Auction.txt》放到目录D:\mud2.0\Mir200\Share\config\下                              
使用变量 G(11,11) 拍卖总流水号   G(11,12) 总拍卖物计数。                          
私人变量 V(11,1~10)对应1~10个拍品的流水号 11 卖家临时标记 12 卖出物总数 13提取极品  
私人变量 S(11,1~10)对应1~10个参与竞拍的流水号 11 买家临时标记 12竞价物总数 13扣费凭证
重要:1,进行变量查重; 2,添加NPC定时执行参数 10-30秒。

[战神脚本]拍卖行脚本3744 作者:乾乾与行 帖子ID:126 战神,脚本,拍卖行

  1. procedure _diyitem(id:string);
  2. var wpidx,wppos,zb,zy,lx,sl:string;
  3. begin
  4.         zb := getpmitem(id);//名称
  5.         zy := getf(zb); //职业
  6.         lx := getf(getb(zb));//类型

  7.         if This_Player.GetBagItemCount(id) > 0 then
  8.         begin
  9.                 This_Player.Take(id,1);
  10.                 wppos:=inttostr(This_Player.GetV(11,11));//拍品上架位置
  11.                 wpidx:=inttostr(GetG(11,11)+1);
  12.                 WriteIniSectionStr('Auction.txt','物品'+wppos+'',This_Player.Name,wpidx); //写入拍品流水号与人物对应关系。
  13.                 WriteIniSectionStr('Auction.txt',wpidx,'物品名',id); //按拍品流水号创建字段并写入属性
  14.                 WriteIniSectionStr('Auction.txt',wpidx,'物品类型',lx);
  15.                 WriteIniSectionStr('Auction.txt',wpidx,'职业类型',zy);
  16.                 WriteIniSectionStr('Auction.txt',wpidx,'卖家',This_Player.Name);
  17.                 WriteIniSectionStr('Auction.txt',wpidx,'拍卖状态','筹备中');
  18.                 SetG(11,11,GetG(11,11)+1); //全局拍卖流水号+1;
  19.                 This_Player.SetV(11,strtoint(wppos),strtoint(wpidx));//拍品信息写入玩家变量
  20.                 This_Player.SetV(11,12,This_Player.GetV(11,12)+1);//卖家上架物品总数+1;
  21. //                This_Player.SetV(11,11,0); //栏位标识清零
  22.                 _wupininfo(wppos);//跳转到拍卖物品设定页面       
  23.         end else
  24.                 This_Npc.NpcDialog(This_Player,'你背包里没有<'+id+'>!|{cmd}<返回卖家中心/@myinfo~2>')

  25. end;

  26. procedure CommitItem(AType:word);
  27. var
  28. zb,zy,lx,sl,pm_pos,lwpos,pm_idx,wpname,wpstate,wpidx,lqzt,oname,bname:string;
  29. abil:array [1..5] of integer;
  30. i,jp:integer;
  31. begin
  32.         zb := getpmitem(This_Item.ItemName);//名称
  33.         zy := getf(zb); //职业
  34.         lx := getf(getb(zb));//类型
  35.         sl := getf(getb(getb(zb)));//最大数量
  36.        
  37.         if zb <> '' then
  38.         begin
  39.                 if This_Player.GetV(11,13) < 100000 then  //大于10W为提取极品
  40.                 begin
  41.                                 pm_pos:=inttostr(This_Player.GetV(11,11));//拍品上架位置
  42.                                 pm_idx:=inttostr(GetG(11,11)+1);
  43.                        
  44.                                 if zy = '叠加' then
  45.                                 begin
  46.                                         This_Player.NotifyClientCommitItem(0,'');
  47.                                         This_NPC.NotifyClientUPdBagItem(This_Player,This_Item);
  48.                                         ThreeItem(This_Item.ItemName);
  49.                                         WriteIniSectionStr('Auction.txt',pm_idx,'堆叠上限',sl);
  50.                                 end else
  51.                                 begin
  52.                                         jp:=0;
  53.                                         abil[1]:=This_Item.AddPa1;
  54.                                         abil[2]:=This_Item.AddPa2;
  55.                                         abil[3]:=This_Item.AddPa3;
  56.                                         abil[4]:=This_Item.AddPa4;
  57.                                         abil[5]:=This_Item.AddPa5;
  58.                                        
  59.                                         for i:=1 to 5 do
  60.                                         begin
  61.                                                 if abil[i] > 0 then
  62.                                                 begin
  63.                                                         WriteIniSectionStr('Auction.txt',pm_idx,'Abil'+inttostr(i),inttostr(abil[i]));//写极品值
  64.                                                         jp:=jp+abil[i];
  65.                                                 end
  66.                                         end
  67.                
  68.                                         if jp > 0 then WriteIniSectionStr('Auction.txt',pm_idx,'极品','是');
  69.                
  70.                                        
  71.                        
  72.                                 WriteIniSectionStr('Auction.txt','物品'+pm_pos+'',This_Player.Name,pm_idx); //写入拍品流水号与人物对应关系。
  73.                                 WriteIniSectionStr('Auction.txt',pm_idx,'物品名',This_Item.ItemName); //按拍品流水号创建字段并写入属性
  74.                                 WriteIniSectionStr('Auction.txt',pm_idx,'物品类型',lx);
  75.                                 WriteIniSectionStr('Auction.txt',pm_idx,'职业类型',zy);
  76.                                 WriteIniSectionStr('Auction.txt',pm_idx,'卖家',This_Player.Name);
  77.                                 WriteIniSectionStr('Auction.txt',pm_idx,'拍卖状态','筹备中');
  78.                                
  79.                                 This_Player.TakeByClientID(This_Item.ClientItemID);//成功收走物品
  80.                                 This_Player.NotifyClientCommitItem(1,'提交成功');
  81.                                 This_NPC.NotifyClientUPdBagItem(This_Player,This_Item);
  82.                                
  83.                                 SetG(11,11,GetG(11,11)+1); //全局拍卖流水号+1;
  84.                                 This_Player.SetV(11,strtoint(pm_pos),strtoint(pm_idx));//拍品信息写入玩家变量
  85.                                 This_Player.SetV(11,12,This_Player.GetV(11,12)+1);//卖家上架物品总数+1;
  86.                 //                This_Player.SetV(11,11,0); //栏位标识清零
  87.                                 _wupininfo(pm_pos);//跳转到拍卖物品设定页面
  88.                                 end
  89.                 end else
  90.                 begin
  91.                         wpidx:=inttostr(This_Player.GetV(11,13));
  92.                         wpname:=ReadIniSectionStr('Auction.txt',wpidx,'物品名');
  93.                         bname:=ReadIniSectionStr('Auction.txt',wpidx,'买家');
  94.                         oname:=ReadIniSectionStr('Auction.txt',wpidx,'卖家')
  95.                         wpstate:=ReadIniSectionStr('Auction.txt',wpidx,'拍卖状态');
  96.                         lqzt:=ReadIniSectionStr('Auction.txt',wpidx,'领取状态');
  97.                         if (wpname = This_Item.ItemName) and (((bname = This_Player.Name) and (lqzt = '已领取')) or ((oname = This_Player.Name) and ((wpstate='已取消') or (wpstate = '流拍已领')))) then
  98.                         begin
  99.                                 for i:= 1 to 5 do
  100.                                 begin
  101.                                         abil[i]:=StrToIntDef(ReadIniSectionStr('Auction.txt',wpidx,'Abil'+inttostr(i)),0);
  102.                                         pm_idx:=ReadIniSectionStr('Auction.txt','物品'+inttostr(i)+'',This_Player.Name);
  103.                                         if pm_idx = wpidx then lwpos:=inttostr(i);
  104.                                 end
  105.                                 This_Item.AddPa1:=abil[1];
  106.                                 This_Item.AddPa2:=abil[2];
  107.                                 This_Item.AddPa3:=abil[3];
  108.                                 This_Item.AddPa4:=abil[4];
  109.                                 This_Item.AddPa5:=abil[5];
  110.                                 This_Player.NotifyClientCommitItem(0,'极品属性提取成功');
  111.                                 This_NPC.NotifyClientUPdBagItem(This_Player,This_Item);       
  112.                                 if This_Player.Name = bname then
  113.                                 begin
  114.                                         WriteIniSectionStr('Auction.txt',wpidx,'领取状态','极品属性已提取');
  115.                                 end else
  116.                                 if This_Player.Name = oname then
  117.                                 begin
  118.                                         WriteIniSectionStr('Auction.txt',wpidx,'领取状态','极品属性已提取');                               
  119.                                         WriteIniSectionStr('Auction.txt','物品'+lwpos+'',This_Player.Name,'');//取消拍品和人物
  120.                                         This_Player.SetV(11,This_Player.GetV(11,11),0);//清除对应变量值
  121.                                         This_Player.SetV(11,12,This_Player.GetV(11,12)-1);//竞拍物品减一
  122.                                 end
  123.                                 This_Player.SetV(11,13,0);//
  124.                                 if wpstate = '流拍已领' then
  125.                                 begin
  126.                                         _myinfo('2');
  127.                                 end else
  128.                                                 _jiesuan(wpidx);                               
  129.                         end else
  130.                         begin
  131.                                 This_Player.NotifyClientCommitItem(0,'极品提取非法!请核对姓名,装备名字是否相符!以及是否提取过该极品属性');
  132.                         end
  133.                 end;
  134.         end else
  135.         begin                                                       
  136.                 This_Player.NotifyClientCommitItem(0,'非法物品!');
  137.                 This_NPC.NotifyClientUPdBagItem(This_Player,This_Item);
  138.                 This_NPC.Click_CommitItem(This_Player,1,'请放入你想拍卖的物品');
  139.         end
  140. end;
复制代码


回复

使用道具 举报

懒得打字嘛,点击右侧快捷回复 【右侧内容,后台自定义】
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ/免责声明/Archiver/手机版/小黑屋/特别鸣谢/隐私条款/版权声明/下架/sitemap/手游哥源码网 ( 粤ICP备20024708号-3 )


本站资源来自互联网搜集,仅供本地电脑单机学习和交流,请勿用于商业用途,请自觉在24小时内删除。
本站仅提供信息存储空间服务,软件的复制品持有人不知道也没有合理的理由应当知道展示的作品侵权!
本站所有资源仅限用于研究产品软件内含、设计思想和原理为目的用途,禁止任何商用行为,违者后果自负!
若有侵权与文章中不妥之处,请联系邮箱:4660647@qq.com(手机随时接收邮件)并出示相关证明以便删除。敬请谅解!
快速回复 返回顶部 返回列表