|
嘛,自己原创的道具啦!写了点代码,做了个新道具,咕嘿嘿。
当然,金钱越高概率越小,但是概率不会坑爹的,10%获得5-10倍积分,其他的一样有积分,基本上都是赚啊。
人生就是充满挑战和惊喜不是嘛~
新增:日常任务领取1个幸运卡https://bbs.tianshi.one/home.php?mod=task&do=view&id=32
道具源代码(magic_rich.php):
点此查看源代码(放在source/class/magic/)点此查看源代码(放在source/class/magic/)
- <?php
- /**
- * [Linode] (C)2001-2099 TianshiNijigen
- * This is NOT a freeware, use is subject to license terms
- *
- * $Id: magic_money.php 26715 2011-12-21 01:35:43Z chenmengshu $
- */
- if(!defined('IN_DISCUZ')) {
- exit('Access Denied');
- }
- class magic_rich {
- var $version = '1.0';
- var $name = 'money_name';
- var $description = 'money_desc';
- var $price = '10';
- var $weight = '10';
- var $useevent = 1;
- var $copyright = '<a href="https://www.tianshi2.com" target="_blank">TianshiNijigen</a>';
- var $magic = array();
- var $parameters = array();
- function getsetting(&$magic) {
- }
- function setsetting(&$magicnew, &$parameters) {
- }
- function usesubmit() {
- global $_G;
- $getmoney = 0;
-
- if(mt_rand(1,100) <= 50) {
- $getmoney = rand(1, intval($this->magic['price'] * 1));
- }elseif(mt_rand(1,100) <= 50) {
- $getmoney = rand(1, intval($this->magic['price'] * 1.5));
- }elseif(mt_rand(1,100) <= 50) {
- $getmoney = rand(10, intval($this->magic['price'] * 5));
- }else {
- $getmoney = rand(50, intval($this->magic['price'] * 10));
- }
- updatemembercount($_G['uid'], array($_G['setting']['creditstransextra'][3] => $getmoney), 1, 'MRC', $this->magic['magicid']);
- usemagic($this->magic['magicid'], $this->magic['num']);
- updatemagiclog($this->magic['magicid'], '2', '1', '0', 0, 'uid', $_G['uid']);
- showmessage('magics_credit_message', '', array('credit' => $_G['setting']['extcredits'][$_G['setting']['creditstransextra'][3]]['title'].' '.$getmoney.' '.$_G['setting']['extcredits'][$_G['setting']['creditstransextra'][3]]['unit']), array('alert' => 'right', 'showdialog' => 1));
- }
- function show() {
- magicshowtips(lang('magic/rich', '点此使用幸运卡,可以获得最多10倍积分哦!'));
- }
- function buy() {
- }
- }
- ?>
复制代码
|
|