UID68028
帖子
精華
主題
積分5709
現金
積極性
威望
違規
熱心
推廣次數
閱讀權限20
註冊時間2008-3-13
在線時間 小時
最後登錄1970-1-1
TA的每日心情 | 開心 2022-3-25 10:24 AM |
---|
簽到天數: 259 天 連續簽到: 1 天 [LV.8]以壇為家I
|
這個腳本沒什麼賣點,只是提供一個讓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
評分
-
查看全部評分
|