妖精
- UID
- 1130
- 精华
- 0
- 积分
- 209
- 威望
- 0 度
- 性别
- 男
|
阁楼
大 中
小 发表于 2016-4-27 11:18 只看该作者
LUA腳本 簡易生蛋 道具參數LUA_usePetEgg
今天分享一個寫出來 很簡單的腳本
. O( E' l8 \, b& x* p! I9 d妖城在线论坛
* W/ S5 z9 s$ f' }5 h' R魔力私服,最新魔力宝贝私服技术交流這個腳本 可以拿來做為 道具參數的呼應 參考文章吧? —魔力私服,魔力宝贝私服技术,DELPHI编程,魔力寶貝, 魔力宝贝, 크로스게이트,クロスゲート+ _( b, q3 F% U" i& q$ }
懂得應用的話 可以弄成各種東西=""=
7 j8 C# Z% S. x5 x I' O6 ~6 h5 {魔力私服,最新魔力宝贝私服技术交流
1 e3 F2 [) ~2 M8 }4 s* l. l妖城在线论坛3 M2 k# _/ g. y1 |
# D, a, i! W1 f/ Q2 C我們通常要寫寵物蛋 —魔力私服,魔力宝贝私服技术,DELPHI编程,魔力寶貝, 魔力宝贝, 크로스게이트,クロスゲート) K( |/ O8 D! K, F% ]: F, v6 v9 ~
都會反覆的在 npc 底下 新增對應的txt 檢查道具 刪除道具 產生寵物
f2 u' v3 F- [" B! h6 B—魔力私服,魔力宝贝私服技术,DELPHI编程,魔力寶貝, 魔力宝贝, 크로스게이트,クロスゲート可是對我來說 繁瑣的去新增txt 煩煩的=""=
, W) a# C9 _* g6 W' _; G& l% N魔力私服,最新魔力宝贝私服技术交流 ?5 \/ ~/ o5 R: q" R
所以就寫了 一個簡易生蛋的功能,下面附上GBK的檔案~((轉檔沒測試過 有問題在跟我講 —魔力私服,魔力宝贝私服技术,DELPHI编程,魔力寶貝, 魔力宝贝, 크로스게이트,クロスゲート5 J% ^- V9 ]: W9 V$ C8 b, [+ S1 ^
bbs.mocwww.com$ Y. J' A2 S7 k) s9 ^* i
【示演】
0 y: e1 {2 A6 R' I' V魔力私服,最新魔力私服,魔力宝贝私服,魔力宝贝私服技术,魔力宝贝私服,私服架设技术,妖城,FLASH,电影,黑客,网络,网吧,破解,入侵,注册表在道具itemset.txt新增LUA_usePetEgg類型的道具 9 v8 H0 G' Y& p: B7 E5 @. F- [3 [
參數 則設定enemy裡頭的怪物ID 下方參數 設定 1 代表虎人編號
* H4 |8 q8 o1 R m0 v' }: X& ~妖城在线论坛套用LUA後 以後只要新增itemset.txt 就可以了~~~
9 \" e, I) p- y( p Y# X魔力私服,最新魔力私服,魔力宝贝私服,魔力宝贝私服技术,魔力宝贝私服,私服架设技术,妖城,FLASH,电影,黑客,网络,网吧,破解,入侵,注册表. P' G* \- O. j( E' c
. w! r2 X. {' V" k: p
蛋? 虎人的蛋 1 LUA_usePetEgg 90001078 99451 0 43 0 1 0 93 1 1 1 1 0 0 0 0 1 0 100 0 0 0
1 Z, L. O4 ]4 J( H6 S: S: a, ^魔力私服,最新魔力宝贝私服技术交流' [8 |' q0 ]' m9 P
3 {' N) r) J7 l* Y* V魔力私服,最新魔力私服,魔力宝贝私服,魔力宝贝私服技术,魔力宝贝私服,私服架设技术,妖城,FLASH,电影,黑客,网络,网吧,破解,入侵,注册表【腳本內容】 复制内容到剪贴板 代码:--2016/04/27 阿晉
--简易生蛋功能
--
--
--免新增npc底下 生蛋脚本 直接透过item参数诞生宝宝
--
--注册一个道具使用参数
NL.RegItemString(nil, "PetEgg", "LUA_usePetEgg");
function PetEgg(player,toplayer,itemSlot)
--取到道具的自定參數
local ItemIndex=Char.GetItemIndex(player,itemSlot);
--复制内值
local itemval=Item.GetData(ItemIndex,%道具_自用参数%);
if(Char.PetNum(player)==5)then
NLG.SystemMessage(player,"宠物栏已满,无法使用。");
return;
end
Item.Kill(player,ItemIndex,itemSlot);
Char.GivePet(player,itemval,0);
--Char.GivePet(player,itemval,1);--满档
end 【後記】
/ `/ R1 W( i0 w4 q# e& G/ rbbs.mocwww.com
; O- u s0 y) N2 {妖城在线论坛1.這個蛋只會檢查是否 有寵物欄空間
7 U; w8 z6 v' U+ b; P8 F1 U妖城在线论坛2.請勿讓他堆疊 刪除道具 是刪除那一整格 而非數量 否則可能整格蛋 刪光光
3 Q- [3 F! t2 v: {# a2 T4 N& m( J魔力私服,最新魔力宝贝私服技术交流3.符合寵物空間 刪除道具 產生寵物 魔力私服,最新魔力私服,魔力宝贝私服,魔力宝贝私服技术,魔力宝贝私服,私服架设技术,妖城,FLASH,电影,黑客,网络,网吧,破解,入侵,注册表- U3 {5 R& K; e8 j2 J+ Z4 J
4.Char.GivePet(player,itemval,1); 更改這個可以產生 滿檔寶寶 魔力私服,最新魔力宝贝私服技术交流( s8 s B5 ^8 D. w+ J
5.另外 這個lua產生的效果很陽春-..-沒有窗口 . @2 U( ~/ h' V& p* T6 [2 `% }4 N
bbs.mocwww.com, g: H" _, u, M. ^
魔力私服,最新魔力私服,魔力宝贝私服,魔力宝贝私服技术,魔力宝贝私服,私服架设技术,妖城,FLASH,电影,黑客,网络,网吧,破解,入侵,注册表# B/ Z \* F- ?/ o! P
【安裝方法】 魔力私服,最新魔力私服,魔力宝贝私服,魔力宝贝私服技术,魔力宝贝私服,私服架设技术,妖城,FLASH,电影,黑客,网络,网吧,破解,入侵,注册表7 \6 v4 w* I) f0 P5 Z' n+ C
1.版本確認 GA版本
- l2 \8 I3 ^; e& Z2 @/ B+ K2 K4 sbbs.mocwww.com2.把PetEgg.lua 丟到 lua\Module 下面
( G2 f& u9 d, |) { ~) P魔力私服,最新魔力宝贝私服技术交流3.Config內新增
/ C v4 }. Z* e6 l( Y& YuseModule("PetEgg");
/ i. J+ A4 C& k9 m4 D \* P0 l魔力私服,最新魔力宝贝私服技术交流
0 _7 `$ _( W( W9 U7 {8 M魔力私服,最新魔力宝贝私服技术交流[ 本帖最后由 jeff10363 于 2016-4-27 13:53 编辑 ]
附件
-
PetEgg.rar
(500 Bytes)
-
2016-4-27 11:18, 下载次数: 252
|