Created
December 9, 2016 14:02
-
-
Save DingWeizhe/fb14f8171c676af640272c78d4b96d07 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { SC } from "./core"; | |
import { Global } from "./core"; | |
@Display({ | |
view: "/npc/kafra.js", | |
name: "卡普拉服務人員", | |
position: { | |
map:"prontera", | |
x:100, | |
y:100 | |
} | |
}) | |
class MyNPC extends NPC implements onClick, onInit { | |
onClick(npc, pc, global) { | |
npc.message(` | |
[SeAr服務員] | |
我必將進一切努力來為客人服務 | |
`); | |
npc.warp(npc, pc, global); | |
switch(await pc.select("狀態服務", "傳送服務", "職業服務")){ | |
case 0: | |
pc.percentheal(100, 100); | |
pc.endSC(SC.Poison, SC.Posion, SC.Silence, SC.Blind, SC.Confusion, SC.Curse, SC.Hallucination); | |
break; | |
} | |
} | |
onInit() { | |
} | |
warp(npc, pc, global) { | |
} | |
} | |
@Display({ | |
view: "/npc/kafra.js", | |
name: "卡普拉服務人員", | |
position: ["prontera", 100, 100] | |
}) | |
class Kafara2 extends Kafra { | |
warp() { | |
npc.say(``) | |
} | |
onClick(){ | |
var mob = Poring.Spawn({ map:"prontera", x:100, y:100 }); | |
mob.var = "question"; | |
mob.on('kill', npc.onKillPoring); | |
} | |
onKillPoring(killer, mob){ | |
if (killer.isPC() && killer.question && mob.var == "question"){ | |
} | |
} | |
} | |
onInit(){ | |
AllMonster: any = MyPC; | |
.filter(mob => mob.isPeople()) | |
.map(mob => mob.on('kill', npc.onKillPeople)); | |
Poring.on('kill', npc.onKillPoring); | |
} | |
} | |
class MyPC extends PC implements onKillMob { | |
onKillMob(pc, mob) { | |
if (pc.hasQuest){ | |
} | |
} | |
} | |
Poring.Spawn({ map:"prontera", x:100, y:100 }); | |
Position.addMob(Poring); | |
@Display({ | |
}) | |
@Killable | |
@Moveable | |
class Poring extends Mob implements onDie{ | |
onDie(){ | |
} | |
static Spawn(position) { | |
position.addInstance(new this()); | |
} | |
} | |
@direction({ | |
lenght: 500, | |
speed: 100 | |
}) | |
@position({ | |
}) | |
class Fireball extends Skill { | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment