|
gmsv石器单机原创作品
原文
NEWNPCENEMY
entype:2
askbattlemsg1:你又想来封印我吗?
askbattlemsg2:可恶的光明精灵王,竟然关了我两千年!
askbattlemsg3:不过因为这场地震,我出去的日子终于到来了!
askbattlemsg4:就凭你一个人类也想来打扰我的计划吗?
askbattlemsg5:不要以为你可以承受我累积了两千年的魔力!
askbattlemsg6:受死吧!
startmsg:胆敢阻拦我?不自量力的人类!死吧!
dieact:1
warpfl:30619
warpx:19
warpy:22
item:1292
enemyno:1690,1688,1687,1689,1686,1678,1679,1677,1680
deniedmsg:你是什么东西?
alreadymsg:别急,马上就轮到你了…
onebattle:1
OVER
NEWEVENT1:
FREE:ENDEV=4&ENDEV=69&ENDEV=70&NOWEV=71&EQUIT=1292
WARP:30691,87,68
endmsg:让你们尝尝我两千年的魔力与怨念吧!
OVER
NEWEVENT2:
FREE:ENDEV=4&ENDEV=69&ENDEV=70&NOWEV=71&EQUIT!=1292
WARP:30619,19,22
endmsg:没有灵力铠,你是无法阻止我的~~~
OVER
NEWEVENT3:
FREEV>0
WARP:117,180,99
endmsg:别想混水摸鱼!
OVER
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
转LUA
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--NPC战斗结束事件(NPC索引, 战斗索引,赢败)
function BattleOver(meindex, battleindex, iswin)
--当NPC输了
if iswin == 1 then
for i=0, 4 do
local charaindex = battle.getCharOne(battleindex, i, 0)
if char.check(charaindex) == 1 then
if npc.Free(meindex, charaindex, "ENDEV=4&ENDEV=69&ENDEV=70&NOWEV=71&EQUIT=1292") == 1 then
char.WarpToSpecificPoint(charaindex, 30691, 87, 68)
char.TalkToCli(charaindex, meindex, ""..char.getChar(meindex, "名字")..":让你们尝尝我两千年的魔力与怨念吧!", "黄色")
elseif npc.Free(meindex, charaindex, "ENDEV=4&ENDEV=69&ENDEV=70&NOWEV=71&EQUIT!=1292") == 1 then
char.TalkToCli(charaindex, meindex, ""..char.getChar(meindex, "名字")..":没有灵力铠,你是无法阻止我的~~~", "黄色")
char.WarpToSpecificPoint(charaindex, 30619,19,22)
else
char.TalkToCli(charaindex, meindex, ""..char.getChar(meindex, "名字")..":别想混水摸鱼!", "黄色")
char.WarpToSpecificPoint(charaindex, 117,180,99)
end
end
end
end
end
--NPC对话事件(NPC索引)
function Talked(meindex, talkerindex , szMes, color )
if npc.isFaceToFace(meindex, talkerindex) == 1 then
if npc.Free(meindex, talkerindex, "ENDEV=4&ENDEV=69&ENDEV=70&NOWEV=71&EQUIT=1292") == 1 then
token = "你又想来封印我吗?\n"
.. "可恶的光明精灵王,竟然关了我两千年!\n"
.. "不过因为这场地震,我出去的日子终于到来了!\n"
.. "就凭你一个人类也想来打扰我的计划吗?\n"
.. "不要以为你可以承受我累积了两千年的魔力!\n"
.. "受死吧!\n"
lssproto.windows(talkerindex, "对话框", "确定|取消", 1, char.getWorkInt( meindex, "对象"), token)
else
char.TalkToCli(talkerindex, meindex, ""..char.getChar(meindex, "名字")..":你是什么东西?", "黄色")
end
end
end
--NPC窗口事件(NPC索引)
function WindowTalked ( meindex, talkerindex, seqno, select, data)
if npc.isFaceToFace(meindex, talkerindex) == 1 then
if seqno == 1 then
if select == 1 then
enemytable = {1690,1688,1687,1689,1686,1678,1679,1677,1680}
battleindex = battle.CreateVsEnemy(talkerindex, meindex, enemytable)
end
end
end
end
function Create(name, metamo, floor, x, y, dir)
--创建NPC(NPC名字,图像号,地图号,坐标X,坐标Y,方向号)将返回一个NPC索引
npcindex = npc.CreateNpc(name, metamo, floor, x, y, dir)
--设置事件触发(NPC索引,事件,执行函数,执行函数文件路径)
char.setFunctionPointer(npcindex, "对话事件", "Talked", "")
char.setFunctionPointer(npcindex, "窗口事件", "WindowTalked", "")
char.setFunctionPointer(npcindex, "战后事件", "BattleOver", "")
end
function data()
end
function main()
data()
Create("黑暗精灵王", 100444, 2000, 58, 77, 4) --坐标没有修改
end
最后提示:data修改各方面都在于有自学精神,好多知识是需要实践过才掌握的
|
|