Jump to content

skipjack94

Members
  • Content Count

    15
  • Joined

  • Last visited

Everything posted by skipjack94

  1. this map error ? when i put in my grf. its error sir. how to fix it ?
  2. Hello. make an item. but i want this item only can be use in PVP map. what script for item db i must put ?
  3. yes sir Dastgir. its fix. my problem solved. thanks before
  4. i use Toasty WOE Control but its can be click on game. please HELP. //======================================================================================================//= Toasty's WoE Controller (formerly WoE Info Banner)//===== By: ============================================================================================//= ToastOfDoom (aka: iHeart)//===== Current Version: ===============================================================================//= 1.22//===== Description: ===================================================================================//= A WoE Controller function which controls castle based WoE by utilising npc events. //= Includes a NPC that provides information on the next WoE session//=//= This script is kinda @reloadscript/@loadnpc safe, provided that someone clicks the NPCs afterwards //= to start the OnInit function. That said..it is recommended that you don't use @reloadscript/@loadnpc //= but reset your server.//===== Changelog: =====================================================================================//= 1.22//= - Fixed an issue regarding the controller getting confused when using @reloadscript/loadnpc while//= WoE was still active. (thanks to annie for pointing out)//= 1.21//= - Fixed a misspelt variable name (thanks to rahuldev345 for pointing out)//= 1.20//= - Project renamed to 'Toasty's WoE Controller'. The script originally was only used to display WoE //= times then I 1st wrote it 3yrs ago and I feel it's purpose is more to control WoE these days. So //= name change to better reflect purpose.//= - Added support for novice WoE. Region teleport goes to the Novice Warper NPC (default in prontera)//= Change position in .region_maps, .region_x, .region_y if needed.//= - Region warp now only displays regions that have castles used at least once. (eg. If you don't //= configure any castles for Payon region, payon will not show up)//= - Optimised WoE Active/Inactive map notifier. Old method used too many loops for something that//= can happen alot.//= - Adjusted menus to be abit more friendly. 'next's will always display before 'menu's//= - Fixed bug with WoE autostarting when only configured for 2 sessions in one day//= - Added some nifty code that prevents catastrophic failure of the script if you try to run a trunk //= version on a stable server (ie. if you do, it will show an error message, but script will still //= run perfectly fine - check out WoEToggler function for those that want to peek at it =P)//= 1.11//= - Fixed timer glitch when players only configured sessions for one day of the week//= - Adjusted timer to show remaining time more accurately//= - Modified .num_woes calculation due to bug regarding 0's being counted as unset values in arrays//= 1.10//= - Expanded script to allow castle based configuration//= - Moved away from portal based woe control. Now using donpcevents to OnAgitEnd/2 events. Provided //= castles are linked to the main agit commands in this manner, they will be controllable using this //= script.//= - Added an onLoadMap WoE available notifier. Can be disabled by setting .notify_woe to 0 in the //= CONFIG section.//= - Did some funky color coding.//= - Added Coordinate based warping per region (see .region_x & .region_y in the CONSTANTS section)//= 1.02//= - Added delwaitingroom to banner npc to prevent memory leaks from bug #2325//= - To reduce spamming of waitingroom packets to players banner NPC only now updates when the banner //= text changes. Thus min time between updates is now 1sec regardless of setting.//= - Added setting for rate which banner time is updated (.banner_refresh_rate) in the CONFIG section.//= - Added agitstart2/end2 to provide WoE2 support (Hope it works ;)//= 1.01//= - Hardcoded in refresh value for banner npc instead of getting it from config from WoEInfoBase. Had //= issues starting the script after @reloadscript/@loadnpc//======================================================================================================- script WoEInfoBase -1,{ OnStartMenu: if(.init == 0) donpcevent strnpcinfo(3)+"::OnInit"; OnStartMenu2: mes "The " + ((.state)?"^00DD00current":"^DD0000next") + "^000000 WoE session is: "; mes " "; mes "Day: ^0000DD" + .daysOfWeek$[.woe_day[.woe_index]]; mes "^000000Start time: ^00DD00" + .woe_0_str$[.woe_index]; mes "^000000End time: ^DD0000" + .woe_1_str$[.woe_index]; mes "^000000Region:"; set .@state_strs$, ".woe_state_str_" + .woe_state[.woe_index] + "$"; for(set .@i, 0; .@i < .num_regions; set .@i, .@i + 1) { set .@output$, getd(.@state_strs$ + "[" + .@i + "]"); if(.@output$ != "") mes "^000000- ^0000DD" + .@output$; } next; if(getgmlevel() >= .gm_access) select( "Warp to Castle Grounds", "View Castle Owners", "View all WoE times", ((!.state)?"Start next WoE":"End current WoE"), ((.state)?"":"Skip next WoE session") ); else select( "Warp to Castle Grounds", "View Castle Owners", "View all WoE times"); switch(@menu) { case 1: //warp mes "Which region would you like to warp to?"; next; select(.region_warp$[.woe_state[.woe_index]]); if(@menu < 1 || @menu > .num_regions) close; close2; warp .region_maps$[@menu - 1], .region_x[@menu - 1], .region_y[@menu - 1]; end; case 2: //view set .@woe_state_array$, ".woe_state_" + .woe_state[.woe_index]; for(set .@i, 0; .@i < .num_regions; set .@i, .@i + 1) { set .@k, 0; set .@castles$, ".castles_" + .regions$[.@i] + "$"; set .@castle_check, getd(.@woe_state_array$ + "[" + .@i + "]"); while(.@castle_check && .@k < .num_castles[.@i]) { if(.@castle_check & (1 << .@k)) { set .@map$, getd(.@castles$+"["+.@k+"]"); if (GetCastleData(.@map$,1)) { dispbottom "The [" + GetCastleName(.@map$) + "] castle of the [" + .region_names$[.@i] + "] region is currently held by the [" + GetGuildName(GetCastleData(.@map$,1)) + "] guild."; } else { dispbottom "The [" + GetCastleName(.@map$) + "] castle of the [" + .region_names$[.@i] + "] region is currently unoccupied."; } set .@castle_check, .@castle_check - (1 << .@k); } set .@k, .@k + 1; } } break; case 3: //woe times for(set .@i, 0; .@i < .num_woes; set .@i, .@i + 1) { dispbottom "- " + .daysOfWeek$[.woe_day[.@i]] + " " + .woe_0_str$[.@i] + "-" + .woe_1_str$[.@i]; set .@woe_state_str_array$, ".woe_state_str_" + .woe_state[.@i] + "$"; for(set .@k, 0; .@k < .num_regions; set .@k, .@k + 1) { set .@output$, getd(.@woe_state_str_array$ + "[" + .@k + "]"); if(.@output$ != "") dispbottom " " + .@output$; } } break; case 4: //start next; if(getgmlevel() <.gm_access) close; mes "^FF0000Are you sure you want to " + ((!.state)?"start the next WoE session?":"end the current WoE session?"); next; if(select("Yes:No") == 2) break; set .remainTime, 0; //might not work sometimes...you have like a 500ms window out of 505ms i guess.. sleep2 .timer_refresh_rate; //wait abit so the menu doesn't screw up (how long it takes for the timer to update) break; case 5: //skip next; if(getgmlevel() <.gm_access || .state) close; mes "^FF0000Are you sure you want to skip the next WoE session^000000"; next; if(select("Yes:No") == 2) break; if(.state) { //you really can't do this with woe active next; mes "Sorry, in the time you took making your decision, WoE started"; mes "Please either manually end it first or wait"; break; } set .woe_index, (.woe_index + 1) % .num_woes; donpcevent strnpcinfo(3)+"::OnUpdateCountTick"; sleep2 .timer_refresh_rate; break; default: close; } goto OnStartMenu2; OnInit: //-----------------------------------------------------------------------------------------// //CONFIG START // //-----------------------------------------------------------------------------------------// set .gm_access, 60; //WoE timings needs to be ordered ascendingly unless you want to do weird //stuff like skip a region every other week or so... //Also times can't overlap. Uses second of day(gettimetick(1)) for timing // eg 1am -> 3600, 2:30pm -> 52200, midnight -> 86400 (anything past that doesn't work) //Note: woe_0 is start times, woe_1 is end times. Ignore how it's called but // don't change it either since it's dynamically used // Also..woe has to end on the same day it starts (it's easier that way..) setarray .woe_day[0], 2, 4; setarray .woe_0[0], 68400,68400; setarray .woe_1[0], 72000,72000; setarray .woe_state[0], 0, 1; //WoE state settings. Every WoE session can be defined as a particular state of castle configuration. //.woe_state_#[%] = $ // # - state number // % - region number // $ - binary representation of castles that are active for that region in that state ( // (ie. 0 is no castles, 5 is castle 0 and 2 (2^0 + 2^2 = 5)) setarray .woe_state_0[0],4,0,0,0,0,0,0; setarray .woe_state_1[0],0,8,0,0,0,0,0; //Setting for if script handles WoE controller function. Disable agit_controller.txt if you are using this. //For if you want to use something else to handle your woe stuff but only this script //to show info (1 - on, 0 - off...duh) set .active_woe, 1; //WoE inactive on map notifier. Basically notifies player if the castle they are entering is //WoE active or not set .notify_woe, 1; //-----------------------------------------------------------------------------------------// //CONFIG END // //-----------------------------------------------------------------------------------------// //-----------------------------------------------------------------------------------------// //CONSTANTS START - Don't touch this unless you know what you are doing // //-----------------------------------------------------------------------------------------// //castle maps by region setarray .castles_prtg$[0],"prtg_cas01","prtg_cas02","prtg_cas03","prtg_cas04","prtg_cas05"; setarray .castles_payg$[0],"payg_cas01","payg_cas02","payg_cas03","payg_cas04","payg_cas05"; setarray .castles_gefg$[0],"gefg_cas01","gefg_cas02","gefg_cas03","gefg_cas04","gefg_cas05"; setarray .castles_aldeg$[0],"aldeg_cas01","aldeg_cas02","aldeg_cas03","aldeg_cas04","aldeg_cas05"; setarray .castles_arug$[0],"arug_cas01","arug_cas02","arug_cas03","arug_cas04","arug_cas05"; setarray .castles_schg$[0],"schg_cas01","schg_cas02","schg_cas03","schg_cas04","schg_cas05"; setarray .castles_novi$[0],"nguild_alde","nguild_gef","nguild_pay","nguild_prt"; //woe kill functions for each castle setarray .woe_kill_prtg$[0],"Agit#prtg_cas01::OnAgitEnd","Agit#prtg_cas02::OnAgitEnd","Agit#prtg_cas03::OnAgitEnd","Agit#prtg_cas04::OnAgitEnd","Agit#prtg_cas05::OnAgitEnd"; setarray .woe_kill_payg$[0],"Agit#payg_cas01::OnAgitEnd","Agit#payg_cas02::OnAgitEnd","Agit#payg_cas03::OnAgitEnd","Agit#payg_cas04::OnAgitEnd","Agit#payg_cas05::OnAgitEnd"; setarray .woe_kill_gefg$[0],"Agit#gefg_cas01::OnAgitEnd","Agit#gefg_cas02::OnAgitEnd","Agit#gefg_cas03::OnAgitEnd","Agit#gefg_cas04::OnAgitEnd","Agit#gefg_cas05::OnAgitEnd"; setarray .woe_kill_aldeg$[0],"Agit#aldeg_cas01::OnAgitEnd","Agit#aldeg_cas02::OnAgitEnd","Agit#aldeg_cas03::OnAgitEnd","Agit#aldeg_cas04::OnAgitEnd","Agit#aldeg_cas05::OnAgitEnd"; setarray .woe_kill_arug$[0],"Manager#aru01::OnAgitEnd2","Manager#aru02::OnAgitEnd2","Manager#aru03::OnAgitEnd2","Manager#aru04::OnAgitEnd2","Manager#aru05::OnAgitEnd2"; setarray .woe_kill_schg$[0],"Manager#sch01::OnAgitEnd2","Manager#sch02::OnAgitEnd2","Manager#sch03::OnAgitEnd2","Manager#sch04::OnAgitEnd2","Manager#sch05::OnAgitEnd2"; //region prefixs setarray .regions$[0],"prtg","payg","gefg","aldeg","arug","schg","novi"; //region info setarray .region_names$[0],"Prontera", "Payon", "Geffen", "Aldebaran", "Arunafeltz", "Schwarzwald", "Novice Castles"; setarray .region_maps$[0],"prt_gld", "pay_gld", "gef_fild13", "alde_gld", "aru_gld", "sch_gld", "prontera"; //coords to warp player to region (0 is random) setarray .region_x[0],0, 0, 0, 0, 0, 0, 148; setarray .region_y[0],0, 0, 0, 0, 0, 0, 163; setarray .waitMsg$[0], "WoE Starts: ", "WoE Ends: "; setarray .startMsg$[0], "WoE is Starting", "WoE is Ending"; set .ticks_in_day, 86400; //mmm...magic numbers setarray .daysOfWeek$[0], "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"; set .timer_refresh_rate, 500; //how many ms per timer refresh...keep less than 1000 (in milliseconds) set .change_state_sleep, 3000; //how long to show "WoE is Start|End-ing" msg for in ms. (in milliseconds) //Make sure WoE sessions are longer than this xD set .banner_refresh_rate, 10; //how many seconds per banner refresh...keep 1 or above (in seconds) //-----------------------------------------------------------------------------------------// //CONSTANTS END // //-----------------------------------------------------------------------------------------// set .num_regions, getarraysize(.regions$); set .num_woes, getarraysize(.woe_1); //force WoE to end if active callfunc "WoEToggler", 0; for(set .@i, 0; .@i < .num_regions; set .@i, .@i + 1) { //count num castles per region set .num_castles[.@i], getarraysize(getd(".castles_" + .regions$[.@i] + "$")); } //convert timestamps to readable format for(set .@i, 0; .@i < .num_woes; set .@i, .@i + 1) { set .@hrs, .woe_0[.@i] / 3600; set .@mins, .woe_0[.@i] % 3600 / 60; set .@output$, ((.@hrs % 12)?.@hrs%12:12) + ":" + ((.@mins < 10)?"0"+.@mins:.@mins) + " " + ((.@hrs > 12)?"PM":"AM"); set .woe_0_str$[.@i], .@output$; set .@hrs, .woe_1[.@i] / 3600; set .@mins, .woe_1[.@i] % 3600 / 60; set .@output$, ((.@hrs % 12)?.@hrs%12:12) + ":" + ((.@mins < 10)?"0"+.@mins:.@mins) + " " + ((.@hrs > 12)?"PM":"AM"); set .woe_1_str$[.@i], .@output$; } //calc number of woe states and consolidate states to create list of castles used set .num_states, 0; while(getarraysize(getd(".woe_state_" + (.num_states)))) { set .@state$, ".woe_state_" + .num_states; set .@i, 0; while(.@i < getarraysize(getd(.@state$))) { set .castleUsage[.@i], .castleUsage[.@i] | getd(.@state$ + "[" + .@i + "]"); set .@i, .@i + 1; } set .num_states, .num_states + 1; } for(set .@i, 0; .@i < .num_states; set .@i, .@i + 1) { set .@woe_state_array$, ".woe_state_" + .@i; for(set .@k, 0; .@k < .num_regions; set .@k, .@k + 1) { if(.castleUsage[.@k] > 0) { set .@castles$, ".castles_" + .regions$[.@k] + "$"; set .@castle_check, getd(.@woe_state_array$ + "[" + .@k + "]"); if(.@castle_check == 0) { //region not in this state //region warp menu string set .region_warp$[.@i], .region_warp$[.@i] + "^DD0000" + .region_names$[.@k] + "^000000:"; continue; } else { if(.@castle_check >= ((1 << .num_castles[.@k]) - 1)) { //includes all castles...just list as region. setd(".woe_state_str_" + .@i + "$[" + .@k + "]", .region_names$[.@k]); //region warp menu string set .region_warp$[.@i], .region_warp$[.@i] + "^00DD00" + .region_names$[.@k] + "^000000:"; } else { set .@j, 0; set .@output$, ""; while(.@j < .num_castles[.@k]) { if(.@castle_check & (1 << .@j)) { set .@output$, .@output$ + GetCastleName(getd(.@castles$+"["+.@j+"]")); set .@castle_check, .@castle_check - (1 << .@j); if(.@castle_check) { if(.@output$ != "") set .@output$, .@output$ + ", "; } else break; } set .@j, .@j + 1; } setd(".woe_state_str_" + .@i + "$[" + .@k + "]", .region_names$[.@k] + " ("+ .@output$ + ")"); //region warp menu string set .region_warp$[.@i], .region_warp$[.@i] + "^00DD00" + .region_names$[.@k] + " ("+ .@output$ + ")^000000:"; } } } else { set .region_warp$[.@i], .region_warp$[.@i] + ":"; } } } donpcevent strnpcinfo(3)+"::OnFindCurIndex"; donpcevent strnpcinfo(3)+"::OnUpdateCountTick"; if(.active_woe) { if(.notify_woe) { //set mapflag for all castle maps for(set .@i, 0; .@i < .num_regions; set .@i, .@i + 1) { set .@region_array$, ".castles_" + .regions$[.@i] + "$"; for(set .@k, 0; .@k < .num_castles[.@i]; set .@k, .@k + 1) { setmapflag getd(.@region_array$ + "[" + .@k + "]"), mf_loadevent; setd(".loadmap_region_" + getd(.@region_array$ + "[" + .@k + "]"), .@i + 1); setd(".loadmap_castleIndex_" + getd(.@region_array$ + "[" + .@k + "]"), .@k); } } } //activates WoE if needed donpcevent strnpcinfo(3)+"::OnDoWoE"; } //flag that init occured set .init, 1; OnWoETimer: //timer stuff while (1) { set .remainTime, .count_tick - gettimetick(2); set .bannerTimer, .remainTime - (.remainTime % .banner_refresh_rate) + .banner_refresh_rate; set .min, .bannerTimer / 60; set .sec, .bannerTimer - .min * 60; set .hr, .min / 60; set .min, .min - .hr * 60; set .roomMsg$, .waitMsg$[.state] + .hr + ":" + ((.min < 10 )?"0":"") + .min + ":" + ((.sec < 10 )?"0":"") + .sec; sleep .timer_refresh_rate; if(.remainTime <= 0) { if(.active_woe) { donpcevent strnpcinfo(3)+"::OnDoWoE"; } set .roomMsg$, .startMsg$[.state]; set .woe_index, (.woe_index + .state) % .num_woes; //go to next index if needed set .state, (.state + 1) % 2; //flip state donpcevent strnpcinfo(3)+"::OnUpdateCountTick"; sleep .change_state_sleep; } } end; //obligatory end =D OnUpdateCountTick: set .count_tick, getd(".woe_" + .state + "[" + .woe_index + "]"); set .count_tick, gettimetick(2) + .count_tick - gettimetick(1) + (.woe_day[.woe_index] - gettime(4) + 7) % 7 * .ticks_in_day; if(gettimetick(2) > .count_tick) set .count_tick, .count_tick + 7 * .ticks_in_day; end; OnFindCurIndex: set .@cur_day, gettime(4); set .@cur_tick, gettimetick(1); set .woe_index, 0; set .state, 0; for(set .@i, 0; .@i < .num_woes; set .@i, .@i + 1) { if(.woe_day[.@i] < .@cur_day) continue; if(.woe_day[.@i] == .@cur_day) { if(.woe_0[.@i] >= .@cur_tick) { set .woe_index, .@i; set .state, 0; break; } if(.woe_1[.@i] >= .@cur_tick) { set .woe_index, .@i; set .state, 1; break; } } if(.woe_day[.@i] > .@cur_day) { set .woe_index, .@i; set .state, 0; break; } } end; //On map notifier //Comment out OnPCLoadMapEvent label if .notify_woe is disabled to prevent unnecessary triggering OnPCLoadMapEvent: if(.state && .notify_woe) { getmapxy(.@map$, .@x, .@y, 0); set .@region, getd(".loadmap_region_" + .@map$) - 1; if(.@region >= 0) { set .@castleIndex, getd(".loadmap_castleIndex_" + .@map$); if(getd(".woe_state_" + .woe_state[.woe_index] + "[" + .@region + "]") & 1 << .@castleIndex) dispbottom "The [" + GetCastleName(.@map$) + "] castle is available for conquering during this WoE session"; else dispbottom "The [" + GetCastleName(.@map$) + "] castle is NOT available for conquering during this WoE session"; } } end; //------------------------------------------------------------------------------ // WoE Controller Stuff Here //------------------------------------------------------------------------------ OnDoWoE: if((.state == 0 && .init) || (.state == 1 && !agitcheck())) { //starting callfunc "WoEToggler", 1; //kills WoE in all castles that shouldn't have WoE set .@woe_state_array$, ".woe_state_" + .woe_state[.woe_index]; for(set .@i, 0; .@i < .num_regions; set .@i, .@i + 1) { set .@castles$, ".castles_" + .regions$[.@i] + "$"; set .@castle_check, getd(.@woe_state_array$ + "[" + .@i + "]"); for(set .@k, 0; .@k < .num_castles[.@i]; set .@k, .@k + 1) { set .@map$, getd(.@castles$+"["+.@k+"]"); if((.@castle_check & (1 << .@k)) == 0) { donpcevent getd(".woe_kill_" + .regions$[.@i] + "$[" + .@k + "]"); } } } announce "The War Of Emperium has begun!",bc_all; donpcevent strnpcinfo(3)+"::OnDisplayOwners"; } else { //ending if(agitcheck()) { callfunc "WoEToggler", 0; announce "The War Of Emperium is over!",bc_all; donpcevent strnpcinfo(3)+"::OnDisplayOwners"; } } end; OnDisplayOwners: //displays based on current region set .@woe_state_array$, ".woe_state_" + .woe_state[.woe_index]; for(set .@i, 0; .@i < .num_regions; set .@i, .@i + 1) { set .@k, 0; set .@castle_check, getd(.@woe_state_array$ + "[" + .@i + "]"); set .@castles$, ".castles_" + .regions$[.@i] + "$"; while(.@castle_check && .@k < .num_castles[.@i]) { if(.@castle_check & (1 << .@k)) { set .@map$, getd(.@castles$+"["+.@k+"]"); if (GetCastleData(.@map$,1)) { announce "The [" + GetCastleName(.@map$) + "] castle of the [" + .region_names$[.@i] + "] region is currently held by the [" + GetGuildName(GetCastleData(.@map$,1)) + "] guild.",bc_all; } else { announce "The [" + GetCastleName(.@map$) + "] castle of the [" + .region_names$[.@i] + "] region is currently unoccupied.",bc_all; } set .@castle_check, .@castle_check - (1 << .@k); } set .@k, .@k + 1; } } end;}prontera,163,194,4 script WoE Info 837,{ if(getwaitingroomstate(3, strnpcinfo(3)) == -1) donpcevent strnpcinfo(3)+"::OnInit"; doevent "WoEInfoBase::OnStartMenu"; end; OnInit: while (1) { //only updates if msg is different set .banner$, getwaitingroomstate(4, strnpcinfo(3)); if(getvariableofnpc(.roomMsg$, "WoEInfoBase") != .banner$) { delwaitingroom; waitingroom getvariableofnpc(.roomMsg$, "WoEInfoBase"), 0; } sleep 500; } end;}//zomg! it duplicates!!prontera,156,196,6 duplicate(WoE Info) WoE Info#2winfo 837//---------------------------------------------------------------------------------------------------------------------//These two functions handle WoE's activation/deactivation. Since stable does not have AgitStart2/AgitEnd2, //using the trunk version will result in catastrophic failure of the script. Double declaration of the following//functions fixes this (you will get warning messages though)function script WoEToggler { //<state> = 0|1 if(getarg(0)) { AgitStart; } else { AgitEnd; } return;}//if stable script will fail parsing this function, but the rest of the script will still be usablefunction script WoEToggler { //<state> = 0|1 if(getarg(0)) { AgitStart; AgitStart2; } else { AgitEnd; AgitEnd2; } return;}
  5. skipjack94

    Quest Item

    Hey i have script but in this script, default use SZeny, i want set SZeny set to 10 and Zeny set to 100.000.000 prontera,144,167,5 script Donasi 2 Quest 978,{doevent "Shop16::OnShop";end;}- shop quest_shop16 -1,501:50- script Shop16 -1,{OnShop: set @i,0; callshop "quest_shop16",1; npcshopattach "quest_shop16"; end;OnBuyItem: if(.BuildQuest) { for(set .e,0; !compare(getarg(.e+1),"Zeny"); set .e,.e+2) {} npcshopadditem "quest_shop16",getarg(.e+2),0; setarray .Shop[.i],getarg(.e+2); set .i,.i+1; goto Quest_Setup; } if(.Shop[@i]!=@bought_nameid) for(set @i,1; 1; set @i,@i+1) if(.Shop[@i]==@bought_nameid) { set .i,@i; callsub Quest_Setup; } for(set @i,1; !@e; set @i,@i+1) if(.Shop[@i]==@bought_nameid) { set @e,1; set .i,@i; callsub Quest_Setup; } mes "[Quest Npc]"; mes "I require the following:"; for(set @i,0; !compare(getarg(@i+1),"Zeny"); set @i,@i+2) mes "^FF0000" + ((countitem(getarg(@i))>=getarg(@i+1))? "^00FF00":"") + "" + getarg(@i+1) + " " + getitemname(getarg(@i)) + " [" + countitem(getarg(@i)) + "/" + getarg(@i+1) + "]"; if(getarg(@i)) mes "^FF0000" + ((Zeny>=getarg(@i))? "^00FF00":"") + "" + getarg(@i) + " Zeny"; mes "^000000In exchange, I will give you:^0000FF"; for(set @i,@i+2; getarg(@i); set @i,@i+2) mes getarg(@i+1) + " " + getitemname(getarg(@i)); switch(select("Exchange:" + (((((getiteminfo(@bought_nameid,5) & 1) || (getiteminfo(@bought_nameid,5) & 256) || (getiteminfo(@bought_nameid,5) & 512)) && @equip==0))? "Preview Item":"") + ":No thanks")) { case 1: for(set @i,0; !compare(getarg(@i+1),"Zeny"); set @i,@i+2) if(countitem(getarg(@i)) < getarg(@i+1)) { next; mes "You have " + countitem(getarg(@i)) + " " + getitemname(getarg(@i)) + ", while I require " + getarg(@i+1) + "."; mes "Please obtain ^FF0000" + (getarg(@i+1)-countitem(getarg(@i))) + " more " + getitemname(getarg(@i)) + "^000000."; close; } if(Zeny<getarg(@i)) { next; mes "You do not have enough Zeny."; mes "Please obtain ^FF0000" + (getarg(@i)-Zeny) + " more Zeny^000000."; close; } for(set @i,0; !compare(getarg(@i+1),"Zeny"); set @i,@i+2) delitem getarg(@i),getarg(@i+1); set Zeny,Zeny-getarg(@i); for(set @i,@i+2; getarg(@i); set @i,@i+2) getitem getarg(@i),getarg(@i+1); close; case 2: set @bottomview, getlook(3); set @topview, getlook(4); set @midview, getlook(5); addtimer 1000, strnpcinfo(3)+"::On_Leave"; set @equip,getiteminfo(@bought_nameid, 5); set @view, getiteminfo(@bought_nameid, 11); if(@equip != -1 && @view > 0) { if(@equip & 1) atcommand "@changelook 3 " + @view; if(@equip & 256) atcommand "@changelook 1 " + @view; if(@equip & 512) atcommand "@changelook 2 " + @view; } next; goto OnBuyItem; case 3: close; }On_Leave: atcommand "@changelook 1 " + @topview; atcommand "@changelook 2 " + @midview; atcommand "@changelook 3 " + @bottomview; set @equip,0; set @view,0; set @topview,0; set @midview,0; set @bottomview,0; end;OnInit: npcshopitem "quest_shop16",0,0; set .BuildQuest,1; set .i,1;Quest_Setup: switch(.i) { default: set .BuildQuest,0; set .e,0; set .i,0; end; case 1: callsub OnBuyItem,5254,5,1039,1000,2255,20,7539,750,550000000,"SZeny",22030,1,0; case 2: callsub OnBuyItem,741,5,4001,15,4033,15,5035,1,7539,750,250000000,"SZeny",22083,1,0; case 3: callsub OnBuyItem,948,1000,4340,10,4074,10,4216,10,4123,2,7539,750,200000000,"SZeny",22058,1,0; case 4: callsub OnBuyItem,4227,20,949,100,509,100,982,3,7539,750,200000000,"SZeny",22086,1,0; case 5: callsub OnBuyItem,5151,2,982,1,980,1,7539,750,50000000,"SZeny",21178,1,0; case 6: callsub OnBuyItem,4183,5,4082,5,4029,5,4023,5,920,100,7539,750,150000000,"SZeny",22110,1,0; }} Can someone tell me where i must add it
  6. error patskie . when i copy paste to my script. all of my spot script dissaprear.
  7. i so confused. i change it like this . but its not work . this is example : set .@rhea_ran,rand(1,9); if (.@rhea_ran == 1) { getitem 756,5,"announce"; } else if (.@rhea_ran == 2) { getitem 757,5,"announce"; } else if (.@rhea_ran == 3) { getitem 984,3,"announce"; } else if (.@rhea_ran == 4) { getitem 12411,1,"announce"; } else if (.@rhea_ran == 5) { getitem 12257,3,"announce"; } else if (.@rhea_ran == 6) { getitem 607,3,"announce"; } else if (.@rhea_ran == 7) { getitem 984,3,"announce"; } else if (.@rhea_ran == 8) { getitem 985,3,"announce"; } else {
  8. i want change my npc. who people get item with mapannounce , i want it change to announce all map. so what must i must change ? malaya,301,62,0 script School of Fish#1 844,{if (countitem(632) == 0) goto L_Tidak; if (isequipped(2764)) && (isequipped(2775)){ specialeffect2 EF_BUBBLE; set .@fcast,10; if (isequipped(2550)) { //Fisher's_Muffler set .@fcast,.@fcast - 3; } if (isequipped(2443)) { //Fish_Shoes set .@fcast,.@fcast - 2; } delitem 632,1; progressbar "ffffff",.@fcast; if (rand(1,100) == 1) { getitem 5403,1; specialeffect EF_BUBBLE; mapannounce "florian","" + strcharinfo(0) + " Mendapatkan Ikan !!!",bc_map,"0xff77ff"; end; } set .@rhea_ran,rand(1,9); if (.@rhea_ran == 1) { getitem 756,5; } else if (.@rhea_ran == 2) { getitem 757,5; } else if (.@rhea_ran == 3) { getitem 984,3; } else if (.@rhea_ran == 4) { getitem 12411,1; } else if (.@rhea_ran == 5) { getitem 12257,3; } else if (.@rhea_ran == 6) { getitem 607,3; } else if (.@rhea_ran == 7) { getitem 984,3; } else if (.@rhea_ran == 8) { getitem 985,3; } else { dispbottom "Tidak Mendapatkan apa-apa."; close; } if (rand(1,500) == 1) { getitem 7960,1,"announce"; } if (rand(1,600) == 1) { getitem 12103,1; //Old_Blue_Box mapannounce "florian","" + strcharinfo(0) + " Mendapatkan Bloody Dead Branch !!",bc_map,"0x00ffff"; } if (rand(1,600) == 1) { getitem 7272,1; //RBD mapannounce "florian","" + strcharinfo(0) + " Mendapatkan Rice Ball Doll !!",bc_map,"0x00ffff"; } if (rand(1,500) == 1) { getitem 12214,1; //Old_Blue_Box mapannounce "florian","" + strcharinfo(0) + " Mendapatkan Convex Mirror !!",bc_map,"0x00ffff"; } if (rand(1,500) == 1) { getitem 5317,1; //Old_Blue_Box mapannounce "florian","" + strcharinfo(0) + " Mendapatkan Fisherman Hat !!",bc_map,"0x00ffff"; } if (rand(1,50) == 1) { atcommand "@battleignore"; setoption 0x2,1; sc_start sc_berserk, 1000000000, 1; mes "[Fantastic Anti Bot]"; mes "Bot checking time"; mes "Please input the number you see"; next; switch( rand(1,9) ) { case 1: mes "#################^83F52C##^000000################"; mes "###############^83F52C####^000000################"; mes "#################^83F52C##^000000################"; mes "#################^83F52C##^000000################"; mes "#################^83F52C##^000000################"; mes "#################^83F52C##^000000################"; mes "###############^83F52C######^000000##############"; input @num; if(@num == 1) break; atcommand "@kick "+strcharinfo(0); end; case 2: mes "#############^83F52C#######^000000###############"; mes "############^83F52C##^000000#####^83F52C##^000000##############"; mes "###################^83F52C##^000000##############"; mes "#############^83F52C#######^000000###############"; mes "############^83F52C##^000000#####################"; mes "############^83F52C##^000000#####################"; mes "############^83F52C#########^000000##############"; input @num; if(@num == 2) break; atcommand "@kick "+strcharinfo(0); end; case 3: mes "#############^83F52C#######^000000###############"; mes "############^83F52C##^000000#####^83F52C##^000000##############"; mes "###################^83F52C##^000000##############"; mes "#############^83F52C#######^000000###############"; mes "###################^83F52C##^000000##############"; mes "############^83F52C##^000000#####^83F52C##^000000##############"; mes "#############^83F52C#######^000000###############"; input @num; if(@num == 3) break; atcommand "@kick "+strcharinfo(0); end; case 4: mes "############^83F52C##^000000#####################"; mes "############^83F52C##^000000####^83F52C##^000000###############"; mes "############^83F52C##^000000####^83F52C##^000000###############"; mes "############^83F52C##^000000####^83F52C##^000000###############"; mes "############^83F52C#########^000000##############"; mes "##################^83F52C##^000000###############"; mes "##################^83F52C##^000000###############"; input @num; if(@num == 4) break; atcommand "@kick "+strcharinfo(0); end; case 5: mes "############^83F52C########^000000###############"; mes "############^83F52C##^000000#####################"; mes "############^83F52C##^000000#####################"; mes "############^83F52C#######^000000################"; mes "##################^83F52C##^000000###############"; mes "############^83F52C##^000000####^83F52C##^000000###############"; mes "#############^83F52C######^000000################"; input @num; if(@num == 5) break; atcommand "@kick "+strcharinfo(0); end; case 6: mes "#############^83F52C#######^000000###############"; mes "############^83F52C##^000000#####^83F52C##^000000##############"; mes "############^83F52C##^000000#####################"; mes "############^83F52C########^000000###############"; mes "############^83F52C##^000000#####^83F52C##^000000##############"; mes "############^83F52C##^000000#####^83F52C##^000000##############"; mes "#############^83F52C######^000000################"; input @num; if(@num == 6) break; atcommand "@kick "+strcharinfo(0); end; case 7: mes "############^83F52C########^000000###############"; mes "############^83F52C##^000000####^83F52C##^000000###############"; mes "################^83F52C##^000000#################"; mes "###############^83F52C##^000000##################"; mes "###############^83F52C##^000000##################"; mes "###############^83F52C##^000000##################"; mes "###############^83F52C##^000000##################"; input @num; if(@num == 7) break; atcommand "@kick "+strcharinfo(0); end; case 8: mes "#############^83F52C#######^000000###############"; mes "############^83F52C##^000000#####^83F52C##^000000##############"; mes "############^83F52C##^000000#####^83F52C##^000000##############"; mes "#############^83F52C#######^000000###############"; mes "############^83F52C##^000000#####^83F52C##^000000##############"; mes "############^83F52C##^000000#####^83F52C##^000000##############"; mes "#############^83F52C#######^000000###############"; input @num; if(@num == 8) break; atcommand "@kick "+strcharinfo(0); end; case 9: mes "#############^83F52C#######^000000###############"; mes "############^83F52C##^000000#####^83F52C##^000000##############"; mes "############^83F52C##^000000#####^83F52C##^000000##############"; mes "#############^83F52C########^000000##############"; mes "###################^83F52C##^000000##############"; mes "############^83F52C##^000000#####^83F52C##^000000##############"; mes "#############^83F52C#######^000000###############"; input @num; if(@num == 9) break; atcommand "@kick "+strcharinfo(0); end; } next; mes "[Anti Bot]"; mes "Thank you for your patience, you can now move on."; atcommand "@battleignore"; setoption 0x2,0; sc_end sc_berserk; percentheal 100,100; set @kill,0; close; } end; } else { mes "Kamu tidak mempunyai/memakai perlengkapan memancing !"; close;L_Tidak:mes "Kamu tidak mempunyai umpan untuk memancing !";close; }}ayothaya,91,91,0 duplicate(School of Fish#1) Click Here#01 844ayothaya,74,118,0 duplicate(School of Fish#1) Click Here#02 844ayothaya,258,95,0 duplicate(School of Fish#1) Click Here#03 844dewata,218,68,0 duplicate(School of Fish#1) Click Here#04 844dewata,199,71,0 duplicate(School of Fish#1) Click Here#05 844ayothaya,258,100,0 duplicate(School of Fish#1) Click Here#06 844ayothaya,183,106,0 duplicate(School of Fish#1) Click Here#07 844dewata,185,75,0 duplicate(School of Fish#1) Click Here#08 844dewata,128,53,0 duplicate(School of Fish#1) Click Here#09 844dewata,143,68,0 duplicate(School of Fish#1) Click Here#10 844
  9. thanks mr parkie . i will test your help.
  10. Hello. May I to request your help ? i want make my disguise event be start every 2hours. and i confused. if i set to 15 round. that is no effect. this npc start with 10 round again. //===== Hercules Script ======================================//= Disguise Event//===== By: ==================================================//= GmOcean//===== Current Version: =====================================//= 5.1//===== Additional Comments: =================================//= Note: This script requires PCRE to run properly.//= 5.0 Last update by GmOcean.//= 5.1 Cleaned and standardized, mostly. [Euphy]//============================================================florian,147,152,4 script Disguise Event 4_M_NFDEADMAN,{ // Currently set to run every two hours. // To change times, edit the OnClock labels below. set .@GMLevel,60; // GM level required to access NPC. set .@n$,"[^0000FFDisguise NPC^000000]"; if (getgmlevel()>=.@GMLevel) { mes .@n$; mes "Select an option."; next; switch(select("Turn ON/OFF Event:Event Settings")) { case 1: mes .@n$; if (.EventON) { mes "The Event is currently: [^0000FFON^000000]"; mes "Would you like to turn it OFF?"; } else { mes "The Event is currently: [^FF0000OFF^000000]"; mes "Would you like to turn it ON?"; } if(select("Yes:No")==2) close; if (.EventON) { set .EventON,0; set .Timer,0; setnpctimer 0; stopnpctimer; announce "A GM has decided to turn the Disguise Event off. As a result no further prizes will be given.",bc_map | bc_blue; deletepset 1; setnpcdisplay "Disguise Event", 4_M_NFDEADMAN; close; } set .EventON,1; set .Timer,1; setnpctimer 0; initnpctimer; set .ResetCounter,.ResetCounter+1; announce "The Disguise Event will begin in 3 minutes.",bc_all | bc_blue; announce "The Event is being held in Prontera.",bc_all | bc_blue; close; case 2: mes .@n$; mes "Pick a setting to modify."; next; switch(select("Monster Display:Number of Rounds:Prize Settings")) { case 1: setarray .@r$[0],"Disguise as all monsters.","Disguise as MVPs only."; mes .@n$; mes "Choose a disguise rule."; next; set .Rule, select(implode(.@r$,":")); mes .@n$; mes "The Disguise Rule has been set:"; mes " > ^0055FF"+.@r$[.Rule-1]+"^000000"; close; case 2: mes .@n$; mes "Input the number of rounds you want the event to last."; mes "Current number: [^0000FF"+.Rounds+"^000000]"; next; input .@Rounds; set .Rounds,.@Rounds; mes .@n$; mes "The number of rounds has been changed to "+.Rounds+"."; close; case 3: mes .@n$; mes "Input the Item ID of the prize given each round."; mes "Current item: [^0000FF"+getitemname(.Prize)+"^000000] (ID #"+.Prize+")"; next; input .@Prize; mes .@n$; if (getitemname(.@Prize)=="" || getitemname(.@Prize)=="null") { mes "That item does not exist. Please try again."; close; } set .Prize,.@Prize; mes "Input the amount to be given."; next; input .@amount; mes .@n$; if (.@amount<=0 || .@amount>=10000) { mes "That amount is invalid. Using default ammount of 1."; set .@amount,1; next; mes .@n$; } set .PrizeAmt,.@amount; mes "The Prize has been changed successfully."; mes "Prize: "+.PrizeAmt+"x [^0000FF"+getitemname(.Prize)+"^000000]"; close; } } } if (.EventON) end; mes .@n$; mes "Welcome."; mes "How may I be of assistance?"; if(select("Information:Nothing, just passing through.")==2) close; next; mes .@n$; mes "This event is quite simple."; mes "At the start of the event, I will"; mes "disguise myself as a random"; mes "monster. You have to shout"; mes "that monter's name out loud."; next; mes "If you are correct, you will receive"; mes "a prize. If not, keep trying!"; mes "That's all that there is to this event."; close;OnInit: set .EventON,1; set .Wait,0; set .Winner,0; set .ResetCounter,0; set .Rounds,1; set .Prize,512; set .PrizeAmt,1; set .Rule,1; setarray .MVP[0], OSIRIS, BAPHOMET, DOPPELGANGER, MISTRESS, GOLDEN_BUG, ORK_HERO, DRAKE, EDDGA, MAYA, MOONLIGHT, PHARAOH, PHREEONI, ORC_LORD, KNIGHT_OF_WINDSTORM, GARM, DARK_LORD, TURTLE_GENERAL, LORD_OF_DEATH, DRACULA, EVENT_BAPHO, DARK_SNAKE_LORD, INCANTATION_SAMURAI, PORING_V, AMON_RA, TAO_GUNKA, RSX_0806, BACSOJIN_, B_SEYREN, B_EREMES, B_HARWORD, B_MAGALETA, B_SHECIL, B_KATRINN, B_YGNIZEM, APOCALIPS_H, LADY_TANEE, THANATOS, DETALE, KIEL_, RANDGRIS, GLOOMUNDERNIGHT, KTULLANUX, ATROCE, G_MAGALETA_, IFRIT, FALLINGBISHOP, BEELZEBUB_, GOPINICH, MOROCC_, KUBLIN, S_NYDHOG, BOITATA; if(checkre(0)){ setarray .MVP[getarraysize(.MVP)], QUEEN_SCARABA, LOST_DRAGON, LEAK, I_QUEEN_SCARABA; } set .Blacklist$, "1003,1006,1017,1021,1022,1027,1043,1075,1136,1137,1168," + "1171,1172,1173,1181,1187,1210,1217,1218,1222,1223,1224,1225,1226,1227,1228," + "1233,1284,1407,1411,1414,1495,1501,1900,1996,2000,2001,2002,2003,2004," + "2005,2006,2007,2011,2012,2025,2028,2029,2030,2031,2032,2033,2034,2035," + "2036,2037,2038,2039,2040,2041,2042,2043,2044,2045,2046,2047,2048,2049," + "2050,2051,2052,2053,2054,2055,2056,2057,2058,2059,2060,2061,2062,2063," + "2064,2065,2066,2067,2075,2076,2077,2078,2079,2080,2081,2083,2084,2085," + "2086,2087,2088,2089,2090,2091,2092,2093,2094,2095,2096,2097,2098,2099," + "2100,2101,2012,2103,2104,2105,2106,2107,2108,2109,2110,2111,2112,2113," + "2114,2115,2116,2117,2118,2119,2120,2121,2123,2124,2125,1496,"; end;OnClock0000:OnClock0100:OnClock0200:OnClock0300:OnClock0400:OnClock0500:OnClock0600:OnClock0700:OnClock0800:OnClock0900:OnClock1000:OnClock1100:OnClock1200:OnClock1300:OnClock1400:OnClock1500:OnClock1600:OnClock1700:OnClock1800:OnClock1900:OnClock2000:OnClock2100:OnClock2200: set .ResetCounter,.ResetCounter+1; set .EventON,1; set .Timer,1; set .Wait,1; announce "The Disguise Event will begin in 3 minutes.",bc_all | bc_blue; announce "The Event is being held in Prontera.",bc_all | bc_blue; setnpctimer 0; initnpctimer; end;OnTimer10000: if (.Timer || .Change) end; set .Wait,0; goto iDisguise; end;OnTimer30000: if (.Timer) end; set .Change,0; setnpcdisplay "Disguise Event", 4_M_NFDEADMAN; npctalk "You took too long to guess what I was. Please wait 10 seconds while I disguise again."; specialeffect 725; set $MonsterName$,""; deletepset 1; stopnpctimer; setnpctimer 0; initnpctimer; end;OnTimer60000: if (.Timer!=1) end; announce "The Disguise Event will begin in 2 minutes.",bc_all | bc_blue; announce "The Event is being held in Prontera.",bc_all | bc_blue; end;OnTimer120000: if (.Timer!=1) end; announce "The Disguise Event will begin 1 minute.",bc_all | bc_blue; announce "The Event is being held in Prontera.",bc_all | bc_blue; end;OnTimer180000: if (.Timer!=1) end; announce "The Disguise Event has begun!",bc_all | bc_blue; announce "The Event is being held in Prontera.",bc_all | bc_blue; set .Timer,0; stopnpctimer; setnpctimer 0; initnpctimer;iDisguise: if (.Rule==1) { set .Winner,0; set .@monster, rand(SCORPION, PINGUICULA); if (compare(","+.Blacklist$+"," , ","+.@monster+",")) goto iDisguise; if (.@monster==.LastMonster) goto iDisguise; set .LastMonster,.@monster; set $MonsterName$,getmonsterinfo(.@monster,0); } if (.Rule==2) { set .Winner,0; set .@monster, rand(getarraysize(.MVP)); set $MonsterName$,getmonsterinfo(.MVP[.@monster],0); } deletepset 1; defpattern 1,"([^:]+):.s*"+$MonsterName$+".*", "iCorrect"; activatepset 1; if (.Rule==1) setnpcdisplay "Disguise Event",.@monster; if (.Rule==2) setnpcdisplay "Disguise Event",.MVP[.@monster]; set .Change,1; setnpctimer 0; end;iCorrect: if (.Winner) { dispbottom "Someone has already won this round."; end; } set .Winner,1; set .RoundCount,.RoundCount+1; deletepset 1; activatepset 1; getitem .Prize,.PrizeAmt; announce strcharinfo(0)+" is correct! I was disguised as: "+$MonsterName$+"",bc_map | bc_blue; if (.RoundCount>=.Rounds) { setnpcdisplay "Disguise Event", 4_M_NFDEADMAN; set .RoundCount,0; set .Change,0; set .EventON,0; setnpctimer 0; stopnpctimer; npctalk "Thank you all for playing. That was the last round of the Disguise Event. Come play again later."; end; } setnpcdisplay "Disguise Event", 4_M_NFDEADMAN; set .Change,0; setnpctimer 0; end;}
  11. can anyone make me 1 simple script i think PVP warper 1. pvp warper all class can get in, with number of player on that map 2. pvp warper where just champion can in, with number of player on map 3. in top on NPC i want add some, like chat with text PVP Warper can some one help me?
  12. i try this way on wiki http://herc.ws/wiki/@go#Getting_.40go_to_Work but i cant find @go work on my atcommand.c i just find a Alternate spellings on atcommand.c where the number of town?
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.