游戏开发论坛

 找回密码
 立即注册
搜索
查看: 4321|回复: 12

制做中的游戏!!

[复制链接]

26

主题

75

帖子

77

积分

注册会员

Rank: 2

积分
77
发表于 2009-3-10 13:13:00 | 显示全部楼层 |阅读模式
正在制做中的游戏  完全可以以lua脚本控制游戏


npcID = 0;

npctalkLu = [[  真是个穷鬼 300个便士都没有。等着让人坐你的头卢吧!
                                                                      <坐就坐!/Close> ]]

npctalkString = [[      <救世主/Help>  <时光倒流/TimeBack>   <关闭/Close>是不是受不了?给我300个金子我可以叫点人来帮帮你?不同的武士是需要不同的币子的哦! <蜀兵/Play> |<黄巾贼/Playt>|  <民兵/Playtt>|<野蛮兵/Playttt> |<山贼/Playtttt>|  <弓箭手/Playttttt> | <还是不要了,我没钱!/Close>]]

npctalkArms  = [[  无处不在的神会保佑你的,只要你相信    <关闭/Close>                                               < 烽火救世神兵 /DeityArms>]]
function main()


     WAR_SetGoldCount( 50000 );

     WAR_ShowNPCChatWnd(  npctalkString);


end


function      TimeBack()

WAR_ClearWar();

  WAR_CloseChatWnd();


end

function Check()
     Gold = WAR_GetGoldCount();

     if  Gold < 300 then
        
         return  0;
     end

     return 1;
end

function Play()

   if   Check() == 0  then
     WAR_ShowNPCChatWnd(  string3 );
      return;
   else
     WAR_SetGoldCount( WAR_GetGoldCount() - 300 );
   end



   point = { x =0, y = 0 }
   newPoint = { x =0, y = 0 }

   npcID =   WAR_GetNPCID();

   WAR_GetActorPos( "point", npcID )

   if WAR_GetRoundRandomPos( "newPoint", "point",  2 )  == 1 then
      newActorID = WAR_CreateActor( "蜀兵", newPoint.x  , newPoint.y, 0 );
     WAR_ChangeActorCountry( newActorID, WAR_GetCurrCountry( ) );
   end

   WAR_GetRoundRandomPos( "newPoint", "point",  5 );

   WAR_CreateGroudItem( SG_GetSpecRandomNum(0,WAR_GetItemCount()), newPoint.x, newPoint.y );

   WAR_AddScrollText( "增加了一个人物",  SG_RGB32(255, 0, 0)  )

   point =nil;
   newPoint = nil;
   newActorID = nil;

   

end

function Playt()

   if   Check() == 0  then
     WAR_ShowNPCChatWnd(  string3);
      return;
   else
     WAR_SetGoldCount( WAR_GetGoldCount() - 500 );
   end


   point = { x =0, y = 0 }
   newPoint = { x =0, y = 0 }

   npcID =   WAR_GetNPCID();

   WAR_GetActorPos( "point", npcID )

   if WAR_GetRoundRandomPos( "newPoint", "point",  2 )  == 1 then
      newActorID = WAR_CreateActor( "黄巾贼", newPoint.x  , newPoint.y, 0 );
     WAR_ChangeActorCountry( newActorID, WAR_GetCurrCountry( ) );
   end

   point =nil;
   newPoint = nil;
   newActorID = nil;
end
function Playtt()

   if   Check() == 0  then
     WAR_ShowNPCChatWnd(  string3 );
      return;
   else
     WAR_SetGoldCount( WAR_GetGoldCount() - 500 );
   end



   point = { x =0, y = 0 }
   newPoint = { x =0, y = 0 }

   npcID =   WAR_GetNPCID();

   WAR_GetActorPos( "point", npcID )

   if WAR_GetRoundRandomPos( "newPoint", "point",  2 )  == 1 then
      newActorID = WAR_CreateActor( "民兵", newPoint.x  , newPoint.y, 0 );
     WAR_ChangeActorCountry( newActorID, WAR_GetCurrCountry( ) );
   end

   point =nil;
   newPoint = nil;
   newActorID = nil;
end
function Playttt()

   if   Check() == 0  then
     WAR_ShowNPCChatWnd(  string3 );
      return;
   else
     WAR_SetGoldCount( WAR_GetGoldCount() - 500 );
   end



   point = { x =0, y = 0 }
   newPoint = { x =0, y = 0 }

   npcID =   WAR_GetNPCID();

   WAR_GetActorPos( "point", npcID )

   if WAR_GetRoundRandomPos( "newPoint", "point",  2 )  == 1 then
      newActorID = WAR_CreateActor( "野蛮兵", newPoint.x  , newPoint.y, 0 );
     WAR_ChangeActorCountry( newActorID, WAR_GetCurrCountry( ) );
   end

   point =nil;
   newPoint = nil;
   newActorID = nil;
