부족전쟁 - 공식포럼
 

뒤로가기   부족전쟁 - 공식포럼 > 커뮤니티 > 부족전쟁 노하우 > 스크립트/툴

Notices

댓글 작성
 
주제 도구 주제내 검색 표시 방식
운영자
운영자
 
가입일: Nov 2008
  오래됨 #1   06-05-2009, 12:03 PM   Top 인용 댓글 작성
코드:
javascript:var coins=4;function selectAllMax2(form,textMax,textNothing){for(var i=0;i<form.length;i++){var select=form.elements[i];if(select.selectedIndex!=null){if(max){if(select.length>(coins+1)){select.selectedIndex=select.length-(coins+2);}else select.value=0;}else select.value=0;}}max=max?0:1;anchor=document.getElementById('select_anchor_top');anchor.firstChild.nodeValue=max?textMax:textNothing;anchor=document.getElementById('select_anchor_bottom');anchor.firstChild.nodeValue=max?textMax:textNothing;changeBunches(form);}if(document.URL.match('screen=snob')&&document.URL.match('mode=reserve')){selectAllMax2(document.forms['villages'],'Choose maximum amount','Select nothing');}else{alert('Script only works on academy store page');}

아카데미에 있는 스토어링(저장) 탭에서 실행가능하며, 남겨둘 자원량 만큼만 빼고 나머지를 저장할수 있도록 설정가능 합니다.

이 스크립트는 프리미엄 전용 페이지인 영주관저 - 저장 페이지에서 사용 가능한 스크립트 입니다.






저장탭의 화면은 다음과 같습니다.



물론 프리미엄 자체기능으로, 모든자원을 동원해 , 가능한만큼 최대한 자원을 저장할수는 있지만, 유사시 자원이 필요할경우 활용도가 떨어지게 됩니다.

이때 스크립트를 구동하면






와 같이 4단위 저장할수 있지만, 3단위만 저장하도록 하여, 여분자원을 마을에 남겨둘수 있습니다.



*설정

coins=4 남겨둘 자원량
mode=coin -> 코인제일 경우 mode=coin
-> 패킷제일 경우 mode=reserve.
운영자님은 오프라인 상태입니다.  
진아르곤
도끼병
 
가입일: Jul 2009
  오래됨 #2   08-04-2009, 08:22 AM   Top 인용 댓글 작성
저장하면 다시 빼지 못합니다~
진아르곤님은 오프라인 상태입니다.  
angelmai
도끼병
 
가입일: Feb 2008
  오래됨 #3   09-02-2009, 02:43 PM   Top 인용 댓글 작성
