PHP код:
package pts_scripts.npc
import ru.jts.decompiler.model._
class goblin extends warrior_passive {
override def MY_DYING(last_attacker: Creature = null, attacker: Creature = null, target: Creature = null, talker: Creature = null, creature: Creature = null, reply: Int = 0, skill_name_id: Int = 0, `private`: Creature = null, code_info: CodeInfo = null, random1_list: CodeInfoList = null, always_list: CodeInfoList = null, npc0: Npc = null, pos0: Point = null, maker0: NpcMaker = null, maker1: NpcMaker = null, lparty: Party = null, party0: Party = null, pledge0: Clan = null, h0: HateInfo = null, c0: Creature = null, c1: Creature = null, c2: Creature = null, c3: Creature = null, s0: String = null, s1: String = null, f0: Double = 0.0, f1: Double = 0.0, f2: Double = 0.0, f3: Double = 0.0, i0: Int = 0, i1: Int = 0, i2: Int = 0, i3: Int = 0, i4: Int = 0, i5: Int = 0, i9: Int = 0) {
var _i0 = i0
var _c1 = c1
var _random1_list = random1_list
var _always_list = always_list
var _code_info = code_info
var _target = target
_always_list = gg.AllocCodeInfoList()
_random1_list = gg.AllocCodeInfoList()
_target = last_attacker
_always_list.SetInfo(0, _target)
while (!gg.IsNull(_code_info = _always_list.Next())) {
_code_info.code match {
case 0 => {
myself.SetCurrentQuestID(264)
_target = _code_info.RandomSelectOne()
if (!gg.IsNull(_target) && myself.DistFromMe(_target) <= 1500) {
_c1 = myself.GetLastAttacker()
if (_c1.master != null) {
_c1 = _c1.master
}
if (gg.OwnItemCount(_c1, 1367) < 50 && gg.HaveMemo(_c1, 264) > 0) {
_i0 = gg.Rand(20)
if (_i0 < 5) {
if (gg.OwnItemCount(_c1, 1367) >= 49) {
myself.GiveItem1(_c1, 1367, 1)
myself.SetFlagJournal(_c1, 264, 2)
myself.ShowQuestMark(_c1, 264)
myself.SoundEffect(_c1, "ItemSound.quest_middle")
}
else if (gg.OwnItemCount(_c1, 1367) == 48) {
myself.GiveItem1(_c1, 1367, 2)
myself.SetFlagJournal(_c1, 264, 2)
myself.ShowQuestMark(_c1, 264)
myself.SoundEffect(_c1, "ItemSound.quest_middle")
}
else {
myself.GiveItem1(_c1, 1367, 2)
myself.SoundEffect(_c1, "ItemSound.quest_itemget")
}
}
else if (_i0 < 10) {
if (gg.OwnItemCount(_c1, 1367) == 46) {
myself.GiveItem1(_c1, 1367, 4)
myself.SetFlagJournal(_c1, 264, 2)
myself.ShowQuestMark(_c1, 264)
myself.SoundEffect(_c1, "ItemSound.quest_middle")
}
else if (gg.OwnItemCount(_c1, 1367) == 47) {
myself.GiveItem1(_c1, 1367, 3)
myself.SetFlagJournal(_c1, 264, 2)
myself.ShowQuestMark(_c1, 264)
myself.SoundEffect(_c1, "ItemSound.quest_middle")
}
else if (gg.OwnItemCount(_c1, 1367) == 48) {
myself.GiveItem1(_c1, 1367, 2)
myself.SetFlagJournal(_c1, 264, 2)
myself.ShowQuestMark(_c1, 264)
myself.SoundEffect(_c1, "ItemSound.quest_middle")
}
else if (gg.OwnItemCount(_c1, 1367) == 49) {
myself.GiveItem1(_c1, 1367, 1)
myself.SetFlagJournal(_c1, 264, 2)
myself.ShowQuestMark(_c1, 264)
myself.SoundEffect(_c1, "ItemSound.quest_middle")
}
else {
myself.GiveItem1(_c1, 1367, 8)
myself.SoundEffect(_c1, "ItemSound.quest_itemget")
}
}
}
}
}
}
}
_code_info = _random1_list.RandomSelectOne()
if (!gg.IsNull(_code_info)) {
//_code_info.code
}
super.MY_DYING(last_attacker, attacker, target, talker, creature, reply, skill_name_id, `private`, code_info, random1_list, always_list, npc0, pos0, maker0, maker1, lparty, party0, pledge0, h0, c0, c1, c2, c3, s0, s1, f0, f1, f2, f3, i0, i1, i2, i3, i4, i5, i9)
}
}