OK論壇

 找回密碼
 註冊
查看: 14580|回復: 100

[原創] 【r.】出品 - NPC跟著人物過地圖【提供NPC過MAP範例】

[複製鏈接]
  • TA的每日心情
    開心
    2022-3-25 10:24 AM
  • 簽到天數: 259 天

    連續簽到: 1 天

    [LV.8]以壇為家I

    發表於 2008-7-1 13:50:54 | 顯示全部樓層 |閱讀模式
    這個腳本沒什麼賣點,只是提供一個讓NPC跟著人物過傳點的範例。

    【r.】

    使用環境:EA12716_WinSQLVc_Tw

    [BUG修正]
    修正寸步難行使用BUG 2008-07-03 [未重新封裝,請自行修改]
    if(@MovingAway$ <= 0) 改成 if(@MovingAway$ == "0")


    運用部分指令:
    ------------------------------------------------
    //===========================================\\
    ||         Mob Control Suit Commands         ||
    \\===========================================//
    ------------------------------------------------
    ---------------------------------------
    * mobspawn (<monster name>,<monster ID>,<mapname>,<x>,<y>)
    * mobRemove <GID>;
    This is used to spawn a monster and return it's Game ID, to be used
    in the unit/mobcontrol commands.
    Note, I will use the stuff here in the examples for the unitcontrol.
    Example(s):
    //Spawns a poring named poi poi and put's it's GID in .GID.
    set .GID,mobspawn("Poi Poi",1002,"prontera",160,180);
    //would kill our poring.
    mobRemove .GID;
    ---------------------------------------
    * getmobdata (<GID>,<arrayname>)
    * setmobdata <GID>,<parameter>,<new value>;
    This is used to get and set special data related to the monster.
    With getmobdata, the array given will be filled with the current data. In setmobdata
    the indexes in the array would be used to set that data on the monster.
    Parameters (indexes) are:
    0 = class (big, small, normal)
    1 = level
    2 = HP
    3 = max HP
    4 = master ID (aid of the master, summon)
    5 = map index
    6 = x
    7  = y
    8  = speed
    9  = mode (see doc/mob_db_mode_list.txt)
    10 = special AI state (?)
    12 = sex
    11 = SC option
    13 = class (Monster ID, Job ID)
    14 = hair style
    15 = hair color
    16 = head gear bottom
    17 = head gear middle
    18 = head gear top
    19 = cloth color
    20 = shield
    21 = weapon
    22 = shield (again)
    23 = looking dir
    24 = killer state (1 or 0)
    25 = callback flag
    26 = no random walk (1 or 0)
    Example(s):
    //this will set all the mobdata in the @array variable. (@array[1] being level, @array[13] class etc)
    getmobdata .GID,@array;

    //set the max hp of our poring to 1000.
    setmobdata .GID,3,1000;
    ---------------------------------------
    * mobassist <GID>,<target id>;
    This will make the monster assist the Target ID as if it was a summon of it.
    Example(s):
    /this will make our poring assist the current attached player! >:3
    mobassist .GID,getcharid(3);
    ---------------------------------------
    * mobattach <GID>{,"<NPC Name>"};
    GID is the GID of a monster, NPC or account id. The NPC running or
    he NPC name given is used to attach the monster.
    By attaching a monster, the NPC to which it is attached is ran on special actions by the monster.
    The system will set specific data in the .ai_action variable array on the NPC invoked.
    The special AI actions types are set in the .ai_action at place AI_ACTION_TAR_TYPE
    More AI_ vars are set in const.txt, and you can also look at sample/monstercontroller.cpp:
    ---------------------------------------
    * unitwalk <GID>,<x>,<y>;
    * unitwalk <GID>,<mapid>;
    This is one command, but can be used in two ways. If only the first argument is given,
    the unit whose GID is given will start walking towards the map with the given mapid
    (we believe these are the mapindexes found in db/map_index.txt).
    When 2 arguments are passed, the given unit will walk to the given x,y coordinates on
    the map where the unit currently is.
    Example(s):
    //Will move/walk the poring we made to the coordinates 150,150
    unitwalk .GID,150,150;
    //Will move the poring towards alberta (if my assumed mapindexes are correct).
    unitwalk .GID,3;
    ---------------------------------------
    * unitkill <GID>;
    * unitwarp <GID>,<Mapname>,<x>,<y>;
    * unitattack <GID>,<Target ID>;
    * unitstop <GID>;
    * unittalk <GID>,<Text>;
    * unitemote <GID>,<Emote>;
    Okay, these commands should be fairly self explaining.
    For the emotions, you can look in db/const.txt for prefixes with e_
    ---------------------------------------

    set $@FollowName$,"TTuy";//跟隨目標
    使用前請更改此項目。
    點擊NPC將停止跟隨。




    文件密碼藏起來了,積分不夠的短訊吧。
    圖片好像是多餘的呢!
    遊客,本帖隱藏的內容需要積分高於 500 才可瀏覽,您當前積分為 0


    [ 本帖最後由 reasapakisa 於 2009-1-22 07:23 PM 編輯 ]

    本帖子中包含更多資源

    您需要 登錄 才可以下載或查看,沒有帳號?註冊

    x

    評分

    參與人數 1積分 +50 現金 +50 積極性 +50 收起 理由
    goddameit + 50 + 50 + 50 高趣味性

    查看全部評分

    該用戶從未簽到

    發表於 2008-7-1 14:30:52 | 顯示全部樓層
    謝謝大大無私分享自創教學~
    回復 支持 反對

    使用道具 舉報

    該用戶從未簽到

    發表於 2008-7-1 17:06:26 | 顯示全部樓層
    XD

    你的密碼到底是啥阿 ....

    看不懂XD

    是只有紅字的部份嗎??
    回復 支持 反對

    使用道具 舉報

  • TA的每日心情
    開心
    2022-3-25 10:24 AM
  • 簽到天數: 259 天

    連續簽到: 1 天

    [LV.8]以壇為家I

     樓主| 發表於 2008-7-1 17:13:10 | 顯示全部樓層
    嘿嘿,黑色字是謎語,
    其實還蠻簡單的~
    EX:
    題目:我養了人類的好朋友(英文小寫),它是吸收所有光線的顏色(英文小寫)的。
       人類的好朋友...狗!dog
       吸收所有光線的顏色...黑色!black

    答案:我養了dog,它是black的。
    ...呵呵,好濫的題目=︿=

    [ 本帖最後由 reasapakisa 於 2008-7-1 05:21 PM 編輯 ]
    回復 支持 反對

    使用道具 舉報

  • TA的每日心情
    開心
    2019-8-18 04:57 PM
  • 簽到天數: 2148 天

    連續簽到: 1 天

    [LV.Master]伴壇終老

    發表於 2008-7-1 17:16:03 | 顯示全部樓層
    原 來 你 早 上 在 問 這 個
    回復 支持 反對

    使用道具 舉報

  • TA的每日心情
    開心
    2019-8-18 04:57 PM
  • 簽到天數: 2148 天

    連續簽到: 1 天

    [LV.Master]伴壇終老

    發表於 2008-7-1 17:18:53 | 顯示全部樓層
    想 不 到 密 碼 的 複 製 這
    遊客,本帖隱藏的內容需要積分高於 900 才可瀏覽,您當前積分為 0
    回復 支持 反對

    使用道具 舉報

  • TA的每日心情

    2020-5-13 05:35 PM
  • 簽到天數: 1 天

    連續簽到: 1 天

    [LV.1]初來乍到

    發表於 2008-7-1 17:20:36 | 顯示全部樓層
    潔雨希華=reasapakisa ?
    回復 支持 反對

    使用道具 舉報

  • TA的每日心情
    開心
    2022-3-25 10:24 AM
  • 簽到天數: 259 天

    連續簽到: 1 天

    [LV.8]以壇為家I

     樓主| 發表於 2008-7-1 17:23:38 | 顯示全部樓層
    樓上問得好!是同一個人!
    但是!是兩個不同的個性!
    喔!好像沒有很大意義030

    最近問的好像是波利了,
    【波利劇場!】...再說吧..不能指定打就是只能刪除打鬥畫面了!?
    波利拳擊...「波利的手」...

    [ 本帖最後由 reasapakisa 於 2008-7-1 05:34 PM 編輯 ]
    回復 支持 反對

    使用道具 舉報

  • TA的每日心情
    開心
    2019-8-18 04:57 PM
  • 簽到天數: 2148 天

    連續簽到: 1 天

    [LV.Master]伴壇終老

    發表於 2008-7-1 17:29:46 | 顯示全部樓層
    波 利 拳 擊 賽 XD
    回復 支持 反對

    使用道具 舉報

  • TA的每日心情

    2020-5-13 05:35 PM
  • 簽到天數: 1 天

    連續簽到: 1 天

    [LV.1]初來乍到

    發表於 2008-7-2 10:27:07 | 顯示全部樓層
    原帖由 reasapakisa 於 2008-7-1 05:23 PM 發表
    樓上問得好!是同一個人!
    但是!是兩個不同的個性!
    喔!好像沒有很大意義030


    這麼說.......你是人格分裂?   =3=
    回復 支持 反對

    使用道具 舉報

  • TA的每日心情
    開心
    2018-12-2 04:19 PM
  • 簽到天數: 7 天

    連續簽到: 1 天

    [LV.3]偶爾看看II

    發表於 2008-7-4 21:30:01 | 顯示全部樓層
    .......到底幾號不要這樣玩...
    回復 支持 反對

    使用道具 舉報

    該用戶從未簽到

    發表於 2008-7-7 09:47:48 | 顯示全部樓層
    我要加油摟  晚點來發一ㄍ腳本^^
    回復 支持 反對

    使用道具 舉報

  • TA的每日心情
    郁悶
    2012-10-15 03:40 PM
  • 簽到天數: 1 天

    連續簽到: 1 天

    [LV.1]初來乍到

    發表於 2008-7-8 01:01:26 | 顯示全部樓層
    感謝大大提供這麼棒的腳本阿~~
    回復 支持 反對

    使用道具 舉報

    頭像被屏蔽

    該用戶從未簽到

    發表於 2008-7-9 15:19:15 | 顯示全部樓層
    提示: 作者被禁止或刪除 內容自動屏蔽
    回復 支持 反對

    使用道具 舉報

  • TA的每日心情

    2012-11-16 07:21 PM
  • 簽到天數: 122 天

    連續簽到: 1 天

    [LV.7]常住居民III

    發表於 2008-7-10 13:43:48 | 顯示全部樓層
    3QQ創意十足        : D 研究`
    回復 支持 反對

    使用道具 舉報

    您需要登錄後才可以回帖 登錄 | 註冊

    本版積分規則

    Archiver|手機版|小黑屋|OK討論區

    GMT+8, 2024-4-24 05:23 PM , Processed in 0.103968 second(s), 23 queries , Gzip On.

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

    快速回復 返回頂部 返回列表