拓胜科技-LPC中文教程

合集下载

拓胜科技-LPC入门

拓胜科技-LPC入门

LPCLPC6666 BBS, help new_wiz ,clone,update, cd, ls, cp... , ,]LP MUD , mud xkx,fy,es2 lp mudmud ---lnwm (object) , mud npc object ----lnwm , update , cloneupdate here update hehe ----lnwm .(clone update update npcnpc clone update+move---lnwm ), , : (ROOM), (OBJECT), (LIVING) OBJECT ROOM LIVING mud object ---lnwm ), , /d /d npc-------lnwm .)npc obj ( object item , )]ROOM (inherit ROOM),inherit ROOM; xkx #include ---lnwm )mudlib.h #define , , .!: create(), init(), refresh() ,[create ]create() , lpc void create() void main() ---lnwm , create() set("something",somevalue); set , , .( mud help STD_ROOM ---lnwm )ROOM ROOM ,create()( mud inherit SHOP; SHOP ROOM ---lnwm )[init ]init() (npc ) npc clone init() ----lnwm this_player() , npc this_player() ,init() this_player() this_player() init() ---lnwm )init() add_action"function", "action"); ( , ), "function" , init():init(){add_action("do_climb", "climb");}, climb cmdsadd_action climb tree , do_climb() ,(do_clone() ---lnwm , "climb" do_climb() do_climb int do_climb(string arg)( ---lnwm , climb tree, climb the red wall ,"tree" "the red wall" arg add_action() ,0, , climb, climb 0 cmds eat add_action eat eat return 0; eat ----lnwm )1, , climb (void init(){add_action("do_eat","eat");}int do_eat( string arg ){object me;me=this_player();//if (arg!=" ")return notify_fail(" \n");//notify_fail() return 0me->set("str",1000); //return 0; //// return 1//}----lnwm )( climb tree, climb three ) , notify_fail(string errormsg) , notify_fail("climb what?\n"); notify_fail() int , 0, :if ( )return notify_fail( );if ( )return notify_fail( );.............................>....return 1;---lnwm )[refresh() ]refresh ( )npc refresh() , ::refresh(), ( , npc ... set("objects", (["name1" : "file1", "name2" :"file2",... ]) ); ( create() ) (set("objects",([])) npc ---lnwm refresh() (set("objects", ) refresh npc ) , ( refresh 24 ---lnwm ),[ ], inherit OBJECT; inherit ROOM OBJECT , , inherit WEAPON, ARMOR, MAPcreate() init(), ROOM[create() ]create() , set , , ) ) ,[init() ]ROOM init , , :1. ,2.3.init add_action , action, :l inpc , object create() init() init() ---lnwm )[npc]npc , init , create(), ,npc , , npcnpc inherit NPC refresh()], LPC (object) , object , LPC , , create() set(), this_object()->set() write() this_player()->write()( object lpc objectskills set_skill("xkx",1000) set("title"," ") set_skill() set() object object ---lnwm ): object[this_object() this_player()], ( ...etc.) ,this_object() object object set("name"," ") this_object()->set("name"," ") set("name") object object clone object object ---lnwm )this_player() , init init this_player() init , add_action , , this_player()[present() ], , object object=present(string"id",object env), ( ),, present , find_player(), find_living() object present,find_living,find_player (id) object object mud help present help find_living hrlp find_player ---lnwm )[environment(), first_inventory(), next_inventory(), all_inventory()]environment(object ob) ob , ob , ob ; ob , ob , ob ( )first_inventory(object ob) ob ob , ,ob ,next_inventory(object ob) first_inventory() ob , environmentall_inventory(object ob) first_inventory(), object( object objectM=environment(A);M=environment(B);A=first_inventory(M);B=next_inventory(M);A=all_inventory(M)[0];B=all_inventory(M)[1];---lnwm )]LPC , efun, lfun, simul_efun]can_read_chineseprintf, sprintfscanf, sscanfwrite, say, shouttell_object, tell_room]clone, new ( object )destruct, remove ( object )move, move_player, move_around ( object ---lnwm )mud help < >---lnwm )。

拓胜科技-LPC入门5

拓胜科技-LPC入门5

