这篇教程C++ this_player函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中this_player函数的典型用法代码示例。如果您正苦于以下问题:C++ this_player函数的具体用法?C++ this_player怎么用?C++ this_player使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了this_player函数的22个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: northnorth() { call_other (this_player(), "move_player", "north#players/quantos/under/maze160"); return 1;}
开发者ID:Shea690901,项目名称:Castles_and_Quests,代码行数:4,
示例2: cmd_sacrificeint cmd_sacrifice(string str){ object ob, *all, mon; string *curr; int i, b, ammount; if (!str || str=="") { write("Sacrifice what?"); return 1; } if(this_player()->query_current_attacker()) { write("You cannot take the time in battle!"); return 1; } if(this_player()->query_ghost()) { write("You have no body to sacrifice with!"); return 1; } ob = present(str, environment(this_player())); if (!ob) { write("You dont see that."); return 1; } if (!ob->query_corpse() && !ob->is_limb()) { write("The gods reject your sacrifice."); return 1; } if (ob->is_limb()) { write("You sacrifice "+definite_article(strip_color(ob->query_short()))+" to the gods."); this_player()->add_hp(2); ob->remove(); return 1; } write("You sacrifice the corpse to the gods."); say(this_player()->query_cap_name()+" sacrifices the corpse to the gods."); ob->loot(this_player()); /* all = all_inventory(ob); i = sizeof(all); while(i--) { if(all[i]->is_money_pile()) { mon = all[i]; b = sizeof( curr = mon->query_currencies() ); while(b--) { write("You find "+(ammount=mon->query_money(curr[b]))+" "+curr[b]+" "+ (ammount>1?"coins":"coin")+" on the body."); this_player()->add_money(curr[b], ammount); } mon->remove(); if(mon) destruct(mon); } else { if(all[i]->move(this_player()) == MOVE_NO_ROOM) write("You are too overburdened to take "+all[i]->query_short()+"%^RESET%^."); else if (sizeof(all[i]->query_short())) { write("You get "+all[i]->query_short()+" from the corpse."); if(this_player()->query_property("autobag")) this_player()->force_me("put "+all[i]->query_id()[0]+" in "+this_player()->query_property("autobag")); } } } */ ob->remove(); if(ob) destruct(ob); this_player()->add_hp(10); this_player()->add_sp(10); this_player()->add_mp(10); return 1;}
开发者ID:ehershey,项目名称:pd,代码行数:85,
示例3: cmdmixed cmd(string args) { function f; string rname; message("system", "Changing user information for " + (string)previous_object()->GetCapName() + ": ", previous_object()); rname = (string)previous_object()->GetRealName(); message("prompt", "Real name [" + rname + "] ", previous_object()); f = function(string str, string old, object ob) { function g; if( !str || str == "" ) str = old; if( str != old ) { ob->SetRealName(str); message("system", "Real name changed to " + str, ob); } else message("system", "Real name unchanged.", ob); str = (string)ob->GetEmail(); message("prompt", "Email (preceed with # to make admin only) [" + str + "] ", ob); g = function(string str, string old, object ob) { function h; if( !str || str == "" ) str = old; if( str != old ) { string a, b; if( sscanf(str, "%[email C++ thr函数代码示例 C++ this_object函数代码示例
|