end
function Playtttt()

   if   Check() == 0  then
     WAR_ShowNPCChatWnd(  string3 );
      return;
   else
     WAR_SetGoldCount( WAR_GetGoldCount() - 500 );
   end


   point = { x =0, y = 0 }
   newPoint = { x =0, y = 0 }

   npcID =   WAR_GetNPCID();

   WAR_GetActorPos( "point", npcID )

   if WAR_GetRoundRandomPos( "newPoint", "point",  2 )  == 1 then
      newActorID = WAR_CreateActor( "山贼", newPoint.x  , newPoint.y, 0 );
     WAR_ChangeActorCountry( newActorID, WAR_GetCurrCountry( ) );
   end

   point =nil;
   newPoint = nil;
   newActorID = nil;
end

function Playttttt()

   if   Check() == 0  then
     WAR_ShowNPCChatWnd(  string3 );
      return;
   else
     WAR_SetGoldCount( WAR_GetGoldCount() - 500 );
   end



   point = { x =0, y = 0 }
   newPoint = { x =0, y = 0 }

   npcID =   WAR_GetNPCID();

   WAR_GetActorPos( "point", npcID )

   if WAR_GetRoundRandomPos( "newPoint", "point",  2 )  == 1 then
      newActorID = WAR_CreateActor("弓箭手", newPoint.x  , newPoint.y, 0 );
     WAR_ChangeActorCountry( newActorID, WAR_GetCurrCountry( ) );
   end

   point =nil;
   newPoint = nil;
   newActorID = nil;

end


function DeityArms()

    point = { x =0, y = 0 } ;

    npcID =   WAR_GetNPCID();

    WAR_GetActorPos( "point", npcID );

    for  i = WAR_Map_GetWidth () - 10, WAR_Map_GetWidth ()  do
         for  j = 0, 10  do
          CreateTarID = WAR_CreateActor( "神兵", i , j, 6 );
          WAR_ChangeActorCountry( CreateTarID, WAR_GetCurrCountry( ) );
          WAR_Actor_Move( CreateTarID, point.x, point.y,1, 0 );
         end
    end

    for  k = WAR_Map_GetWidth () - 10, WAR_Map_GetWidth ()  do
         for  l = WAR_Map_GetHeight() - 10, WAR_Map_GetHeight()  do
          CreateTarID = WAR_CreateActor( "神兵", k , l, 6 );
          WAR_ChangeActorCountry( CreateTarID, WAR_GetCurrCountry( ) );
          WAR_Actor_Move( CreateTarID, point.x, point.y,1, 0 );
         end
    end

  point =nil;
  CreateTarID = nil;

end

function Help()
      WAR_ShowNPCChatWnd(  npctalkArms );
      
end
function NotPlay()
      WAR_ShowNPCChatWnd(  npctalkLu);
end
function Close()

     WAR_CloseChatWnd();

end



26

主题

75

帖子

77

积分

注册会员

Rank: 2

积分
77
 楼主| 发表于 2009-3-10 13:17:00 | 显示全部楼层

Re: 制做中的游戏!!




61

主题

1429

帖子

1430

积分

金牌会员

Rank: 6Rank: 6

积分
1430
发表于 2009-3-10 15:37:00 | 显示全部楼层

Re:制做中的游戏!!

C++是垃圾!

9

主题

249

帖子

260

积分

中级会员

Rank: 3Rank: 3

积分
260
发表于 2009-3-11 19:51:00 | 显示全部楼层

Re:制做中的游戏!!

lz贴了一段lua代码干吗?

9

主题

249

帖子

260

积分

中级会员

Rank: 3Rank: 3

积分
260
发表于 2009-3-11 19:52:00 | 显示全部楼层

Re: Re:制做中的游戏!!

使命召唤: Re:制做中的游戏!!

C++是垃圾!

原来VB fans是这么评价C++的,叹啊!

26

主题

75

帖子

77

积分

注册会员

Rank: 2

积分
77
 楼主| 发表于 2009-3-11 20:25:00 | 显示全部楼层

61

主题

1429

帖子

1430

积分

金牌会员

Rank: 6Rank: 6

积分
1430
发表于 2009-3-11 23:04:00 | 显示全部楼层

Re:制做中的游戏!!

什么也看不到

4

主题

107

帖子

107

积分

注册会员

Rank: 2

积分
107
发表于 2009-3-13 12:10:00 | 显示全部楼层

Re: 制做中的游戏!!

[em2] [em2] [em2]上面链接有木马!!!

26

主题

75

帖子

77

积分

注册会员

Rank: 2

积分
77
 楼主| 发表于 2009-3-13 15:21:00 | 显示全部楼层

Re: 制做中的游戏!!

晕死,还说有马....



270

主题

6442

帖子

6446

积分

论坛元老

Rank: 8Rank: 8

积分
6446
发表于 2009-3-13 16:42:00 | 显示全部楼层

Re:制做中的游戏!!

123299045
图片是看不到的, 百度防止盗链, 只有你自己看的到, 还是找个自己的空间传吧! 或者我的论坛.
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

作品发布|文章投稿|广告合作|关于本站|游戏开发论坛 ( 闽ICP备17032699号-3 )

GMT+8, 2026-1-20 00:41

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表