사이트 로그인
2016.05.20 19:54
L1NpcInstance.java
public void onTalkAction(L1PcInstance cha){
//
switch(getNpcTemplate().get_npcId()){
//
case 70191://할트 (윈성 용병대장)
cha.sendPackets(cha.get_netConnection().bph().get_NPCTalk().S_NPCTalkReturn(this, "halt1"), true);
break;
public void onFinalAction(L1PcInstance cha, String action){
if(!distance(this, cha, 5)){ // 5셀 안에 있다면
if(action.equalsIgnoreCase("haste")){ // 헤이스트사
if(!cha.get_Buff_헤이스트()){
cha.set_Buff_헤이스트(true);
// 중략
}else if(action.equalsIgnoreCase("demand")){ // 할트 (윈성 용병단)
if(cha.get_PetOn()){ // 펫이 있다면
}else{ // 펫이 없다면
int 소환갯수 = cha.get_cha() / 8;
int 소환몹 = 0;
if(소환갯수>3) 소환갯수 = 3 ;
소환몹 = 100060;
for(int i=0 ; i<소환갯수 ; ++i){
try{
L1Npc template1 = MonsterTable.getInstance().getTemplate(소환몹);
L1SummonInstance pet = new L1SummonInstance(template1);
Object[] parameters = {template1};
pet = (L1SummonInstance) Class.forName("psjump.server.model.L1SummonInstance").getConstructors()[0].newInstance(parameters);
pet.setNPCTemplateType("L1SummonInstance");
pet.set_isdead(false);
pet.setAttackable(false);
switch(i){
case 0:
pet.set_x(cha.get_x()+cha.getRnd().nextInt(3));
pet.set_y(cha.get_y()+cha.getRnd().nextInt(3));
break;
case 1:
pet.set_x(cha.get_x()-cha.getRnd().nextInt(3));
pet.set_y(cha.get_y()-cha.getRnd().nextInt(3));
break;
case 2:
pet.set_x(cha.get_x()-cha.getRnd().nextInt(3));
pet.set_y(cha.get_y()+cha.getRnd().nextInt(3));
break;
case 3:
pet.set_x(cha.get_x()+cha.getRnd().nextInt(3));
pet.set_y(cha.get_y()-cha.getRnd().nextInt(3));
break;
default:
pet.set_x(cha.get_x()+cha.getRnd().nextInt(3));
pet.set_y(cha.get_y()+cha.getRnd().nextInt(3));
break;
}
pet.setHomeX(pet.get_x());
pet.setHomeY(pet.get_y());
pet.set_map(cha.get_map());
pet.set_heading(4);
pet.set_level(template1.get_level());
pet.set_exp(82);
pet.set_lawful(1);
pet.set_temphp(template1.getHp());
pet.set_maxHp(template1.getHp());
pet.setcurrentHp(template1.getHp());
pet.set_tempmp(template1.getMp());
pet.set_maxBaseMp(template1.getMp());
pet.setcurrentMp(template1.getMp());
pet.set_physicalAttackSmall(template1.get_damage());
pet.set_physicalAttackLarge(template1.get_damage());
pet.set_ac(10);
pet.set_Mr(template1.get_mr());
pet.set_Agro(template1.is_agro());
pet.set_Agrocoi(template1.is_agrocoi());
pet.set_Agrososc(template1.is_agrososc());
pet.set_gfxid(template1.get_gfxid());
pet.set_nameid(template1.get_nameid());
while(true){
pet.set_objectId(IdFactory.getInstance().getNextId());
if(L1World.getInstance().storeObject(pet)){
// 현재좌표의 월드맵포인트를 임시로 저장
pet.set_wmp(WorldMapPoint.getInstance().get_map(pet.get_x(), pet.get_y(), pet.get_map()));
WorldMapPoint.getInstance().AddObject(pet.get_x(), pet.get_y(), pet.get_map() ,pet.get_objectId());
break;
}
}
pet.set_SummonOwn(cha);
if(cha.get_PetOn()){ // 펫이 있다면
cha.get_pet().펫추가(pet);
}else{ // 펫이 없다면
cha.set_PetOn(true);
cha.set_pet(new PetSystem());
cha.get_pet().펫추가(pet);
cha.get_pet().주인설정(cha);
}
pet.Start();
}catch (Exception e){
System.out.println(e);
}
}
}
이미 하신분들은 다하셨겠지만
할짓도 없고 올만에 소스나 올려볼까 해서 이거라도 올려봅니다 ㅎ
onTalkAction 부분에서 대화창이 아무나 다 소환을 할수 있게 되어있습니다.
그래서 그부분에
(성혈이 아닐경우 cha.sendPackets(cha.get_netConnection().bph().get_NPCTalk().S_NPCTalkReturn(this, "halt4"), true);)
성혈을 검색하는 구문을 넣으셔서 성혈만 소환할수있게 사용할수있습니다.
소환몹 부분은
100060 폭풍의칼날단 L1Monster 45 100 50 0 0 0 30 20 16 18 12 12 0 1025 0 small 0 0 0 0 0 0 0 0 0 0 2 148 '폭풍의 칼날단' 1 0 0 0 0 0 0 0 0 620 950
바로 위에부분을 나비캣 Monster에 넣으셔서 사용하시면됩니다.
없으신분들을 위한것으로 필요하신대로 사용하시면됩니다.
소환갯수는 카리에 관계있도록 되어있습니다.
번호 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|
공지 | 소스자료는 직접 올려주세요 | 게임존 | 2017.06.06 | 550 |
209 | [요정]속성 마법에 의한 추가 데미지 | 연구사원 | 2016.06.07 | 94 |
208 | 특정지역 몬스터 아덴드랍율 높히기.txt [1] | 연구사원 | 2016.06.07 | 131 |
207 | NPC 호칭 달아주기 소스 | 연구사원 | 2016.06.07 | 74 |
206 | 환생 npc | LTE | 2016.06.06 | 136 |
205 | gm용 아이템 생성 npc [1] | LTE | 2016.06.06 | 212 |
204 | 워프 npc | LTE | 2016.06.06 | 58 |
203 | 성형 npc | LTE | 2016.06.06 | 67 |
202 | 수동 스킬마스터 | LTE | 2016.06.06 | 323 |
201 | 홍보코인 상점npc | LTE | 2016.06.06 | 131 |
200 | 자동전직 npc | LTE | 2016.06.06 | 108 |
199 | 개경소스 [1] | 연구사원 | 2016.06.03 | 344 |
198 | 공성전 군주지급템에 관한 소스 | 연구사원 | 2016.06.02 | 87 |
197 | 마방 및 마법데미지 본x화 [1] | 연구사원 | 2016.06.02 | 595 |
196 | 정확한 마방값을 불러오자 | 김닉넴 | 2016.05.20 | 196 |
195 | 버그사용자에게 몬스터가 말하기 | | 김닉넴 | 2016.05.20 | 163 |
» | 윈성 용병대장에게서 폭풍의칼날단 받는소스 입니다 | 김닉넴 | 2016.05.20 | 89 |
193 | 빈주문서추가 | 김닉넴 | 2016.05.20 | 52 |
192 | 마방이랑 옵션 완벽 적용 [1] | 김닉넴 | 2016.05.20 | 218 |
191 | 공성시간 자동 돌리기 | 김닉넴 | 2016.05.20 | 84 |
190 | 재질에 의한 타격치.. | 김닉넴 | 2016.05.20 | 58 |
189 | 헤이스트 아이템 헤이스트효과구현 | 김닉넴 | 2016.05.20 | 35 |
188 | 언데드계열 힐주기 | 김닉넴 | 2016.05.20 | 28 |
187 | 덱방을 알아보자.. | 김닉넴 | 2016.05.20 | 49 |
186 | 마법사_에볼 | 김닉넴 | 2016.05.20 | 70 |
185 | 마법서복권 | 김닉넴 | 2016.05.20 | 65 |
184 | 마법투구 헤이스트추가 | 김닉넴 | 2016.05.20 | 37 |
183 | 마수군왕의 징표함 적용 | 김닉넴 | 2016.05.20 | 31 |
182 | 만라우풀일때 아이템 안떨구기 | 김닉넴 | 2016.05.20 | 118 |
181 | 말하는 두루마리 무게버그수정.txt | 김닉넴 | 2016.05.20 | 50 |
180 | 몬스터 벽인식 | 김닉넴 | 2016.05.20 | 148 |
179 | 몹 HP게이지 만들기 [3] | 김닉넴 | 2016.05.20 | 185 |
178 | GM명령어 아크변신 | 김닉넴 | 2016.05.20 | 138 |
177 | 간단 낚시 버그 | 김닉넴 | 2016.05.20 | 173 |
176 | UI5 Key [출처] UI5 Key | 김닉넴 | 2016.05.20 | 31 |
175 | UI5 서버버전패킷 & 언노운 | 김닉넴 | 2016.05.20 | 51 |
174 | UI5 옵코드 | 김닉넴 | 2016.05.20 | 245 |
173 | 린드비오르 레이드 맵 / 확인불명 신규맵 | 김닉넴 | 2016.05.20 | 49 |
172 | 4.20일자 key 언노운 서버버전 옵코드 | 김닉넴 | 2016.05.20 | 150 |
171 | 신규 spr | 김닉넴 | 2016.05.20 | 194 |
170 | 두번째 인던맵 입니다 | 김닉넴 | 2016.05.20 | 77 |
169 | 인던 녹색 메세지 패킷 | 김닉넴 | 2016.05.20 | 29 |
168 | 이블 트릭.. 이블 리버스.. 소스(?) 일까나..ㅎㅎ | 김닉넴 | 2016.05.20 | 104 |
167 | A* 알고리즘 (몬스터 길찾기) | 김닉넴 | 2016.05.20 | 286 |
166 | [에바/일팩] * 귓속말 글자수 늘리는 방법 | 김닉넴 | 2016.05.20 | 23 |
165 | [에바/일팩] * 3.63혈맹창 리뉴얼 | 김닉넴 | 2016.05.20 | 59 |
164 | [점팩] * 드레이크인형 | 김닉넴 | 2016.05.20 | 55 |
163 | [에바/일팩] * 바운스헌터 및 신규변신 | 김닉넴 | 2016.05.20 | 83 |
162 | [에바/일팩] 스턴 확률조정법 | 김닉넴 | 2016.05.20 | 146 |
161 | [150811] Opcodes | 김닉넴 | 2016.05.20 | 402 |
160 | PK 승리시 깃털 뺏기 | 김닉넴 | 2016.05.20 | 59 |