Object Mud Object Object Lpc2.1Object1)2)Object "falcon" "trill" "dbase/id" "falcon" "trill" Mud Object create() Object 2.2Lpc ( Object Object ) Object Obejct-----int x;int GetX(){return x;}void SetX( int y ){x = y;}----------void SetX( int y ){int x;x = y;write( "x is set to x" + x + " and will now be forgotten.\n" );}-----x x x SetX() SetX() x2.2Lpc C/C++ C/C++Lpc MudOS2,3C/C++ C/C++ Lpc “Ojbect Object Objecti = ( x = sizeof( users() ) > 0 ) ?x -- : ( ( sizeof( children( NPC ) - 1 );efun users() children( NPC ) NPC Object, sizeof() array mapping2.1-----void SetX( int y ){int x;x = y;write( "x is set to x" + x + " and will now be forgotten.\n" );}-----y > 1 x Lpc C/C++2.2Lpc C Lpcswitch if else if elseswitch ( id ){case "trill" :write( " \n" );break;case "falcon" :write( " \n" );break;case "qyz" :write( " \n" );break;default :write( " \n" );break;}if ( id == "trill" ){write( " \n" );}else if ( id == "falcon"){write( " \n" );}else if ( id == "qyz" ){write( " \n" );}else{write(" \n");}switch CPUswitch if else if elseC CCroom, npcLpcLpcLpc= + - * / % += -= *= /= %=-- ++ == != > < >= <= ! && ||-> ? : >> << <<= >>= & | ^ &=|= ^= ...= ( assignment operator ):: x = 5;+ ( addition operator ):: x + 7( ) string int float int float string- (subtraction operator ):: x - 7+* ( multiplication operator ):: x * 7/ ( division operator ):: x / 7+= additive assignment operator:: x += 5a +=b a = a + b-= subtraction assignment operator: x -= 7a -=b a = a - b*= multiplicative assignment operator: x *= 7a *=b a = a * b/= division assignment operator: x /= 7a /=b a = a / b++ post/pre-increment operators: i ++ or ++ ii ++ i i 1++ i i + 1-- post/pre-decrement operators: i-- or --ii -- i-- i i - 1== equality operator!= inequality operator> greater than operator< less than operator> = greater than or equal to operator<= less than or equal to operator: x == y x != y x > y x < y x >= y x <= y&& logical and operator|| logical or operator: x && y x || y! negation operator: !x-> the call other operator: this_player()->GetKeyName()Object Object Object 0 task->eventclass? : conditional operator: x ? y : zx y z C MudOS> > <<& | ^<<= >>= &= |= ^=a X=b a = a X bC...if ( ){}if ( ){}else{}if( ){}else if ( ){}else{}while ( ){}switch ( ){case ( ):;break;default:}for( ; ; )CreturncontinuebreakMudOSforeach()foreach ( in )void test(){foreach( object player in users() ){tell_object( player, "hi..just a test." );}}users() efun Object foreach ()。

LPCXpresso__用户手册

LPCXpresso__用户手册

LPCXpresso__用户手册LPCXpresso 用户手册V1.01、绪论LPCXpresso是来自NXP的一款新的、低成本开发平台。

其软件部分包括增强型IDE开发环境、GNU C编译器、连接器、库函数、增强型GDB调试器。

硬件部分包括LPCXpresso开发板,该开发板包含两部分:LPC –Link调试接口板、LPC ARM微控制器目标板。

LPCXpresso是一个中断对终端解决方案,它可以帮助嵌入式工程师完成从产品的初始评估到最终产品的所有工作。

LPCXpresso IDE是由Code Red Technologies公司开发的基于流行的Eclipse 开发平台并且支持LPC系列器件。

它是一个符合行业标准的GNU工具链,它的优化C库函数提供给工程师各种所需的开发工具,使得工程师能够获得快速,廉价的高质量软件解决方案。

C编程环境具有专业特色:语句/关键字颜色设置、源程序格式设置、展开/收缩功能、离线/在线帮助、自动项目管理。

LPCXpresso目标板由NXP、Code Red Technologies、Embedded Artists共同合作开发。

板载集成的JTAG调试器(LPC-Link),不用再另外配置单独的JTAG 调试器。

核心半部分提供了多种接口和I/O驱动方式,可以方便地进行功能扩展。

板载LPC-Link调试器提供高速USB转JTAG/SWD接口连接到IDE开发软件,并且还可以作为调试器连接到其他的目标板进行调试。

用户还可以从Code Red Technologies 购买Red ProbeJTAG适配器在LPCXpresso IDE上进行开发。

LPCXpresso支持下列LPC器件:LPC11XX:全系列LPC13XX:全系列LPC17XX:LPC1751,LPC1752,LPC1754,LPC1756,LPC1758,LPC1764,LPC1765,LPC1766,LPC1767,LPC1768 LPC2XXX:LPC2109,LPC2134,LPC2142,LPC2362LPC3XXX:LPC31301.1 LPCXpresso IDELPCXpresso IDE是一个针对LPC微控制器的高度集成的软件开发环境,它包含要求快速、廉价方式软件解决方案所需要的所有工具。

拓胜科技-MUBLIB修改

拓胜科技-MUBLIB修改

MUDMUDLIBMUD (esII)MUDxkx daemon kungfuskill,condition faint xkx cha,du...MUDLIBMUDLIBadm MUDadminadmdaemonsMUD unix d.ccombatd.cincludeglobals.h) admdaemonscombatd.cCOMBAT_Dadmetc CONFIG_DIRBAN IPadmobj MUDmaster.c MudOS MUDsimul_efun.c MUDefun mudosMUDmudosMUDLIBefun mudosMUDLIB simul_efunefun UDLIBMUD MUD1. simul_efun2. master master create()3. master preload()admetcpreload4.MUDmaster.c simul_efun.c mudosupdateROOT destruct) admsimul_efunSIMUL_EFUN_OB( admobjsimul_efun)cmdsadmincmdsadm (admin)cmdsarch (arch)cmdswiz (wizard)cmdsapp (wizard)cmdsimm (immortal)cmdsusr (player)cmdsstd (npc and player)cmdsusr cmdsstddata archdataboarddatalogindatauserdatanpc npcdatadaemon emotedatamailfeature adminMUD NPCMUD MUDLIBobj MUDeuidnpc adminadmin euidarchobjboardobjnpc NPCobjsheetobjweaponsobjmiscquest quest wizardbinaries ROOTd NPC wizardMUDLIBNPC(domain)ddomainnpc npcddomainnpcobj npcddomainobjdata_bak admininclude adminglobals.hcommand.hadminincluderaceincludenetopen ftpquestobj FY3 task task wizardueuideuid lionlion ID lionclone wizard(clone) euidobjarchclonearmorclonedrugclonefruitcloneliquidclonemoneycloneuser login.c(link_ob) user.c(body)adminclonebooksclonefoodclonegiftcloneweaponclonemiscdaemonarchdaemonskilldaemonconditiondaemonclass ESII MUDMUDperform)doc archdochelpdocefunsdocstorylog bug ROOTpstdadminstdarmorstdboardstdchar MUD (player) (npc) stdcharchar.c(heartbeat)stddrugfeaturestditemstdroom(environment)MUDstdskillstdweaponstdmiscstd MUDLIBMUDLIBMUDLIBMUDLIBnpc npc,--------------------------------------------------------------------wiz freewaremudmudwiz ,mudmud...mud mudmud mudmudwiz ...mud mudwiz admin admin wizdaemon wizwizmudcodes...freeware,sigh. ... freeware·BBS ·[FROM 166.111.54.141]---------------------------------------------------------------------(gods) ——kickout....post mail ...... .........MUDhihi hehe quit login ........MUDOS LPC MUDLIB ——(gods) goto ”.........(admin) LOG(arch) QC(wizard) , .(apprentice) .wizard adminLP MUD MUD , (object) , npc objectupdate , cloneMUD update clone update+move update npc npc updata clone chat oh , , , d npc objMUD MUDMUD admin admin mudlib MUDroom eat food clothdamen.c “_ “- “- dong-kefang kefang_dong “- wuxidayu wuxi-dayu lao-guanjia laoguan-jiad npc obj kungfuclasstab ( 4 ) Mudif(...){if(...){...}else{...}}else if(...){...}else{...}if(...){...}LPC zmud57 61 20 30__DIR__ MudOS (__FILE__) .hNPC OBJ CLONE CLONEadd_action ( )MUD NPC NPC NPCNPC ( NPC NPC ) NPCNPC MUDLIB 1000 MUD10 NPC QC( )d kungfuinherit includeEFUN( MUDOS MUDLIB )MUDLIB...... ...... inherit npc( ) item room F_MASTER F_EQUIP MUD 2 zzinherit ROOM; inherit ITEM; inherit NPC;create() create() set(" ", );set string int"short"(string)"long" (string)"item_desc"(string ) ([ < >:< >, .... ]) < > function type"exits" (mapping) ([ < >:< >, .... ])"objects" (mapping) ([ < >:< >, .... ])"outdoors" (string) domain ( /d )"no_fight"(int)"no_magic"(int)"id" (string) "id" "name" set() F_NAME set_name()"title","nickname","name" (string)"age" (int)"age_modify"(int) update_age()"jing","eff_jing","max_jing"(int)"jingli","eff_jingli","max_jingli"(int)"neili","eff_neili","max_neili" (int)"qi","eff_qi","max_qi"(int)"shen_type", (int) 0 1"str","int","con","dex" (int)"combat_exp"(int)"jiali"(int)"family"(mapping)"skill"(string)"name" (string)"id" (string)"long" (string)"value" (int) (coin)"unit" (string) ....."no_get"(int)"no_drop"(int string) string, notify_fail"skill_type"(string) "sword" "blade" /d/skill"rigidity" (int)"weapon_prop"(mapping) "damage" add_temp() apply dest short < > long < > exits < >void create(){set("long", @LONG.......LONG);set("exits",(["west" : __DIR__"path3",]);__DIR__ /d/city __DIR__ "/d/city/" “"west":"/d/city/path3" lookset("item_desc", ([" 1" : " "," 2" : " ",...........( )]);look lookset("objects", ([" " : ,...........]);__DIR__open door/include/room.h#include <room.h>create_door(" ", " ", " ", );west east up create_door("west", " ", "east", DOOR_CLOSED);east uplook westcreate_door()/inherit/room/room.cset_name< > combat_exp < > inherit NPC;void create(){set_name(< >, ({ < id> }) );set("title", < >;set("gender",< >;set("age", < >;set("long", < >;set("combat_exp", < >;set("attitude", < >;set("neili", < >;set("max_force", < >;set("chat_chance", < >;set("chat_msg", ({" "........}) );askset("inquiry", (["ask ": " ",.......]) );init()init() npc clone init()init() add_action("function", "action" ( , ), , init():init(){add_action("do_climb", "climb");}, climb climb tree , do_climb() , do_climb() , "climb" do_climb() do_climbint do_climb(string arg)climb tree climb the red wall "tree" "the red wall" arg do_climb climb red treeif(arg!="red tree") return 0;“!= “! return 1 0 “red tree return 1;add_action() cmds add_action cmds kill cmds add_action("do_kill","kill") kill do_kill() return 1; return 0; kill kill kill cmds( climb red tree, climb three ) return 0; , notify_fail(".....") 0 ,return notify_fail(" ?\n");return notify_fail() return 0 :if ( )return notify_fail( );if ( )return notify_fail( );.............................( .... )..............................return 1;init() ROOM init() , , :1 ,23action , : look i npc“// “// “/* “*/”// Room: /d/wuxi/ximen.c //// llm by 99/05/21 //#include <ansi.h> //#include <room.h> //string look_pai(object me); //inherit ROOM; // ROOMvoid create() // void create(){set("short", " "); //shortset("long", @LONG //LONG/* @LONG LONG @ set("long",@TXTETXTX);LONG LONG TXTE @LONG LONG " " “\n*/);set("valid_startroom", 1); //set("no_fight",1); // “no_beg no_steal”set("item_desc", ([ // look"men":" ","pai": (: look_pai ,]) );/* “: look look men "look men" ...... (: "pai" (: look_pai */ set("exits", ([ //"east" : __DIR__"dajie1", // .c"west" : __DIR__"yidao1", //__DIR__"northeast":__DIR__"qiangdong",]));set("objects", ([ // npc__DIR__"npc/bing":2, // 2, 1 3]));create_door("northeast", " ", "southwest", DOOR_CLOSED);/*create_door(" "," "," "," ")DOOR_CLOSED DOOR_OPENED /include/room.h inherit <room.h> */set("outdoors", "wuxi"); // wuxi( )setup(); //}/* “replace_program(ROOM); init()replace_program() init() replace_program() mud look_pai */string look_pai(object me) /*me this_player() object me; me = this_player(); */{if( wizardp(me) ) //wizardp(me) efun mereturn " \n";/* me */else //return " \n";}// /kungfu/class/baituo/ouyang-feng.c#include <ansi.h> //#inherit NPC; // NPCinherit F_MASTER; // NPCint check_self(); //int learn_message(object ob,string skill);// learn_message()string ask_zhang(); //void create(){set_name(" ", ({ "ouyang feng", "ouyang", "feng" }));// set("name","") set_nameset("long", " "HIW" ”"NOR" \n"+" \n"+" \n");// @LONG&LONG “\n set("nickname", HIW" "NOR); // include <ansi.h> set("gender", " "); //set("age", 53); //set("shen_type",-1); // set 1, exp/10set("attitude", "peaceful"); //set("str", 30); //set("int", 29); //set("con", 30); //set("dex", 28); //set("qi", 2500); //set("max_qi", 2500); //set("jing", 900); //set("max_jing", 900); //set("neili", 2000); //set("max_neili", 2000); //set("jiali", 50); // jiali *set("combat_exp", 1500000); //set_skill("force", 200); //set_skill("unarmed", 170); // .............set_skill("nilian-shengong", 200);......map_skill("force", "nilian-shengong"); // jifa......create_family(" ",1, " ");//set("inquiry" ,([" ":" ”\n"," ":ask_zhang,]));/* ask sb about sth “: sthset("desc_item")(:ask_zhang*/set("chat_chance",2); // 2%set("chat_msg",({ //" ”\n"," ”\n"," ”\n",}));set("chat_chance_combat", 100); //set("chat_msg_combat", ({(: command("wield zhang") ,(: command("wield zhang") , //(: perform_action, "staff.shewu" ,(: perform_action, "staff.shewu" ,//(: command("unwield zhang") ,(: check_self :), //}) );setup();carry_object("/d/baituo/obj/shezhang");// “->wieldcarry_object("/clone/misc/cloth")->wear();//add_money("silver",50); // gold,coin}void init(){::init();add_action("do_skills","skills");add_action("do_skills","cha"); // do_skills}int do_skills(string arg)// do_skills{object ob ;ob = this_player () ; // obif( !arg && arg!="ouyang feng"&& arg!="ouyang"&& arg!="feng" )return 0; // skills cmdsif(wizardp(ob)) //return 0; skills cmdsif (ob->query("family/master_name")!=" ")return 0; // skills cmdsif(!ob->query_skill("nilian-shengong",1))//{write(" \n"+" (force) - 200/ 0\n"+" (hamagong) - 200/ 0\n"+......\n"); //return 1; // retrun 0 return 1}else //{write(" \n"+" (force) - 200/ 0\n"+" (nilian-shengong) - 200/ 0\n"+.......\n"); //return 1;}}void attempt_apprentice(object ob)// inherit F_MASTER{if((int)ob->query("combat_exp")<100000) // 100000{message_vision(" $N ”\n",ob);return; // void return, return 1}if((int)ob->query_skill("hamagong",1)<60) // 60{message_vision(" $N ”\n",ob);return;}message_vision(" $N \n",ob); //command("recruit " + ob->query("id"));return;}int check_self() //{int max_qi,eff_qi,qi; //object me;me = this_object(); //max_qi = me->query("max_qi");eff_qi = me->query("eff_qi");qi = me->query("qi"); //if((int)(qi*100/max_qi)<30 || (int)(eff_qi*100/max_qi)<50)//{if((int)me->query_temp("powerup")) //{....... //return 1;}......; //return 1;}}string ask_zhang()//{ //string int string returnobject me,weapon,obj,obn;mapping fam;me = this_player();if(!(fam = me->query("family"))|| fam["family_name"] != " ") //return "\n ”\n";if((int)me->query_skill("xunshe-shu",1)<50) //return "\n ”\n";if( !me->query("weapon")||(string)me->query("weapon/type")!= " ") //return "\n \n";if( me->query("weapon/she")) //return "\n \n";if( me->query_temp("dixi-wan")) //return "\n \n";//obn=new("/d/baituo/obj/dixi-wan"); // cloneobn->set("sign",me->query("id")); //obn->move(me); //me->set_temp("dixi-wan",1); //return "\n \n"" ”\n"HIC" \n"NOR;}int learn_message(object ob,string skill) //{if((skill=="nilian-shengong")&&(!ob->query_skill("nilian-shengong",1))){message_vision(" $N ”\n",ob);return 0;}else return 1;}MUD 3 zzBUGvoid defeated_enemy(object victim)victim: COMBAT_D: nonevoid killed_enemy(object victim)victim: COMBAT_D: noneint accept_fight(object who)fight whofight 1: "fight": NPCint accept_object(object who, object item)give 1: "give": nonevoid recruit_apprentice(objct apprentice)rank: "apprentice": noneLPCMUD LpMUD LpMUD Unix Unix WINNT&& LPCLPC LPMUD C C C Lpc "Object" Lpc Object Lpc Object Driver C LpMud DriverMUD Lpc Object Driver ObjectLPC Lpc Object Object Driver Object Object Driver Object Driver create()create() Lpc Object create() Object create() Object Object Lpc Object Object MUD&& ObjectLPC Object , object , LPC , Object , create() set() this_object()->set() ObjectMUD this_object() this_player() ...... this_object() ...... object object object object object this_player() , init init this_player() init , add_action , , object[present() ]object=present(string "id",object env)(id) object object , present , find_player(), find_living() [environment(),first_inventory(),next_inventory(), all_inventory()]environment(object ob) ob ob ob ob ob , ob first_inventory(object ob) ob ob ob ,next_inventory(object ob) first_inventory() oball_inventory(object ob) object object object A B M M=environment(A);M=environment(B);A=first_inventory(M);B=next_inventory(M);A=all_inventory(M)[0];B=all_inventory(M)[1];&& Efunenvironment() this_player() this_object() strcmp() implode() efun efun MUD externally defined function Mud Driver Object Object lfun(local function) lfun Object efun1)2) internet socket3) Lpc Lpc Cefun C Driver Mud DriverMud /doc/efun efun help <efun > efun Mud Driver Driver efun MUD efun efunMud Unix Unix Unix LPC Dos "/" "\" DOSpwd:cd: .. /ls: Dos dirrm:mv:cp:md:rd: -dmore:cat:tail:C ---- edit MUD1. edit < > here ,2. z Z z 20 Z 40 n n3.4. n = , p5 $6. a i c m d :a = ;i = ;c =m =d =:7a = 76i = 64c = 45,8m1 = 5 8 13d = 3 ;2,10d = 2 10 ;7. , a8. , .9. x q Q10. h MUDOS h/ /?=aA 'a'cde , ( )E 'e'fgh ( )iI (Qixx version 1.0)jk - later referenced as 'al ( )m ( )nO 'i'o 'a'pqQrs ( )settvxwW 'w'z 20 . + -Z 40 . + -update update < >***.c NPC add_action() add_action()update MUD MUD----call call ( ) MUDLIB call callcall < >->< >(< >, ...... )protect/adm/daemons/emoted.c dstring *query_all_emote(){return keys(emote);}callcall /adm/daemons/emoted.c->query_all_emote()~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~( )( )emotemore edit .o edit callcall me( id)->set("combat_exp",10000)me /obj/user.c set() set me set() set() combat_exp 10000 call id set() NPC callcall call set set set set query call delete set set_skill set_nameMUD CLPCupdate 90 LPCif(this_player()->query("qi"<25)this_player()->add(qi,-this_player("qi"/5);else if(this_player()->query("qi">100)this_player()->add(qi,-this_player("qi"/2);elsethis_player()->add(qi,-this_player("qi"/3);this_player()->query("qi" this_player() query("qi" this_player() me me this_player() this_player() methis_player()->query("qi" iobject me = this_player();int i = me->query("qi";if(i<25)me->add("qi",-i/5);else if(i>100)me->add("qi",-i/2);elseme->add("qi".-i/3);object int LPC object( ) int( ) float( ) string( ) mapping( ) array( ) mixed( ) class( )object NPC this_object() this_player() object me ob bject obj; obj = new(******) obj clone *****int 0int i;i = this_player()->query_skill("force",1)/70;force 500 i 0 7 7float int i=10/3; int i i=3; float i i=3.3333333 MUDOS 7string LPMUD MUDOS config.hstring int float stringA set("number",783);------->intB set("number",78.3);------>floatC set("number","783";----->stringD set("number","78.3");---->stringstring C D "78378.3"LPC : mapping fam = (["a":2,"b":13,"c":2.333,"d":" ","e":"158"]);fam a b int c float d e string LPC a b c d : 2 13 2.333 158 [" "] [" "]=fam["e"] "158" fam["e"]="400" fam["e"] "400"*object int stringstring *num = ({"a","b","c","d","e"......});int *num = ({5,3,4,4,8......});object *obj = ({ob1,ob2,ob3,ob4});string *msg1 =({"a","b","d","d","e"});string *msg2 =({"b","b","d","f","g"});string *msg3 = msg1+msg2;string *msg4 = msg3-msg2;msg3 = ({"a","b","b","c","d","d","d","e","f","g"});msg4 = ({"a","c","e"});function ( ) private nomaskLPC void( ) voidintask_money() return " " MUDOS LINUX MUDOSLPC object object LPC MUDOSvoid create()object objectvoid init()object object object objectstirng intMUD die() init()() (){ }string m,n;object ob1,ob2;m n ob1 ob2if else switchvoid } return()object() MUDLIB LPCMUD “USER OB”“LOG FILE /include() {} [] "" ( ) [ ]() () MUDOS write() set() init() if() else() switch{} if(...){} () ({})[] () ([]) [ ] exits["south"] string int [] string msg = "tims";(string)msg[0] t (string)msg[3] s(int)msg[0] msg "" set("age",14); int "", ; :,string *str = ({"A","B","C","D"})mapping quest = (["A":4,"B":" ","C":"15","D":31])() mapping setset("exits",([......]));;:, (mapping) ?A?b:cA A b c if elseswtich() case < > swtich()swtich(random(10)){case 1:.............if() else() switch() {} {} {}if(me->query("age")>45){write("it is good!\n");}if(me->query("age")>45)write("it is good!\n");&& || =+-*//u/llm/npc/test.c/u/llm/npc/test.c line 13: parse errorparse error 13/u/llm/npc/test.c line 13: Undefined variable 'HIY'Undefined variable13 'HIY' "HIT" "HIY" #include<ansi.h> HIY /include/ahsi.h/u/llm/npc/test.c : *Bad argument 1 to call_other() test.c/u/llm/npc/test.c 47 47 /u/llm/npc/test.c : F_SKILL: No such skill (froce) force froce froce skill /u/llm/npc/test.c /u/llm/npc/test.c line 75: Type of returned value doesn't match function return type ( int vs string ).string int 75/u/llm/npc/test.c /u/llm/npc/test.c line 72: Warning: Return type doesn't match prototype ( void vs int )int void /u/llm/npc/test.c /u/llm/npc/test.c line 5: Cannot #include ansii.h5NPC。

PSIM中文教程全解

PSIM中文教程全解

PSIM®用户指南9版版本32010五月版权©2001-2010 Powersim公司保留所有权利。

本手册的任何部分不得复印或以任何形式或任何手段没有写转载公司的权限模型免责声明Powersim公司(“Powersim”)作出任何陈述或保证相对于此的充分性或准确性文档或它所描述的软件。

在任何情况下将模型或其直接或间接供应商承担任何任何性质的损害,但不限于,直接,间接,附带或相应的损害赔偿的任何字符包括,不限于,商业利润损失,数据,商业信息,或任何和所有其他商业损害或损失,或对任何损害赔偿超过清单价格的许可证的软件和文件.Powersim Inc.mailto:***************************内容1一般资料1.1引言11.2电路结构21.3软件/硬件需求31.4安装程序31.5模拟电路31.6组件参数规范和格式32电源电路组件2.1电阻电感电容器分支72.1.1电阻器、电感器和电容器,72.1.2变阻器82.1.3饱和电感82.1.4非线性元件92.2开关102.2.1二极管、LED、Zener Diode、和移民局10 2.2.2晶闸管和双向可控硅122.2.3 GTO和晶体管132.2.4双向开关152.2.5线性开关162.2.6开关门17座2.2.7单相开关模块192.2.8三相开关模块192.3耦合电感222.4变压器232.4.1理想变压器232.4.2单相变压器232.4.3三相变压器252.5磁元件262.5.1绕组262.5.2漏磁通路径272.5.3空气间隙272.5.4线性核心292.5.5 Saturable Core 292.6其他元素302.6.1运算放大器302.6.1.1理想运算放大器30我4章:2.6.1.2非理想运算放大器31 2.6.2并联稳压器TL431 32 2.6.3 Optocoupler 332.6.4 dv / dt的34块2.7热模块352.7.1设备数据库编辑器3542在数据库2.7.2二极管器件2.7.3二极管损耗计算43在数据库45 2.7.4 IGBT器件2.7.5 IGBT损耗计算47在数据库50 2.7.6 MOSFET器件2.7.6 MOSFET的损耗计算51 2.8电机驱动模块54机械系统54 2.8.1参考方向2.8.2直流机562.8.3感应机582.8.4感应电机饱和612.8.5无刷直流电机622.8.6同步机与外部激励66 2.8.7永磁同步电机682.8.8永磁同步电机饱和70 2.8.9开关磁阻电机732.9 MagCoupler Module 76 2.9.1 magcoupler DL 76块2.9.2 MagCoupler Block 77 2.10 magcoupler RT模块81 2.11机械元件和传感器85 2.11.1机械元件和传感器85 2.11.1.1恒转矩负载852.11.1.2恒功率负荷852.11.1.3恒速负荷862.11.1.4 Type Load将军86 2.11.1.5外部控制负荷87 2.11.2齿轮箱872.11.3机械耦合块882.11.4机电接口88块2.11.5速度/转矩传感器89 2.11.6位置传感器912.11.6.1绝对编码器912.11.6.2增量式编码器922.11.6.3解析器922.11.6.4霍尔效应传感器93 2.12可再生能源模型94II章节:- 32.12.1太阳能模块942.12.2风机973控制电路元件3.1传递函数块993.1.1比例控制器1003.1.2积分1003.1.3微分器1023.1.4比例积分控制器1023.1.5单极控制器1033.1.6修改PI控制器1033.1.7 3型控制器104在过滤块105内置3.1.83.2计算功能块1063.2.1 106夏季3.2.2乘数和Divider 1063.2.3平方根107块3.2.4指数/电力/对数功能块107 3.2.5均方根107块3.2.6绝对和符号功能块1083.2.7三角函数1083.2.8快速傅里叶变换块108 3.2.9最大/最小功能块109 3.3其他功能块1103.3.1比较器1103.3.2限制器1103.3.3梯度(dv/dt)限制器110 3.3.4梯形、方形块1113.3.5采样/保持111块3.3.6舍入块1123.3.7时间延迟块1123.3.8器1133.3.9 THD 114块3.4逻辑组件1153.4.1逻辑Gates 1153.4.2设置复位触发器1153.4.3 JK触发器1163.4.4 D触发器1173.4.5单稳态多谐振荡器117 3.4.6脉冲宽度计数器1183.4.7向上/向下计数器118 3.4.8 A/D和D/A转换器119 3.5数字控制模块120三2章:3.5.1零阶保持1203.5.2 Z传递函数方框121122 3.5.2.1积分器3.5.2.2微分器1233.5.2.3数字滤波器1233.5.3单位延迟1253.5.4量化块1263.5.5循环缓冲区1283.5.6卷积块1293.5.7内存读取块1293.5.8数据阵列1303.5.9栈1303.5.10多采样率系统1313.6 simcoupler模块1323.6.1设立在PSIM和Simulink 132在Simulink 133 3.6.2求解器的类型和时间步长的选取4其他组件4.1参数文件1374.2来源1384.2.1时间1384.2.2常数1384.2.3直流电源1384.2.4正弦源1394.2.5方波电源1394.2.6三角/锯齿来源1404.2.7步源1414.2.8分段线性源1424.2.9随机源1434.2.10数学函数源1434.2.11电压/电流控制的来源144 4.2.12非线性电压控制源145 4.3电压/电流传感器1464.4探头和146米4.5电压/电流范围1484.6初始值1504.7开关控制器1514.7.1开关控制器1514.7.2α控制器154.7.3 PWM控制器152查找表4.8功能块1544.8.1控制电源接口15块四章节:- 14.8.2变换块1544.8.2.1 ABC dq0变换155ABCα/β不能转化14.8.2.3α/β- dq变换14.8.2.4笛卡尔坐标变换1574.8.3数学功能块1574.8.4查找表1584.8.5 C座1604.8.6简化C座1614.8.7外部DLL模块1624.8.8嵌入式软件164块5分析规格5.1仿真控制1655.2交流分析1665.3参数扫描1686电路原理图设计6.1创建一个电路1716.2文件菜单1736.3编辑菜单1736.4视图菜单1746.5支路菜单1756.5.1创建在主电路176支路-6.5.2创建子电路内的支路1776.5.3连接支路-在主电路178电路的178 6.5.4其他功能6.5.4.1传递变量从主电路支路178 6.5.4.2定制电路图1796.5.4.3包括在PSIM 180子元素列表6.6模拟菜单1806.7选项菜单1836.8实用工具菜单1876.9管理PSIM图书馆1876.9.1创造一次图像1886.9.2添加新的子电路元件为图书馆189 6.9.3添加一个新的DLL元到图书馆191 v0章:7波形处理7.1文件菜单1937.2编辑菜单1947.3轴菜单1947.4屏幕菜单1957.5测量菜单1967.6分析菜单1977.7视图菜单1987.8选项菜单1987.9标签菜单1997.10出口数据1998错误/警告消息和其他模拟问题8.1模拟问题2018.1.1时间步长的选取2018.1.2传播延迟的逻辑电路2018.1.3界面之间的电源和控制电路2018.1.4 FFT分析2028.2错误/警告消息2028.3调试203指数205一一般信息1.1引言PSIM仿真软件1是专为电力电子与电机驱动器。

拓胜科技-WIZ命令

拓胜科技-WIZ命令

1 calloutscallouts [< >].2 chinesechinese < >==< >3 cleanupcleanup < >clean_up4 forceforce < > to < >, , ?5 overviewoverview < >mud:userliving ( )char master copynpc NPCcombatkillhuntheart beat heart beatvirtualroomspecial roomequipobject6 possessposssess < >EUIDquit7 promote: promote < > ( ), (player) (immortal) (apprentice) (wizard)(arch) (admin)8 purgepurge [< >] | < > because < >9 reboot: reboot, ,10 reclaim: reclaim: ,11 rehashrehash < >?12 wizlock: wizlock < >(immortal) (apprentice) (wizard) (arch) (admin), ? , (player).13 disassembledisassemble < > < >14 dump: dumpOBJ_DUMP15 profile: profile16 shutdown: shutdownEdit2002-9-28edit1. edit < > ’2. z Z ( more )3. ’ a i c :a = ;i = ;c =4.5. ’ .6. x q Q7. = ’ pset number set save’’8. h9. :3d = 3 ;2’10d = 2 10 ;5’8m1 = 5 8 110. $ (Winding0’$d =edit/ pattern? pattern=aA ’a’’ inverse autoindent modec ( )d ( )e ’ ( ’ ) E ’e’’fg pattern .hi ( ’a ’ )I indent the entire code (Qixx version 1.0)j ’k ( ) - later referenced as ’a lmnO ’i’o ’a’pq edit ( ’ )Qr ’ssett ( ) ’ ’m’v pattern ’g’xw ( )W ’w’’ " "z 20 ’ +/-Z ’z’’ 40hw <-- ’w’driverMudOSMudOS 0.9.xx.xx 0.9.20 v20.xxmajor version minor version alpha/betaa bdriver releaseMudOS driver Idea Exchange ( 7890) , alpha driverbeta bug fixChangeLog.* driver pub/LPC/servers/MudOSCompile driverA. options.hmudlib release options.h driver options.hcopy #define define #undef undefB. driver0.9.20.xx v22a22ES2 mudlib v21c2 v21.6 v21.7b6 v22a22driver 0.9.20 driver ES2mudlib mudlib mudlib1. comm.c functionstatic void telnet_neg P2(char *, to, char *, from){..< >..default:if(ch&0x80){—— drivercontinue; ...}——..< >}/*t elnet_neg()*/2. ed.c functionstatic void prntln P3(char *, str, int, vflg, int, len){..< >..if (*str < ' ' || *str >= DEL) {^^^^^^^^^^^^^^^^^^^^^^^^^^^: ((*str < ' ') && (*str >='\0'))switch(*str){case'\t':/*h ave t o b e s mart a bout t his o r t he i ndentor w ill f ail*/*line++='';while((line-s tart)%8)<---8 4..< >..}C. build.MudOS (v21 , D)build.MudOS makefile ED. makefile( v21c2) makefile ( gcc,GNUmakefile : linux linux cc == gcc,GNUmakefile)E. make make install ( )compile driver addr_server binary addr_server drivercompile driver driver (options.h, .h, .c ) make. ( make make clean,object )。

SMART管理模拟系统课程手册

SMART管理模拟系统课程手册

SMART(拓智)管理模拟系统课程手册版权所有:李金晖、李志军目录1.课程综述 (1)2.课程知识点 (2)3.课程时间安排 (3)4.教学设施 (4)5.课前准备 (6)6.培训师介绍 (6)1. 课程综述SMART是基于国际化的企业管理和营销理论设计开发的一套计算机管理模拟系统和培训课程。

该系统是充分考虑到中国的经营环境和市场经济的高速发展,高度模拟现实世界中的经营管理决策行为的一套功能强大的管理模拟计算机系统。

管理模拟培训以其仿真性、互动性、竞争性和综合性,在国外已经成为商学院MBA 必备的课程,同时也是大型跨国公司中高层管理人员的常设培训课程,在国内也越来越为众多高校和企业所认同。

SMART 主要针对企业中高层经理人设计,涉及产品研发、生产、营销、财务、投资、运营等各个职能部门,覆盖了从如何分析商业环境、如何进行产品研发生产、如何创造商机、运用财务杠杆、团队合作、战略决策、风险分析等大量的管理知识要点,可以在最短时间内检验并帮助学员提升综合管理能力。

SMART模拟可以根据需要分为5个组或者6个组展开竞争,每小组6-8人,组成企业的管理团队,经营三个产品,在三个经济状况不同的国家展开设计、生产与销售等方面的全方位竞争,通过6个财务季度的管理运营期,使参与者实时高效地体验到在一个动态的、快速变化的全球化商业环境中驾驭企业遇到的方方面面的问题。

授课时长也比较灵活,标准课程为期2.5天。

SMART模拟了一个动态的自由市场经济体系,信息是模糊的、不充分的;环境是不确定的、变化的;决策时间是有限的,一切结果均取决于势均力敌的六个对手的多轮决策的效率和效果。

在SMART世界里,作为管理层的一员,谁都可以大胆地去尝试、努力去推行,不仅要熟悉商界术语,更要学会洞悉数字背后的渊源;不仅能运作旗下业务,更须懂得如何与相关部门协同合作,充分利用有限资源,发挥团队的精神……SMART 世界不言输赢,失败也是一种学习!SMART将带给每个学员无须开怀大笑就能获得的快乐体验!分析、计算、预测……然后是等待……是成功还是失手?课堂气氛活跃,激动、担忧、兴奋、埋怨、得意等等体验,把大家紧紧联系在一切,在学习之余更发展了友谊,成为学员一生的收获。

使用说明TMPGEnc4XPress.chs

使用说明TMPGEnc4XPress.chs

技赢编码TMPGEnc4.0XPress中文版技赢编码“TMPGEnc 4.0XPress”中文版使用协议书*使用前的注册权登记与在线验证注册第一章基本操作基本画面介绍-STEP1“开始”画面-STEP2“输入”画面-STEP3“输出”画面-STEP4“编码”画面-“选项”设置画面第二章功能详细解说- 1.“添加素材”画面- 2.“素材精灵”画面- 3.“加入幻灯片”画面- 4.“剪切编辑”画面- 5.“效果”画面- 6.“输出”画面-7.“选择输出格式”画面第参章附属工具- 1.MPEG工具- 2.批处理工具第四章TMPGEnc 4.0XPress规格- 1.规格- 2.快捷键列表技赢编码技赢编码““TMPGEnc 4.0XPress XPress””中文版使用协议书(参考译文参考译文))重要:一经安装,复制或开始使用本产品,即意味着您已经认可本协议。

使用协议书(以下称“本协议”)、为本软件用户(个人或法人)与本公司(PEGASYS Inc.)之间缔结的法律性的契约书。

用户一经安装,复制,以及使用“TMPGEnc 4.0XPress”(按条款4,关于用户技术支持之规定,包括提供软件升级与程序变动。

以下、通称“本软件”。

),将被认为对本协议的全部条件予以同意,本协议随即生效。

本软件制品制品名:“TMPGEnc 4.0XPress”版本: 4.5许可证数:1份1.使用许可的承诺和使用权本公司(PEGASYS Inc.),将按照本协议记载之规定,对本软件的非垄断,以及不可转让的权利,作出承诺。

1)本软件只限于一台计算机使用,即仅在一台计算机硬件(只安装有同一个操作系统的同一台计算机)中安装,且只能在此相应计算机上使用的权利。

如果在复数台的计算机硬件上中使用的话,即使不是同一时间使用,也需要拥有与使用计算机台数相同数量的许可证。

2)只限于保存目的,每套软件有复制一个备份的权利。

3)本软件给与许可证所有者在线升级的权利。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

LPCLpcMud LpMud LpMuds UnixUnix LpMudUnix Unix Dos"/" Dos "\".LpMud :/clone/player/player.c"/clone/player/" player.cLpMud Unixpwd, cd, ls, rm, mv, cp, mkdir, rmdir, more, tail, cat, edUnixpwd:cd: Dos cdls:Dos dirrm: Dos rmdirmv: Dos movecp: Dos copymkdir:rmdir:more:cat: Dos typetail:ed: MudLpc2.1 LpcLpcLpc Lpc "Object"Lpc ObjectMud Lpc Object DriverLpc Object DriverObject LpMud DriverLpc Object Lpc Object Lpc“ ”Lpc Object Driver Object2.2 Driver MudlibDriverLpMud Driver “ ” LpMud Lpc Driver LpcLpcObjectObjectobjectDriver2.3 ObjectObject DriverDrvier Object create()Lpc ObjectDriver (efun) Lpc: wiz_levelObject “ ”ObjectObject Object Driver ObjectDriver createcreate() Lpc Object create() Objectcreate() Object ObjectLpc Object Lpc ObjectObject2.3ObjectLpMud LpMud“ ”LpcXO team2.3.1/* /u/trill/obj/test.c* from XO Object Library* Object* created by trill 19970808* version @(#) test.c 2.1@(#)* last modified by trill 19971008* tell_wizard simul_efun*/Mudlib2.1ObjectObjectinclude (inherit) Object#include <ansi.h>#include "include/test.h"inherit NPC;Object ".h" "test.h"Object "include"include #include "include/test.h"test.h test.cObjecttest.c test.chelp Objecttest.hinherit2.3.22.3.3Object ObjectObject ObjectSet+Get+static int level;void SetLevl(int i){level = i;}int GetLevel(){return level;}void AddLevel(int i)Object ObjectObject ObjectSet+Get+static int level;void SetLevl(int i){level = i;}int GetLevel(){return level;}void AddLevel(int i){level += i;}Object (event)void eventQuit(){...}eventFight, eventMarryDriver create(), heart_beat, setup()Object (_)XO team Mud MudLpMud“ ”XOXO team:LpcLpMud Lpc Unix Lpc ObjectObject Object create() Lpc ObjectLpc MudXOLpcLpc ObjectObjectObject Driver Objectcreate() Objectcreate() ObjectObjectLpc 90{} () Lpc2.1“0” “1”BASIC C++ Pascal“0” “1”2.2‘x’65 Lpc------x = 65;-----------write(x + "\n");y = x + 5;-----65 "a"70 yx = 65; 65 . 65, : 00000000000000000000000001000001'A' : 00000000000000000000000001000001write( x + "\n" );,65 'A'.65 'A'., ,. LPC ., :-----int x;----Driver x , 'int' . 'int' 32 . ,, . Driver'0' '1' .2.3 LpcLpMud Drivervoid, int, string, object, mixed, int *, string *,object *, mixed *Driverfloat, mapping, float *, mapping *Driverfunction, struct, class, charMudOS v22pre8 )void, int, string, object, float, mapping, function,class, mixed, int *, string *, object *, float *,mapping *, function *, class *, mixed *2.4Lpc :void, int, float, string, object, mixed.: mapping, array, : class, function, Lpc . :int( ), float( string( ).int( , 1, 42, -18, 0, -10002938. MudOS 32 , .int , wiz_level,, int( ).float( , 2.034, -102.3453, 0.0, 1132741034.33 . MudOS 32 , . float .Object , int float, int, int float 0. Driver MudOS , int float , .string( , "a", " !", "42", " 15 .", "I am Trill.", . ,"" , int( )42 string()"42", room) "room"). string ,: "", 0, .int, float string,. , ,Lpc C/C++ . , +Lpc string int float , : write(x + "\n");"\n" , x , Lpc ,, ., Driver. .Object . ?, :-----void add_x_and_y(){int x;int y;x = 2;y = x + x * x;}----. add_x_and_y().x, y int.MudOS :int(32 ).float(32 ).string.object.mapping.function, (object, .arrays'*' .void, ..mixed, .mixed, Driver .class, struct C++ class .MudOS .:, Driver '0' '1', ., MudOS . ,, " "/"trill",Driver . C/C++ ,+ .LpcLpc Object (call)"0" "1" Object Object2.1LpcPascal Lpc C/C++ Pascal Lpc void Pascal Lpc-----void eventDoNothing() {}-----Lpc1)2)3)Driver1)2)1, 2, ..., N);DrinkWater stringint-----int eventDrinkWater(string str);-----, str eventDrinkWater()-----int eventDrinkWater(string);-----eventPrintValue() add(),-----/* Object*/void eventPrintValue();int add(int x, int y);/* write_vals() * Object.*/void eventPrintValue(){int x;x = add(2, 2); // x add() write(x + "\n");}/* add() */int add(int x, int y){return (x + y);}-----XOXO2.2 Efunsefunexternally defined function Mud Driver Lpc Lpc this_player(), strcmp(), implode(), filter()Object Object Object efun efun ObjectObject lfun(local function)lfun ObjecteventPrintValue()add(), lfunwrite() efun Driverefun1)2) internet socket3) Lpc Lpcefun Driver Mud Driverefun Mud /doc/efunhelp <efun > efun Mud Driver Driver efunXO MudOS efun helpefun2.3Lpc Object ObjecteventPrintValue()-----x = add(2, 2);-----efun: write()"return" add() "return ( x + y );" ( x + y ) eventPrintValue() x "return" returnvoid "return;"(lfun)1)2)3) ( )4) {5)6)7) } void } return return-----int my_function( string target ){string name;object pplname = "Trill";if ( ppl = find_player( target ) ){tell_object( ppl, "hi. My name is " + name + ". \n" )return 1;}else{tell_object( this_player(), "sorry, i don't find the target : " + name + ".\n" );return 0;return 0;}-----string intLpc Object1)2) )3)3) The callXOXODriver efun Driver efun MudLib efun simul_efun sefun efun efun /doc/efun/help/wizard/efun Mud "man" "help"Driverprivate1)() {}2)LpcLpcLpcvoidMudLib )-----void create();inherit "/std/room";void create(){room::create();set( "short", " ");set( "long", " \n" );set( "exits", (["trill" : "/u/trill/workroom",]);create_door("south", " ", "north", 0);setup();}-----1) create() "void create();"create() room::create()2) set(), create_door(), setup()3)1) room::create()2) set() create_door()3)(OOP)MudLibObject Object1000 roomroomroomroomGetLong() query_long() MudLib ObjectOOP"/std/room.c" Object roomroom roomroomOOPObjectObjectObjectOOP-----inherit "/std/room";-----room: "/std/room.c" room"/std/room.c"set(), create_door() create()room Objectroom::create()::create() ::init()Object create()Object create() Driver create()Object /std/room.c create()room create()-----------------room::create();-----------------"::" example()Object "::"Object example()Object example()/std/room.c create()"::" Object"::"-----#1inherit "/std/room";void create(){create();}----------#2inherit "/std/room";void create()room::create();}-----1 Driver create() create() create() create() create() create() Driver2 room.c Object Driver create() create() room::create() room.c create()MudLibEs2 MudLibObject "/doc/build" "room_prop" "monster_prop" ObjectObjectLpc1) MudLib ObjectObjectObject2) MudLib Object3) Object-----inherit "filename";-----filename Object inherit "xxx"objectLpcobject room roomobject2.1 objectobject objectobjectobjectobject oTest;objectroom / npc efun write(), say() object object efun2.2 efun: this_object()efun object objectthis_object() objectobjectobjectobject name.c player.c this_object() player.c object name.c this_object()npc npcvoid eventSmellFlower(){if( this_object()->can_act() )write( this_object()->query( "name" ) + " \n" ); this_object()->add( "kee", 5 );}}can_act() npc.c objectif ( can_act() ) drivercan_act()this_object()->can_act()can_act() 0 ifefun driverobject this_objectobject ( A ) object (B)object (B) BA Athis_object()->2.3 ObjectobjectObjectObject playerobjectobject->function(parameters)call_other(object, "function", parameters);example:this_player()->add_money( "silver", 5 );call_other( this_player(), "add_money", "silver", 5 );( ) mudplayer player eufn this_player() object this_player() player this_player() efun this_player()driver playerthis_player() create(), setup()2.4 lfun: init()“ ” object object (object room ) init()void init() {::init();if ( this_object()->can_act() ){this_object()->eventGreet( this_player() );}}eventGreet()void eventGreet( object ob ){if ( !ob || environment( ob ) != environment( this_object() ) ) {return ;}else{write( " \n" );}}efun environment() object player room player2.5 room objectplayervoid test(){object env, snake;env = environment( this_player() );if ( objectp( env ) ){snake = clone_object( "/clone/monster/snake" );if ( objectp( snake ) ){snake->move( env );}}}efun objectp efunobject efun clone_object()object moveefun efun move_objectobject object( lpc )object efunthis_object(), this_player() environment() clone_object() objectp() init()mud mudlibmud lpclpcLpc C。

相关文档
最新文档