javascript:var reserve=1;function selectAllMax2(form,textMax,textNothing){for(var i=0;i<form.length;i++){var select=form.elements[i];if

(select.selectedIndex!=null){if(max){if(select.len gth>(reserve+1)){select.selectedIndex=select.lengt h-(reserve+2);}else select.value=0;}else

select.value=0;}}max=max?0:1;anchor=document.getEl ementById('select_anchor_top');anchor.firstChild.n odeValue=max?

textMax:textNothing;anchor=document.getElementById ('select_anchor_bottom');anchor.firstChild.nodeVal ue=max?textMax:textNothing;changeBunches

(form);}if(document.URL.match('screen=snob')&&docu ment.URL.match('mode=reserve')){selectAllMax2(docu ment.forms['villages'],'Choose maximum

amount','Select nothing');}else{alert('Script only works on academy store page');}



이게 4세계에서 적용되는 스크립트입니다.
angelmai님은 오프라인 상태입니다.  
IIkarII
 
IIkarII님의 아바타
 
가입일: Jun 2009
  오래됨 #4   09-04-2009, 06:12 PM   Top 인용 댓글 작성
2섭용(코인제)

참가명: 코인
이미지 URL: {graphic}/gold.png
목적 URL: {game}&screen=snob&mode=coin


참가명: 금화저장
이미지 URL: {graphic}/unit/unit_snob.png
목적 URL:
코드:
javascript:var%20coins=3;function%20selectAllMax2(form,textMax,textNothing){for(var%20i=0;i<form.length;i++){var%20select=form.elements[i];if(select.selectedIndex!=null){if(max){if(select.length>(coins+1)){select.selectedIndex=select.length-(coins+2);}else%20select.value=0;}else%20select.value=0;}}max=max?0:1;anchor=document.getElementById('select_anchor_top');anchor.firstChild.nodeValue=max?textMax:textNothing;anchor=document.getElementById('select_anchor_bottom');anchor.firstChild.nodeValue=max?textMax:textNothing;changeBunches(form);}if(document.URL.match('screen=snob')&&document.URL.match('mode=coin')){selectAllMax2(document.forms['villages'],'Choose%20maximum%20amount','Select%20nothing');}else{alert('%EC%9D%B4%20%EC%8A%A4%ED%81%AC%EB%A6%BD%ED%8A%B8%EB%8A%94%20%EC%98%81%EC%A3%BC%EA%B4%80%EC%A0%80%EC%9D%98%20%ED%8C%A8%ED%82%B7%EC%A0%80%EC%9E%A5%20%ED%8E%98%EC%9D%B4%EC%A7%80%EC%97%90%EC%84%9C%EB%A7%8C%20%EC%9E%91%EB%8F%99%ED%95%A9%EB%8B%88%EB%8B%A4.');}
__________________






IIkarII님은 오프라인 상태입니다.  
이동꾸옹
2009 부족전쟁 고군분투상,인기상,올해의 플레이어상
 
이동꾸옹님의 아바타
 
가입일: Jul 2009
  오래됨 #5   09-05-2009, 01:20 AM   Top 인용 댓글 작성
ㄴ우왕 angelmaiIIkarII님 짱인듯 ㅇㅈㅇ
__________________


이동꾸옹님은 오프라인 상태입니다.  
히메란다
농노
 
가입일: Jul 2009
  오래됨 #6   12-09-2009, 07:43 PM   Top 인용 댓글 작성
javascript:var coins=4;function selectAllMax2(form,textMax,textNothing){for(var i=0;i<form.length;i++){var select=form.elements[i];if(select.selectedIndex!=null){if(max){if(select. length>(coins+1)){select.selectedIndex=select.leng th-(coins+2);}else select.value=0;}else select.value=0;}}max=max?0:1;anchor=document.getEl ementById('select_anchor_top');anchor.firstChild.n odeValue=max?textMax:textNothing;anchor=document.g etElementById('select_anchor_bottom');anchor.first Child.nodeValue=max?textMax:textNothing;changeBunc hes(form);}if(document.URL.match('screen=snob')&&d ocument.URL.match('mode=coin')){selectAllMax2(document.forms['villages'],'Choose maximum amount','Select nothing');}else{alert('Script only works on academy store page');}



3세계의 경우 이렇게 바꿔야 합니다.
히메란다님은 오프라인 상태입니다.  
yokihiro85
 
가입일: Nov 2009
  오래됨 #7   12-11-2009, 06:03 PM   Top 인용 댓글 작성
아 어지러워
아아아아아
yokihiro85님은 오프라인 상태입니다.  
CheRevolution
 
CheRevolution님의 아바타
 
가입일: Jun 2009
위치: KR1
  오래됨 #8   03-10-2010, 04:03 PM   Top 인용 댓글 작성
1세계와 같은
패킷값 1/2 서버에서는 별도로 적용해야하나요?
CheRevolution님은 오프라인 상태입니다.  
nextream
 
nextream님의 아바타
 
가입일: Sep 2008
  오래됨 #9   06-01-2010, 01:27 PM   Top 인용 댓글 작성
지금까지 영주관저 자원저장 관련으로 나온 각종 스크립트의 불편한 점을 요약해보면,
  • 코인제 혹은 패킷제 전용의 스크립트를 써야만 함(모든 서버에 공통 적용되는 통합 스크립트가 없음)
  • 코인이나 패킷 저장하는 화면으로 직접 이동을 한 후에 스크립트를 실행해야 한다는 점(보통 저장화면으로 바로가는 퀵바링크를 따로 쓰기도 하죠)
  • 전체 그룹, 전체 페이지 상태에서 실행하는 것이 보통인데, 보통은 이 상황을 만들기 위해 클릭 한두번은 더 하게 마련
이 모든 불편함을 다 해소할 수 있는 방법이 없을까 하여 그간 노하우들을 동원하여 한번 만들어 보았습니다.

패킷이든 코인이든 저장관련으로는 이거 한개면 족합니다. 그냥 무조건 아무 화면에서나 클릭하면 됩니다.

스크립트 앞부분에 keep=8 이 부분이 있는데, 이것은 원래의 스크립트에서처럼 8패킷/코인 만큼은 놔두고 나머지 잉여자원만큼
저장대상 값을 설정하는 역할입니다. 개인별 취향대로 그 숫자만 조절하시면 됩니다.

한가지 더, 보너스 기능으로는, 최대값 설정, 설정하지 않기 등의 멘트가 스크립트 안에 고정되는 형식으로 기존 방식은 진행이 되지만,
새로운 스크립트에서는 현재 서버의 원래 멘트를 그대로 따르는 방식으로 유동적으로 바뀌었기 때문에, 심지어는 넷섭이나 독일섭, 심지어는
일본, 중국 섭에서 실행해도 소스 수정 없이 원래 국가언어 설정에 따른 멘트에 따라 적절히 바뀌는 특징을 가지고 있습니다....만, 한섭만 하시는
분들께는 별달리 유용한 기능은 아닐겁니다.


코드:
javascript:var keep=8;function getConfig(){var xhr=new XMLHttpRequest();xhr.open('GET','http://'+window.location.hostname+'/interface.php?func=get_config',0);xhr.send(null);if(200==xhr.status)return xhr.responseXML;alert('Error executing XMLHttpRequest call to get Config!')}function selectAllMax2(F,M,N){for(var i=0;i<F.length;i++){var s=F.elements[i];if(s.selectedIndex!=null)if(max&&s.length>keep+1)s.selectedIndex=s.length-keep-2;else s.value=0}max=max?false:true;anchor=document.getElementById('select_anchor_top');anchor.firstChild.nodeValue=max?M:N;anchor=document.getElementById('select_anchor_bottom');anchor.firstChild.nodeValue=max?M:N;changeBunches(F);}var conf=getConfig();var modeStr=['mode=reserve','mode=coin'][conf.getElementsByTagName('gold')[0].childNodes[0].nodeValue];var url=document.URL;var vid=url.match(/village=\d+/g);vid=(vid==null)?'':vid+'&';var tid=url.match(/t=\d+/g);tid=(tid==null)?'':tid+'&';if('undefined'==typeof max)var max=true;if(url.indexOf('screen=snob')==-1||url.indexOf(modeStr)==-1)document.location.search='?'+tid+vid+'&screen=snob&'+modeStr+'&group=0&from=-1';else{var arrMsg=decodeURI(document.getElementById('select_anchor_top').href).split("'");selectAllMax2(document.forms['villages'],arrMsg[3],arrMsg[5])}

마지막 수정(nextream): 06-01-2010, 04:20 PM 이유: 설명이 어렵다는 분이 계셔서, 직관적이고 쉬운 설명으로 재정리
nextream님은 오프라인 상태입니다.  
nextream
 
nextream님의 아바타
 
가입일: Sep 2008
  오래됨 #10   06-01-2010, 04:29 PM   Top 인용 댓글 작성
인용:
cherevolution님의 원본 글 글 보기
1세계와 같은
패킷값 1/2 서버에서는 별도로 적용해야하나요?
아뇨, 보류 패킷 갯수만 지정하는 것이므로 패킷값이 1/2라도 별도 적용할 필요는 없습니다. 단 자원량을 기준으로 놓고 본다면
보류 패킷 갯수를 일반 세계에 비해서 두배로 지정을 하셔야겠죠.
nextream님은 오프라인 상태입니다.  
댓글 작성

주제 도구 주제내 검색
주제내 검색:

고급 검색
표시 방식

글 작성 규정
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
이모티콘 사용 - On
[IMG] 코드 사용 - On
HTML 코드 사용 - Off

포럼 이동

모든 시간은 GMT +9 기준이며. 현재 시간은 06:10 PM 입니다.
한글번역 - vBulletin 한국 사용자 포럼

Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.