当前位置:首页>>魔兽单机>>正文
魔兽Trinity端中带数据库的“赏金猎人”功能代码
2013-08-21 14:24:43 作者:网络 来源: 浏览次数:0
\

1、 这个是一套玩家兑换赏金的脚本代码,带数据库的!可以兑换3种物品,金币,荣誉,令牌

2、 兑换项目可以在NPC菜单上展现

3、 GM可以手工清理奖励

4、每次兑换都可以实现公告项目!这个你可以到代码里面去设置

5、给玩家设置自由PVP的flag (FFA PvP flag)

6、奖励赏金给PVP的胜利者!


这个系统需要在characters库中新建一个表
//首先是SQL代码
USE `characters`;
DROP TABLE IF EXISTS `bounties`;

CREATE TABLE `bounties` (
  `guid` int(200) unsigned NOT NULL,
  `visual` varchar(200) NOT NULL,
  `price` int(200) NOT NULL,
  PRIMARY KEY (`guid`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

部分代码:
#define SET_CURRENCY 0  //0 金币, 1 荣誉, 2 令牌(物品)
#define TOKEN_ID 0 // 令牌ID,对应物品ID
 
#if SET_CURRENCY == 0
#define BOUNTY_1 "我要兑换20G的金币赏金."
#define BOUNTY_2 "我要兑换40G的金币赏金."
#define BOUNTY_3 "我要兑换100g的金币赏金."
#define BOUNTY_4 "我要兑换200g的金币赏金."
#define BOUNTY_5 "我要兑换300g的金币赏金."
#define BOUNTY_6 "我要兑换400g的金币赏金."
#define BOUNTY_7 "我要兑换500g的金币赏金."
#define BOUNTY_8 "我要兑换700g的金币赏金."
#endif
#if SET_CURRENCY == 1
#define BOUNTY_1 "我要兑换20荣誉赏金."
#define BOUNTY_2 "我要兑换40荣誉赏金."
#define BOUNTY_3 "我要兑换100荣誉赏金."
#define BOUNTY_4 "我要兑换200荣誉赏金."
#endif
#if SET_CURRENCY == 2
#define BOUNTY_1 "我想兑换1个赏金令牌."
#define BOUNTY_2 "我想兑换3个赏金令牌."
#define BOUNTY_3 "我想兑换5个赏金令牌."
 
#endif
 
#define PLACE_BOUNTY "我想兑换赏金."
#define LIST_BOUNTY "列出可以兑换的赏金."
#define NVM "别介意"
#define WIPE_BOUNTY "Wipe bounties"
 


相关报道:

[关闭] [返回顶部]


  返回首页 | 最新资讯 | 资源下载 | 魔兽图片 | 单机文档 | 技术攻略 | 玩家视频
备案号:蜀ICP备2024062380号-1
免责声明:本网站为热爱怀旧WOW的玩家们建立的魔兽世界资料网站,仅供交流和学习使用,非盈利和商用.如有侵权之处,请联系我们,我们会在24小时内确认删除侵权内容,谢谢合作。
Copyright © 2024 - 2024 WOWAII.COM Corporation, All Rights Reserved

机器人国度