![]() |
【转帖】QN卡制作
qn卡的制作
#include <ansi.h> inherit ITEM; int help(object me); int create() { .............. } void init() { add_action("do_withdraw","quchu"); add_action("do_deposit","cunru"); add_action("do_check","check"); } int do_deposit(string arg) { string what; int amount; object me; me = this_player(); if( me->is_busy()||me->is_fight()) return notify_fail("你现在正忙着呢...。\n"); if(arg && sscanf(arg, "%d %s", amount, what)==2 && what=="qn") { if ( me->query("b_potential")>=1000000000 ) if ( me->query("b_potential")>=2000000000 ) return notify_fail("你卡里的潜能已经够多了,赶紧去学习吧。\n"); if (amount < 1||me->query("potential")-me->query("learned_points") < 1) return notify_fail("你想存多少潜能?\n"); if (amount>me->query("potential")-me->query("learned_points")) return notify_fail("你的潜能不够存。\n"); if ( amount>=99999999 ) return notify_fail("你最多能存"HIY+chinese_number(99999999)+NOR"点潜能,赶紧去学习吧。\n"); message_vision(sprintf("$N拿出%s点潜能,存进了"HIY"卡"NOR"。\n",chinese_number(amount)), me); me->add("b_potential", amount/100 * 99); me->add("potential",-amount); me->save(); return 1; } else return help(me); } int do_withdraw(string arg) { int amount, v, rv; string what; object me; me = this_player(); if( me->is_busy()||me->is_fight()) return notify_fail("你现在正忙着呢...。\n"); if (arg && sscanf(arg, "%d %s", amount, what) == 2 ) { if (amount < 1) return notify_fail("你想取多少?\n"); if(what=="qn") { if (amount > me->query("b_potential")) return notify_fail("你卡里的潜能不够取。\n"); me->add("b_potential",-amount); me->add("potential",amount); me->save(); message_vision(sprintf("$N从"HIY"卡"NOR"里取出%s点潜能。\n",chinese_number(amount)),me); return 1; } } return help(me); } int do_check() { int total = (int)this_player()->query("b_potential"); if(!total || total < 0) { this_player()->set("b_potential", 0); return notify_fail("您这张卡上没有任何潜能余额。\n"); } write("您"HIY"卡"NOR"中目前还有" + chinese_number(total)+ "点"CYN"潜能"NOR"余额。\n"); return 1; } int help(object me) { write(@HELP 提取潜能:命令格式:quchu <数量> 潜能 存入潜能:命令格式:cunru <数量> 潜能 查询余额:命令格式:check HELP ); return 1; } |
回复: 【转帖】QN卡制作
:em11: :em11: :em11: :em11: :em11: :em11:
|
回复: 【转帖】QN卡制作
]. . NIKO钢琴 .
音乐 . 1942的葡萄酒 . 会秀的女人 . 放纵歌唱 . . |
回复: 【转帖】QN卡制作
好东西
好东西 好东西 好东西 好东西 |
回复: 【转帖】QN卡制作
票国...........................
|
回复: 【转帖】QN卡制作
what is qn bank card?
|
回复: 【转帖】QN卡制作
学习一下,可以吗:em08: 学习
|
回复: 【转帖】QN卡制作
和为潜能卡:em07: 看:em08: 看潜能
|
回复: 【转帖】QN卡制作
学习。。。:em01:
|
回复: 【转帖】QN卡制作
没看懂,不知道说的是不是同一个西游记啊
|
所有时间均为格林尼治时间 +9, 现在的时间是 06:23. |
Powered by SPLS
版权所有 2001-2023 水泊梁山
皖ICP备05012024号
站长 fengyue