-
Posts
272 -
Joined
-
Last visited
-
Days Won
3
Content Type
Profiles
Forums
Downloads
Jobs Available
Server Database
Third-Party Services
Top Guides
Store
Crowdfunding
Everything posted by Scofield
-
is there any way to edit the server when the player uses / w or @ who show a greater number of players online?
-
it worked .. npc gave no mistake, I will see if it will give the prize in the end we the script will just give the prize if the player is inside the castle?
-
eathena pre-renawal Gave the same error. I use Toasty WoE Controller's influences do not know if something //====================================================================================================== //= 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], 0, 3, 6; setarray .woe_0[0], 68400,68400,68400; setarray .woe_1[0], 72000,72000,72000; setarray .woe_state[0], 0, 1, 2; //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],1,0,0,0,0,0,0; setarray .woe_state_2[0],2,0,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_02::OnAgitEnd2","Manager#aru02_02::OnAgitEnd2","Manager#aru03_02::OnAgitEnd2","Manager#aru04_02::OnAgitEnd2","Manager#aru05_02::OnAgitEnd2"; setarray .woe_kill_schg$[0],"Manager#sch01_02::OnAgitEnd2","Manager#sch02_02::OnAgitEnd2","Manager#sch03_02::OnAgitEnd2","Manager#sch04_02::OnAgitEnd2","Manager#sch05_02::OnAgitEnd2"; setarray .woe_kill_novi$[0],"Agit_N01::OnAgitEnd","Agit_N02::OnAgitEnd","Agit_N03::OnAgitEnd","Agit_N04::OnAgitEnd"; //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; } cydonia,125,166,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!! cydonia,137,109,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 usable function script WoEToggler { //<state> = 0|1 if(getarg(0)) { AgitStart; AgitStart2; } else { AgitEnd; AgitEnd2; } return; } - script send -1,{ OnAgitEnd: OnAgitEnd2: switch(gettime(4)) { case 0: set .@guild_id, getcastledata("prtg_cas03",1); break; // Domingo case 2: set .@guild_id, getcastledata("prtg_cas01",1); break; // Quarta case 4: set .@guild_id, getcastledata("prtg_cas02",1); break; // Sábado default: end; } query_sql "SELECT `account_id` FROM `guild_member` WHERE `guild_id`='"+.@guild_id+"' AND `online`='1' ORDER BY `position` DESC LIMIT 76", .@account_id; query_sql "SELECT COUNT(1) FROM `char` WHERE `guild_id`='"+.@guild_id+"' AND `online`='1'", .@guild_count; for(set .@i, 0; .@i < .@guild_count; set .@i, .@i + 1) { if(attachrid(.@account_id[.@i])) { getitem 7539,15; announce "[Premiação]: A WoE terminou, o premio foi entregue a guild vencedora!",0; dispbottom "Você recebeu 15 Moedas Poring pela sua vitória na Guerra do Emperium."; detachrid; } end; }
-
just now I saw that it appeared on the console [Erro]: script error on npc/guild/agit_controller.txt line 562 parse_line: expect command, missing function name or calling undeclared function 557 : case 0: set .@guild_id, getcastledata("prtg_cas03",1); break; // Domingo 558 : case 2: set .@guild_id, getcastledata("prtg_cas01",1); break; // Quarta 559 : case 4: set .@guild_id, getcastledata("prtg_cas02",1); break; // Sábado 560 : default: end; 561 : } * 562 : '.'@nb = query_sql( "select account_id from `char` where guild_id = "+ .@gid +" and online = 1", .@aid ); 563 : for ( .@i = 0; .@i < .@nb; .@i++ ) { 564 : attachrid .@aid[.@i]; 565 : getitem 7539,15; 566 : announce "[Premiação]: A WoE terminou, o premio foi entregue a guild vencedora!",0; 567 : dispbottom "Você recebeu 15 Moedas Poring pela sua vitória na Guerra do Emperium.";
-
this message keeps appearing on my console wanted to know why [Alerta]: pc_bonus: unknown type 0 50 !
-
Good *-* Trx..
-
I have this npc making awards to players who win the guild castle at the end of woe, she's not doing more delivery of coins, I wonder what the problem is. - script send_cash -1,{ OnAgitEnd: switch(gettime(4)) { case 0: set .@guild_id, getcastledata("prtg_cas03",1); break; // Domingo case 2: set .@guild_id, getcastledata("prtg_cas01",1); break; // Quarta case 4: set .@guild_id, getcastledata("prtg_cas02",1); break; // Sábado } query_sql "SELECT `account_id` FROM `guild_member` WHERE `guild_id`='"+.@guild_id+"' AND `online`='1' ORDER BY `position` DESC LIMIT 76", .@account_id; query_sql "SELECT COUNT(1) FROM `char` WHERE `guild_id`='"+.@guild_id+"' AND `online`='1'", .@guild_count; for(set .@i, 0; .@i < .@guild_count; set .@i, .@i + 1) { if(attachrid(.@account_id[.@i])) { getitem 7539,15; dispbottom "Você recebeu 15 Moedas Poring pela sua vitória na Guerra do Emperium."; detachrid; } } end; }
-
I made the following change and now the race begins and ends perfectly, the npc poring announces the winner and they return to the place of departure, only that is not being announced the winner's name nor the awards: fixed: if ((.@y-1) == 31) { set $prace_winner$,"Metaling"; emotion 29; donpcevent "Bidder#prace0::OnStopRace"; }
-
awards WoE I have this script that makes awards winners of woe, WOE as mine are on different days and at different castles wish he did not do this and draw the prize to the winner. - script WoEPremio -1,{ OnInit: setarray .Map$[0],"prtg_cas01","prtg_cas02","prtg_cas03"; // -- Warp dos castelos que irão ser sorteados setarray .Map2$[0],"Kriemhild","Swanhild","Fadhgridh"; // -- Nome dos Mapas setarray .It[0],ID1,ID2,ID3; // -- ID dos Prêmios end; OnAgitStart: set .A,rand(getarraysize(.Map$)); set .B,rand(getarraysize(.Map$)); while(.B==.A){ set .B,rand(getarraysize(.Map$)); } set .C,rand(getarraysize(.Map$)); while(.C==.A || .C==.{ set .C,rand(getarraysize(.Map$)); } sleep2 1000; announce "O 1° prêmio ( "+getitemname(.IT[.A])+" ) será atribuído ao vencedor do castelo "+.Map2$[.A]+".",0; sleep2 1000; announce "O 2° prêmio ( "+getitemname(.IT[.B])+" ) será atribuído ao vencedor do castelo "+.Map2$[.B]+".",0; sleep2 1000; announce "O 3° Prêmio ( "+getitemname(.IT[.C])+" ) será atribuído ao vencedor do Castelo "+.Map2$[.C]+".",0; end; OnAgitEnd: for(set .@a,2000000; .@a<4000000; set .@a,.@a+1) { if(isloggedin(.@a)){ attachrid(.@a); if(getcastledata(.Map$[.A],1)==getcharid(2)) getitem .It[0],1; if(getcastledata(.Map$[.B],1)==getcharid(2)) getitem .It[1],1; if(getcastledata(.Map$[.C],1)==getcharid(2)) getitem .It[2],1; detachrid; } sleep 1; } end; }
-
I will send you the map.
-
Ok, my problem is that mainline map p_track01 the race takes place in the horizontal (x) and in my cydonia map it occurs in the vertical (y), then failing to make the adjustment because I'm not very good at scripter. ex: p_track01 <------ x Cydonia downw y Cydonia p_track01 the original script and the race line and X on my map and the Y line, I can not edit the script right.
-
I have this pvp system would add the option to put an arena without using donates, //|==================================================================================| //| ___ ___ ___ ___ ___ | //| /\ \ /\ \ /\ \ /| | /\ \ | //| |::\ \ /::\ \ /::\ \ |:| | /::\ \ | //| |:|:\ \ /:/\:\ \ /:/\:\ \ |:| | /:/\:\ \ | //| __|:|\:\ \ /:/ \:\ \ /:/ \:\ \ __|:| | /:/ /::\ \ | //| /::::|_\:\__\ /:/__/ \:\__\ /:/__/ \:\__\ /\ |:|__|____ /:/_/:/\:\__\ | //| \:\--\ \/__/ \:\ \ /:/ / \:\ \ /:/ / \:\/:::::/__/ \:\/:/ \/__/ | //| \:\ \ \:\ /:/ / \:\ /:/ / \::/__/ \::/__/ | //| \:\ \ \:\/:/ / \:\/:/ / \:\ \ \:\ \ | //| \:\__\ \::/ / \::/ / \:\__\ \:\__\ | //| \/__/ \/__/ \/__/ \/__/ \/__/ | //| ================================================================================ | //| Script Desenvolvido Por Mooka | eAthena | Por Favor, Não Retire Os Créditos. | //| ================================================================================ | //| Observação! O MapFlag Está No Final Do Script ! | //| ================================================================================ | //|[v1.3.0]: Nova Função de Múltiplas linguagens. (Mooka) | //| ------ | //| v1.2.9 : Nova Tabela! (PM_Lang) (Mooka) | //| v1.2.8 : Alteração na função !exit. (Mooka) | //| v1.2.7 : Adicionado balão de Chat no npc. (Mooka) | //| v1.2.6 : Nova opção! Ganhando experiência no PvP! (Mooka) | //| v1.2.5 : Adicionado !map#list. (Mooka) | //| v1.2.4 : Mapflags são definidos automaticamente. (Mooka) | //| v1.2.3 : Novo campo na tabela 'pvpm_map'. (noguild) (Mooka) | //| v1.2.2 : Alteração na função "Changeleader". (Mooka) | //| v1.2.1 : Implementada opção para WoE. (Contagem de pontos na WoE) (Mooka) | //| v1.2.0 : Novo comando remoto. (!map) (Mooka) | //| ------ | //| v1.1.9 : Comandos !pvp\!gvg\!baby mergidos no novo comando !warp. (Mooka) | //| v1.1.8 : Reformulado Sistema das Arenas. (Mooka) | //| v1.1.7 : Nova tabela no PvP Master. (pvpm_map) (Mooka) | //| v1.1.6 : Ranking não mostra mais valores com 0. (Mooka) | //| v1.1.5 : Novos comandos remotos. (!ban;!truncate) (Mooka) | //| v1.1.4 : Adicionado opção de Ranking Ratio aos Menus e CMD Remotos. (Mooka) | //| v1.1.3 : Otimizado IF's dos comandos remotos. (Mooka) | //| v1.1.2 : Desenvolvida nova opção de Ranking. (Ratio) (Mooka) | //| v1.1.1 : Alteração na tabela pvpm_data. (Adicionado campo 'ratio') (Mooka) | //| v1.1.0 : Novo comando remoto. (!help) (Mooka) | //| ------ | //| v1.0.9 : Adicionado duplicações do npc em todas as cidades. (Mooka) | //| v1.0.8 : Adicionada opção para retirar buffs. (Mooka) | //| v1.0.7 : Correção na função Ranking2. (Mooka) | //| v1.0.6 : Correção no comando !exit. (Mooka) | //| v1.0.5 : Correção no bug de enviar o som "end" causando erro. (Mooka) | //| v1.0.4 : Implementado Sons do Unreal Tournament. (Mooka) | //| v1.0.3 : Adicionado novo tipo de contagem de Pontos com Announce. (Mooka) | //| v1.0.2 : Adicionada opção para servidores PK. (Mooka) | //| v1.0.1 : Adicionado PvP Baby. (Mooka) | //| v1.0.0 : Desenvolvida Versão. (Mooka) | //| ================================================================================ | //| Table update (v1.3.0+): | //| DROP TABLE IF EXISTS `pvpm_lang`; | //| CREATE TABLE `pvpm_lang` ( | //| `id` int(11) unsigned NOT NULL default '0', | //| `lang` int(11) unsigned NOT NULL default '0', | //| `str` varchar(255) NOT NULL default '', | //| KEY `id` (`id`) | //| ) TYPE=MyISAM; | //| -------------------------------------------------------------------------------- | //| Table update (v1.2.3+): | //| alter table pvpm_map add noguild int(11) not null default '0'; | //| update pvpm_map set noguild=1 where map='guild_vs1'; | //| -------------------------------------------------------------------------------- | //| Table update (v1.1.7+): | //| DROP TABLE IF EXISTS `pvpm_map`; | //| CREATE TABLE `pvpm_map` ( | //| `id` int(11) unsigned NOT NULL default '0', | //| `map` varchar(255) NOT NULL default 'NULL', | //| `type` int(11) unsigned NOT NULL default '0', | //| KEY `id` (`id`) | //| ) TYPE=MyISAM; | //| insert into pvpm_map (id,map,type) values (0,'guild_vs3',0); | //| insert into pvpm_map (id,map,type) values (1,'pvp_n_1-5',0); | //| insert into pvpm_map (id,map,type) values (2,'guild_vs1',2); | //| insert into pvpm_map (id,map,type) values (3,'prt_are01',2); | //| insert into pvpm_map (id,map,type) values (4,'guild_vs2',1); | //| -------------------------------------------------------------------------------- | //| Table update (v1.1.1+): | //| alter table pvpm_data add ratio int(11) not null default '0' after dies | //| -------------------------------------------------------------------------------- | //| Table update (v1.0.0+): | //| DROP TABLE IF EXISTS `pvpm_data`; | //| CREATE TABLE `pvpm_data` ( | //| `id` int(11) unsigned NOT NULL default '0', | //| `name` varchar(255) NOT NULL default '', | //| `kills` int(11) unsigned NOT NULL default '0', | //| `dies` int(11) unsigned NOT NULL default '0', | //| `leader` int(11) unsigned NOT NULL default '0', | //| `annc` int(11) unsigned NOT NULL default '0', | //| `ban` int(11) unsigned NOT NULL default '0', | //| `type` int(11) unsigned NOT NULL default '0', | //| KEY `id` (`id`), | //| KEY `kills` (`kills`), | //| KEY `dies` (`dies`) | //| ) TYPE=MyISAM; | //| | //| ================================================================================ | - script init_PM -1,{ // | //| | //| -------------------------------------------------------------------------------- | //| |!Aviso importante sobre as configurações! | | //| |O Sistema de Arena terá problemas caso passe de 10 mapas na lista. | | //| |É possível alterar este limite editando o script, caso queira fale comigo. | | //| -------------------------------------------------------------------------------- | //| | OnInit: // | //| Configurações: | //| | //|=> Nome do npc na janela. | set $@pvpm_name$,"[ ^FF0000 Arena ^000000 ]"; // | //| | //|=> Deseja usar o Ranking Ratio como principal? [ 1 = Sim ] | //|---> Nota: Ranking Ratio: Pontuação = Kills - Mortes | set $@mainRanking,1; // | //| | //|=> Até onde o Ranking irá mostrar. [ Máximo 127 ] | set $@showsRankUntil,25; // | //| | //|=> Modo PK. Está configurado para alterar automaticamente, mude se necessário. | set $@PK_Mode,getbattleflag("pk_mode"); // | //| | //|=> Deseja que ao player entrar no pvp perca os buff? [ 1 = Sim] | set $@breakBuffs,0; // | //| | //|=> Quando o player matar o outro, deve ganhar experiência? | //|---> Nota 1: Servidores de rates alta, configure o "quest_exp_rate". (exp.conf) | //|---> Nota 2: $@lostEXP: Quantidade de EXP perdida ao morrer. ( 0 = Desativado ) | //|---> Nota 3: Configuração do comando: | //|--> 0 : Desativado. | //|--> 1 : Ativado usando fórmula de EXP. ($@getEXP*KilledLVL/KillerLVL) | //|--> 2 : Ativado, o player sempre irá ganhar a quantia definida no $@getEXP. | set $@getEXPoption,1; // | set $@getEXP,115; // 0,1% no level 50. | set $@lostEXP,0; // | //| | //|=> Deseja ativar a contagem de pontos nos mapas da WoE? | //|---> Nota 1: Não são enviandos sons/broadcast nos mapas da WoE. | //|---> Nota 2: Opções de contagem. | //|--> 0: Desativado. | //|--> 1: Ativar contagem somente do PvP. | //|--> 2: Ativar contagem somente do GvG. | //|--> 3: Ativar ambos. | set $@CountPointsInWoE,3; // | //| | //|=> Configuração do Som e Announce! | //|---> Nota 1: Os sons devem ser colocados na pasta data/wav em formato .wav | //|---> Nota 2: Se desativar o som do UT, desativará o broadcast dele também.(2) | //|--> 0 : Desativar Todas Opções. | //|--> 1 : Ativar somente broadcast Global. | //|--> 2 : Ativar somente sons/broadcast do Unreal Tournament. | //|--> 3 : Ativar Ambos. | set $@sound,3; // | //| | //|=> Lista com o nomes dos Sons Unreal Tournament. | //|---> Nota 1: $@SoundList$[Pontos em que irá tocar o som(Max. 127)],"Nome do Som"; | //|---> Nota 2: A partir do ultimo, será somado 10 e repetirá o som, o set | //|---> com "end" indica que o ultimo som será repetido dali em diante. | //|---> Nota 3: O nome do arquivo é o mesmo que será exibido no announce. | set $@SoundList$[1],"First Blood"; // | set $@SoundList$[2],"Double Kill"; // | set $@SoundList$[3],"Triple Kill"; // | set $@SoundList$[5],"Mega Kill"; // | set $@SoundList$[10],"Ultra Kill"; // | set $@SoundList$[15],"Killing Spree"; // | set $@SoundList$[20],"Ownage"; // | set $@SoundList$[25],"Holy Shit"; // | set $@SoundList$[30],"God Like"; // | set $@SoundList$[35],"Dominating"; // | set $@SoundList$[40],"Unstoppable"; // | set $@SoundList$[50],"Monster Kill"; // | set $@SoundList$[51],"end"; // | //|==================================================================================| query_sql("select name from pvpm_data where leader=1 and type=0 limit 1",$@Player_Lider$); query_sql("select name from pvpm_data where leader=1 and type=2 limit 1",$@Guild_Lider$); query_sql("select lang from pvpm_lang where lang=0 and lang=1",.@checkDefaultLang); if(!.@checkDefaultLang && .@checkDefaultLang[1]) { debugmes "[PvP Master Ultimate] NO DEFAULT LANGUAGE(LANG0)! LANG1 WAS SET AS DEFAULT!"; query_sql("update pvpm_lang set lang=lang-1"); } query_sql("select count(lang) from pvpm_lang where id=0",.@c); if(!.@c) debugmes "[PvP Master Ultimate] NO LANGUAGE DATA!"; for(set .@i,0;.@i<.@c;set .@i,.@i+1) { deletearray .@str$,82; query_sql("select str from pvpm_lang where lang="+.@i,.@str$); for(set .@y,0;.@y<82;set .@y,.@y+1) setd "$@PM_Lang"+.@i+"$["+.@y+"]",.@str$[.@y]; } OnReloadListMap: deletearray $@IDPM,10; deletearray $@mapPM$,10; deletearray $@MapTypePM,10; deletearray $@menu$,10; query_sql("select * from pvpm_map order by id asc limit 10",$@IDPM,$@mapPM$,$@MapTypePM,$@mfPM); setarray $@TypeArena$[0],"^CD5C5C<PvP>","^FF4500<PvP Baby>","^8B5742<GvG>","^0047AB<Evento>"; for(set .@j,0;.@j<=(getarraysize($@mapPM$)-1);set .@j,.@j+1) { set $@menu$[.@j],"^000000- Arena "+(.@j+1)+" "+$@TypeArena$[$@MapTypePM[.@j]]; setmapflag $@mapPM$[.@j],mf_noreturn; setmapflag $@mapPM$[.@j],mf_nosave; setmapflag $@mapPM$[.@j],mf_noteleport; setmapflag $@mapPM$[.@j],mf_nowarpto; setmapflag $@mapPM$[.@j],mf_nowarp; setmapflag $@mapPM$[.@j],mf_nomemo; setmapflag $@mapPM$[.@j],mf_nopenalty; setmapflag $@mapPM$[.@j],mf_nobranch; if(!$@MapTypePM[.@j] && !$@mfPM[.@j]) setmapflag $@mapPM$[.@j],mf_pvp; else if(!$@MapTypePM[.@j]) setmapflag $@mapPM$[.@j],mf_pvp_noguild; if($@MapTypePM[.@j]==2) setmapflag $@mapPM$[.@j],mf_gvg; } } - script PM_source -1,{ while(1) { mes $@pvpm_name$; mes callfunc("getMesPM",1); mes callfunc("getMesPM",2); mes callfunc("getMesPM",3); mes "^008B8B< PvP "+callfunc("getMesPM",4)+" - ^FFA500"+$@Player_Lider$+"^008B8B >"; mes "^008B8B< GvG "+callfunc("getMesPM",4)+" - ^FFA500"+$@Guild_Lider$+"^008B8B >"; switch(select("^FFA500- "+callfunc("getMesPM",5)+"^000000:- Ranking:- "+callfunc("getMesPM",6)+":- "+callfunc("getMesPM",7)+":- "+callfunc("getMesPM",79))) { case 1: for(set @i,0;@i<=(getarraysize($@IDPM)-1);set @i,@i+1) set @m$[@i]," ^0000FF["+getmapusers($@mapPM$[@i])+"]"; switch(getarraysize($@IDPM)) { case 1: callfunc("pvpm_func","Warp",1,select($@menu$[0]+@m$[0])); case 2: callfunc("pvpm_func","Warp",1,select($@menu$[0]+@m$[0],$@menu$[1]+@m$[1])); case 3: callfunc("pvpm_func","Warp",1,select($@menu$[0]+@m$[0],$@menu$[1]+@m$[1],$@menu$[2]+@m$[2])); case 4: callfunc("pvpm_func","Warp",1,select($@menu$[0]+@m$[0],$@menu$[1]+@m$[1],$@menu$[2]+@m$[2],$@menu$[3]+@m$[3])); case 5: callfunc("pvpm_func","Warp",1,select($@menu$[0]+@m$[0],$@menu$[1]+@m$[1],$@menu$[2]+@m$[2],$@menu$[3]+@m$[3],$@menu$[4]+@m$[4])); case 6: callfunc("pvpm_func","Warp",1,select($@menu$[0]+@m$[0],$@menu$[1]+@m$[1],$@menu$[2]+@m$[2],$@menu$[3]+@m$[3],$@menu$[4]+@m$[4],$@menu$[5]+@m$[5])); case 7: callfunc("pvpm_func","Warp",1,select($@menu$[0]+@m$[0],$@menu$[1]+@m$[1],$@menu$[2]+@m$[2],$@menu$[3]+@m$[3],$@menu$[4]+@m$[4],$@menu$[5]+@m$[5],$@menu$[6]+@m$[6])); case 8: callfunc("pvpm_func","Warp",1,select($@menu$[0]+@m$[0],$@menu$[1]+@m$[1],$@menu$[2]+@m$[2],$@menu$[3]+@m$[3],$@menu$[4]+@m$[4],$@menu$[5]+@m$[5],$@menu$[6]+@m$[6],$@menu$[7]+@m$[7])); case 9: callfunc("pvpm_func","Warp",1,select($@menu$[0]+@m$[0],$@menu$[1]+@m$[1],$@menu$[2]+@m$[2],$@menu$[3]+@m$[3],$@menu$[4]+@m$[4],$@menu$[5]+@m$[5],$@menu$[6]+@m$[6],$@menu$[7]+@m$[7],$@menu$[8]+@m$[8])); case 10: callfunc("pvpm_func","Warp",1,select($@menu$[0]+@m$[0],$@menu$[1]+@m$[1],$@menu$[2]+@m$[2],$@menu$[3]+@m$[3],$@menu$[4]+@m$[4],$@menu$[5]+@m$[5],$@menu$[6]+@m$[6],$@menu$[7]+@m$[7],$@menu$[8]+@m$[8],$@menu$[9]+@m$[9])); } mes "** ERROR ** CHECK THE pm_map TABLE"; close; case 2: switch(select("- PvP:- PvP "+callfunc("getMesPM",8)+":- PvP (Ratio):- GvG:- GvG "+callfunc("getMesPM",8)+":- GvG (Ratio):- "+callfunc("getMesPM",9))) { case 1: callfunc "pvpm_func","Ranking1","kills",0,"PvP"; next; continue; case 2: callfunc "pvpm_func","Ranking1","dies",0,"PvP (Mortes)"; next; continue; case 3: callfunc "pvpm_func","Ranking1","ratio",0,"PvP (Ratio)"; next; continue; case 4: callfunc "pvpm_func","Ranking1","kills",2,"GvG"; next; continue; case 5: callfunc "pvpm_func","Ranking1","dies",2,"GvG (Mortes)"; next; continue; case 6: callfunc "pvpm_func","Ranking1","ratio",2,"GvG (Ratio)"; next; continue; case 7: switch(select("- "+callfunc("getMesPM",9)+" PvP:- "+callfunc("getMesPM",9)+" PvP "+callfunc("getMesPM",8)+":- "+callfunc("getMesPM",9)+" PvP (Ratio):- "+callfunc("getMesPM",9)+" GvG:- "+callfunc("getMesPM",9)+" GvG "+callfunc("getMesPM",8)+":- "+callfunc("getMesPM",9)+" GvG (Ratio)")) { case 1: callfunc "pvpm_func","Ranking2","kills",0; next; continue; case 2: callfunc "pvpm_func","Ranking2","dies",0; next; continue; case 3: callfunc "pvpm_func","Ranking2","ratio",0; next; continue; case 4: callfunc "pvpm_func","Ranking2","kills",2; next; continue; case 5: callfunc "pvpm_func","Ranking2","dies",2; next; continue; case 6: callfunc "pvpm_func","Ranking2","ratio",2; next; continue; } } case 3: next; mes $@pvpm_name$; mes callfunc("getMesPM",10); mes callfunc("getMesPM",11); mes callfunc("getMesPM",12); next; continue; case 4: close; case 5: next; mes $@pvpm_name$; mes callfunc("getMesPM",80); query_sql("select str from pvpm_lang where id=0",@lang$); for(set @a,0;@a<getarraysize(@lang$);set @a,@a+1) mes @a+" = "+@lang$[@a]; input @inp; if(@inp < 0 || @inp > (getarraysize(@lang$)-1)) { mes callfunc("getMesPM",81); next; continue; } set PM_Lang,@inp; next; continue; } } OnInit: waitingroom "",0; OnTimer5000: setarray .@RoomDisplay$,"[PvP] Arena","PvP "+$@PM_Lang0$[4]+" ["+$@Player_Lider$+"]","GvG "+$@PM_Lang0$[4]+" ["+$@Guild_Lider$+"]"; delwaitingroom; waitingroom .@RoomDisplay$[rand(0,2)],0; initnpctimer; } - script cmd -1,{ OnWhisperGlobal: if(compare(@whispervar0$,"!warp")) { set @ArenaID,@whispervar1$; if(!@ArenaID) { dispbottom callfunc("getMesPM",13); end; } callfunc("pvpm_func","Warp",0,@ArenaID); } if(compare(@whispervar0$,"!ranking")) { if(compare(@whispervar0$,"2")) { if(compare(@whispervar1$,"pvp")) { if(compare(@whispervar2$,"ratio")) { callfunc "pvpm_func","Ranking2","ratio",0,"Ratio"; end; } if(!compare(@whispervar2$,"die")) callfunc "pvpm_func","Ranking2","kills",0; else callfunc "pvpm_func","Ranking2","dies",0; end; } if(compare(@whispervar1$,"gvg")) { if(compare(@whispervar2$,"ratio")) { callfunc "pvpm_func","Ranking2","ratio",2,"Ratio"; end; } if(!compare(@whispervar2$,"die")) callfunc "pvpm_func","Ranking2","kills",2; else callfunc "pvpm_func","Ranking2","dies",2; end; } } if(compare(@whispervar1$,"pvp")) { if(compare(@whispervar2$,"ratio")) { callfunc "pvpm_func","Ranking1","ratio",0,"Ratio"; end; } if(!compare(@whispervar2$,"die")) callfunc "pvpm_func","Ranking1","kills",0,"PvP"; else callfunc "pvpm_func","Ranking1","dies",0,"PvP ( Mortes )"; end; } if(compare(@whispervar1$,"gvg")) { if(compare(@whispervar2$,"ratio")) { callfunc "pvpm_func","Ranking1","ratio",2,"Ratio"; end; } if(!compare(@whispervar2$,"die")) callfunc "pvpm_func","Ranking1","kills",2,"GvG"; else callfunc "pvpm_func","Ranking1","dies",2,"GvG"; end; } } if ( compare(@whispervar0$,"!exit") ) { getmapxy(@map$,@x,@y,0); for(set @i,0;@i!=getarraysize($@mapPM$);set @i,@i+1) { if (@map$ != $@mapPM$[@i]) continue; dispbottom callfunc("getMesPM",14); sleep2 5000; warp getsavepoint(0),getsavepoint(1),getsavepoint(2); end; } dispbottom callfunc("getMesPM",15); end; } if (compare(@whispervar0$,"lider")) { if(compare(@whispervar0$,"pvp")) dispbottom "PvP "+callfunc("getMesPM",4)+": "+$@Player_Lider$; else dispbottom "GvG "+callfunc("getMesPM",4)+": "+$@Guild_Lider$; end; } if(compare(@whispervar0$,"!truncate") && getgmlevel()>=70) { if(compare(@whispervar1$,"pvp")) { query_sql("delete from pvpm_data where type=0"); dispbottom callfunc("getMesPM",16); end; } if(compare(@whispervar1$,"gvg")) { query_sql("delete from pvpm_data where type=2"); dispbottom callfunc("getMesPM",16); end; } dispbottom callfunc("getMesPM",17); } if (compare(@whispervar0$,"!ban")) { if(@whispervar1$=="") { dispbottom callfunc("getMesPM",18); end; } if(@whispervar2$=="") { dispbottom callfunc("getMesPM",19); end; } if(@whispervar3$=="") { dispbottom callfunc("getMesPM",20); end; } if(@whispervar2$=="showtime") { query_sql("select ban from pvpm_data where name='"+@whispervar1$+"' limit 1",@showtime); dispbottom callfunc("getMesPM",21)+" ["+@whispervar1$+"] ["+@showtime+" "+callfunc("getMesPM",27)+"]"; end; } if(@whispervar2$=="unban") { query_sql("update pvpm_data set ban=0 where name='"+@whispervar1$+"' limit 1"); dispbottom callfunc("getMesPM",22)+@whispervar1$; message @whispervar1$,callfunc("getMesPM",23); end; } set @time,@whispervar2$; if(@time==0 && @whispervar2$!="unban" || @time==0 && @whispervar2$!="showtime") { dispbottom callfunc("getMesPM",24); end; } set @id,0; query_sql("select id from pvpm_data where name='"+@whispervar1$+"' and type="+@whispervar3$,@id); if(!@id && @whispervar3$=="0" || !@id && @whispervar3$=="2") { dispbottom callfunc("getMesPM",25); end; } set @bantime,0; if(compare(@whispervar2$,"-")) query_sql("update pvpm_data set ban=ban"+@time+" where id="+@id+" limit 1"); else query_sql("update pvpm_data set ban=ban+"+@time+" where id="+@id+" limit 1"); query_sql("select ban from pvpm_data where id="+@id+" limit 1",@bantime); dispbottom callfunc("getMesPM",26)+" ("+@bantime+" "+callfunc("getMesPM",27)+")"; message @whispervar1$,callfunc("getMesPM",28)+" "+@bantime+" "+callfunc("getMesPM",27)+"."; warpchar "prontera",150,150,getcharid(0,@whispervar1$); end; } if (compare(@whispervar0$,"!map") && getgmlevel()>=70) { if (compare(@whispervar1$,"add")) { if(getarraysize($@IDPM)>=10) { dispbottom callfunc("getMesPM",29); dispbottom callfunc("getMesPM",30); end; } set @type,@whispervar3$; if(!@type && @whispervar3$==""||@type>2) { dispbottom callfunc("getMesPM",31); dispbottom callfunc("getMesPM",32); dispbottom callfunc("getMesPM",33); end; } set @mapcheck$,""; query_sql("select map from pvpm_map where map='"+@whispervar2$+"' limit 1",@mapcheck$); if(@mapcheck$!="") { dispbottom callfunc("getMesPM",34); end; } query_sql("insert into `pvpm_map` (id,map,type) values ("+(getarraysize($@IDPM)-1)+",'"+@whispervar2$+"',"+@type+")"); dispbottom callfunc("getMesPM",35)+" ("+@whispervar2$+")"; doevent "init_PM::OnReloadListMap"; } if (compare(@whispervar1$,"del")) { if(getarraysize($@IDPM)<=1) { dispbottom callfunc("getMesPM",36); end; } query_sql("select map from pvpm_map where map='"+@whispervar2$+"'",@mapcheck$); if(@mapcheck$=="") { dispbottom callfunc("getMesPM",37); end; } query_sql("delete from pvpm_map where map='"+@whispervar2$+"'"); dispbottom callfunc("getMesPM",38)+" ("+@whispervar2$+")"; doevent "init_PM::OnReloadListMap"; } if (compare(@whispervar1$,"list")) { for(set @i,0;@i<=(getarraysize($@IDPM)-1);set @i,@i+1) dispbottom "["+(@i+1)+"] "+$@mapPM$[@i]; end; } end; } if (compare(@whispervar0$,"!help")) { if(compare(@whispervar1$,"!warp")) { dispbottom callfunc("getMesPM",39); dispbottom callfunc("getMesPM",40); dispbottom "- !warp#1;!warp#2;...!warp#5 .."; dispbottom callfunc("getMesPM",41); end; } if(compare(@whispervar1$,"!ranking")) { dispbottom callfunc("getMesPM",39); dispbottom callfunc("getMesPM",42); dispbottom "- !ranking#pvp;!ranking#pvp#die;!ranking#gvg;!ranking#gvg#die;!ranking#ratio"; dispbottom "- !ranking2#pvp;!ranking2#pvp#die;!ranking2#gvg;!ranking2#gvg#die;!ranking2#ratio; (Mostra somente sua posição)"; dispbottom callfunc("getMesPM",43);; end; } if(compare(@whispervar1$,"!pvplider") || compare(@whispervar1$,"!gvglider")) { dispbottom callfunc("getMesPM",39); dispbottom callfunc("getMesPM",44);; end; } if(compare(@whispervar1$,"!exit")) { dispbottom callfunc("getMesPM",39); dispbottom callfunc("getMesPM",45); end; } if(compare(@whispervar1$,"!ban") && getgmlevel()>=70) { dispbottom callfunc("getMesPM",39); dispbottom callfunc("getMesPM",46); dispbottom callfunc("getMesPM",47); dispbottom callfunc("getMesPM",48); dispbottom callfunc("getMesPM",49); dispbottom callfunc("getMesPM",50); end; } if(compare(@whispervar1$,"!map") && getgmlevel()>=70) { dispbottom callfunc("getMesPM",39); dispbottom callfunc("getMesPM",51); dispbottom callfunc("getMesPM",52); dispbottom "- Type: 0 = Arena PvP; 1 = Arena PvP Baby; 2 Arena GvG;"; dispbottom callfunc("getMesPM",53); end; } if(compare(@whispervar1$,"!truncate") && getgmlevel()>=70) { dispbottom callfunc("getMesPM",39); dispbottom callfunc("getMesPM",54); dispbottom callfunc("getMesPM",55); dispbottom callfunc("getMesPM",56); end; } dispbottom callfunc("getMesPM",57); end; } dispbottom callfunc("getMesPM",58); dispbottom callfunc("getMesPM",59); dispbottom callfunc("getMesPM",60); dispbottom callfunc("getMesPM",61); dispbottom callfunc("getMesPM",62); dispbottom callfunc("getMesPM",63); dispbottom callfunc("getMesPM",64); dispbottom callfunc("getMesPM",65); if(getgmlevel()>=70) { dispbottom callfunc("getMesPM",66); dispbottom callfunc("getMesPM",67); dispbottom callfunc("getMesPM",68); dispbottom callfunc("getMesPM",69); } } - script event#pvpm -1,{ OnInit: OnTimer60000: query_sql("update pvpm_data set ban=ban-1 where ban>0"); initnpctimer; end; OnPCKillEvent: callfunc("pvpm_func","PCKillEvent"); OnPCDieEvent: callfunc("pvpm_func","PCDieEvent"); OnPCLoadMapEvent: callfunc("pvpm_func","PCLoadEvent"); } function script pvpm_func { if (getarg(0) == "Ranking1") { deletearray @name$[0],getarraysize(@name$); deletearray @points[0],getarraysize(@points); query_sql "select name,"+getarg(1)+" from pvpm_data where type="+getarg(2)+" and "+getarg(1)+"!=0 order by "+getarg(1)+" desc limit 125",@name$,@points; dispbottom "======= Ranking - "+getarg(3)+" ======="; for(set @i,0;@i != $@showsRankUntil;set @i,@i+1) { if(@name$[@i]=="") return; dispbottom (@i+1)+"º | "+@name$[@i]+" | "+@points[@i]; } return; } if (getarg(0) == "Ranking2") { deletearray @name$[0],getarraysize(@name$); deletearray @points[0],getarraysize(@points); query_sql "select id,"+getarg(1)+" from pvpm_data where type="+getarg(2)+" order by "+getarg(1)+" desc limit 125",@id,@points; for(set @i,0;@i <= 125;set @i,@i+1) { if (@id[@i] == getcharid(getarg(2))) { dispbottom "- "+strcharinfo(getarg(2))+" | "+(@i+1)+"º | "+@points[@i]; return; } } dispbottom callfunc("getMesPM",70); return; } if(getarg(0)=="Warp") { if(getarg(1)) { if($@MapTypePM[(getarg(2)-1)]==2 && !getcharid(2)) { mes $@pvpm_name$; mes callfunc("getMesPM",71); close; } if($@MapTypePM[(getarg(2)-1)]==1 && Upper!=2) { mes $@pvpm_name$; mes callfunc("getMesPM",72); close; } if($@MapTypePM==0||$@MapTypePM==1) callfunc("pvpm_func","ban",0,1); else callfunc("pvpm_func","ban",2,1); } else { getmapxy(@map$,@x,@y,0); if($@mapPM$[(getarg(2)-1)]==@map$) { dispbottom "<!!!> "+callfunc("getMesPM",73); end; } if($@MapTypePM[(getarg(2)-1)]==2) { dispbottom "<!!!> "+callfunc("getMesPM",71); end; } if($@MapTypePM[(getarg(2)-1)]==1 && Upper!=2) { dispbottom "<!!!> "+callfunc("getMesPM",72); end; } if($@MapTypePM==0||$@MapTypePM==1) callfunc("pvpm_func","ban",0); else callfunc("pvpm_func","ban",2); } set @MapIDx,(getarg(2)-1); if($@breakBuffs) sc_end -1; warp $@mapPM$[(getarg(2)-1)],0,0; end; } if (getarg(0) == "ban") { set @bantime,0; query_sql("select ban from pvpm_data where id="+getcharid(getarg(1))+" limit 1",@bantime); if(!@bantime) return; if(!getarg(2,0)) { dispbottom "<!!!> "+callfunc("getMesPM",74)+" "+@bantime+" "+callfunc("getMesPM",27)+"!"; end; } else { mes "^FF7F50<!!!> ^FFA500"+callfunc("getMesPM",74)+" ^FF7F50"+@bantime+"^FFA500 "+callfunc("getMesPM",27)+"!"; close; } } if (getarg(0) == "Up") { if($@getEXPoption) callfunc("pvpm_func","getexp"); set @name$,""; set @points,0; query_sql("select name,"+getarg(1)+" from pvpm_data where id="+getcharid(getarg(2))+" and type="+getarg(2)+" limit 1",@name$,@points); if (@name$=="") { query_sql("INSERT INTO pvpm_data (id,"+getarg(1)+",name,annc,type) values ("+getcharid(getarg(2))+",1,'"+strcharinfo(getarg(2))+"',"+getarg(3)+","+getarg(2)+")"); dispbottom "Score: 1"; end; } query_sql("update pvpm_data set "+getarg(1)+"="+getarg(1)+"+1 where id="+getcharid(getarg(2))); set @points,@points+1; if($@mainRanking) { set @kills,0; set @dies,0; query_sql("select kills,dies from pvpm_data where id="+getcharid(getarg(2))+" and type="+getarg(2)+" limit 1",@kills,@dies); query_sql("update pvpm_data set ratio="+(@kills-@dies)+" where id="+getcharid(getarg(2))+" and type="+getarg(2)+" limit 1"); set @points,@kills-@dies; return; } return; } if (getarg(0) == "ChangeLeader") { set @L_name$,""; set @L_points,0; if(!$@mainRanking) query_sql("select name,kills from pvpm_data where leader=1 and type="+getarg(1)+" limit 1",@L_name$,@L_points); else query_sql("select name,ratio from pvpm_data where leader=1 and type="+getarg(1)+" limit 1",@L_name$,@L_points); if (@points > @L_points && @L_name$ != strcharinfo(getarg(1))) { query_sql("update pvpm_data set leader=0 where type="+getarg(1)); query_sql("update pvpm_data set leader=1 where id="+getcharid(getarg(1))+" and type="+getarg(1)); mapannounce @map$,strcharinfo(getarg(1))+" | "+callfunc("getMesPM",75)+" !",bc_map,0xFF7F50; set $@Player_Lider$,""; set $@Guild_Lider$,""; query_sql("select name from pvpm_data where leader=1 and type=0 limit 1",$@Player_Lider$); query_sql("select name from pvpm_data where leader=1 and type=2 limit 1",$@Guild_Lider$); } return; } if (getarg(0) == "Annc") { set @points,0; set @annc,0; query_sql "select kills,annc from pvpm_data where id="+getcharid(getarg(1))+" and type="+getarg(1),@points,@annc; if(!@annc) query_sql "update pvpm_data set annc=annc+"+getarg(2)+" where id="+getcharid(getarg(1))+" and type="+getarg(1); if (@points >= @annc) { Announce strcharinfo(getarg(1))+" | "+@points+" "+callfunc("getMesPM",76)+"! ["+getarg(3)+"]",bc_all,0xFF7F50; query_sql "update pvpm_data set annc=annc+"+getarg(2)+" where id="+getcharid(getarg(1))+" and type="+getarg(1); if($@sound==1||$@sound==3) soundeffectall "Monster Kill.wav",0; } if(!$@sound||$@sound==1) return; if(getarg(3)=="PvP") { if(@noMoreSounds&&@withoutDying==@withoutDyingAnnc) { mapannounce @map$,strcharinfo(0)+" | "+$@SoundList$[@noMoreSounds]+"! [ "+@withoutDying+" "+callfunc("getMesPM",76)+" ]",bc_map,0xFF7F50; soundeffectall $@SoundList$[@noMoreSounds]+".wav",0,@map$; set @withoutDyingAnnc,@withoutDyingAnnc+5; return; } if($@SoundList$[@withoutDying]=="end") { set @withoutDyingAnnc,@withoutDyingAnnc+5; set @noMoreSounds,@withoutDying-1; } if($@SoundList$[@withoutDying]!=""&&!@noMoreSounds) { mapannounce @map$,strcharinfo(0)+" | "+$@SoundList$[@withoutDying]+" ! [ "+@withoutDying+" "+callfunc("getMesPM",76)+" ]",bc_map,0xFF7F50; soundeffectall $@SoundList$[@withoutDying]+".wav",0,@map$; } } return; } if(getarg(0) == "PCKillEvent") { set @Live,1; if(@RightWoEMap) { if($@CountPointsInWoE==1 || $@CountPointsInWoE==3) callfunc "pvpm_func","Up","kills",0,100; dispbottom "Player Score: "+@points; if($@CountPointsInWoE==2 || $@CountPointsInWoE==3) callfunc "pvpm_func","Up","kills",2,1000; dispbottom "Guild Score: "+@points; end; } getmapxy(@map$,@x,@y,0); if(@map$==$@mapPM$[@MapIDx] && $@MapTypePM[@MapIDx]>=0 && $@MapTypePM[@MapIDx]<=1 || $@PK_Mode) { set @withoutDying,@withoutDying+1; callfunc("pvpm_func","Up","kills",0,100); dispbottom "Player Score: "+@points; callfunc("pvpm_func","ChangeLeader",0); callfunc("pvpm_func","Annc",0,100,"PvP"); } if(@map$==$@mapPM$[@MapIDx] && $@MapTypePM[@MapIDx]==2 && getcharid(2) || $@PK_Mode && getcharid(2)) { callfunc("pvpm_func","Up","kills",2,1000); dispbottom "Guild Score: "+@points; callfunc("pvpm_func","ChangeLeader",2); callfunc("pvpm_func","Annc",2,1000,"GvG"); } end; } if(getarg(0) == "PCDieEvent") { set @Live,0; if(@RightWoEMap) { if($@CountPointsInWoE==1 || $@CountPointsInWoE==3) { callfunc "pvpm_func","Up","dies",0,100; if($@mainRanking) dispbottom "Player Score: "+@points; } if($@CountPointsInWoE==2 || $@CountPointsInWoE==3) { callfunc "pvpm_func","Up","dies",2,1000; if($@mainRanking) dispbottom "Guild Score: "+@points; } } set @withoutDying,0; set @noMoreSounds,0; set @withoutDyingAnnc,0; set @MapIDx,0; set @RightWoEMap,0; getmapxy(@map$,@x,@y,0); if(@map$==$@mapPM$[@MapIDx] && $@MapTypePM[@MapIDx]>=0 && $@MapTypePM[@MapIDx]<=1 || $@PK_Mode) { callfunc "pvpm_func","Up","dies",0,100; if($@mainRanking) dispbottom "Player Score: "+@points; } if(@map$==$@mapPM$[@MapIDx] && $@MapTypePM[@MapIDx]==2 && getcharid(2) || $@PK_Mode && getcharid(2)) { callfunc "pvpm_func","Up","dies",2,1000; if($@mainRanking) dispbottom "Guild Score: "+@points; } end; } if(getarg(0) == "PCLoadEvent") { getmapxy(@map$,@x,@y,0); if(getcastlename(@map$)=="") { set @RightWoEMap,0; end; } if(agitcheck() || agitcheck2()) set @RightWoEMap,1; end; } if(getarg(0) == "getexp") { if(@Live) { attachrid(killedrid); set .@BaseLevel,BaseLevel; attachrid(killerrid); if($@getEXPoption==1) set @EXP,(($@getEXP*.@BaseLevel)/BaseLevel); else set @EXP,$@getEXP; getexp @EXP,@EXP; dispbottom callfunc("getMesPM",77)+" "+@EXP+" EXP."; } else { if(BaseExp) set BaseExp,BaseExp-$@lostEXP; if(JobExp) set JobExp,JobExp-$@lostEXP; dispbottom callfunc("getMesPM",78)+" "+$@lostEXP+" EXP.";; } return; } } function script getMesPM { return getd("$@PM_Lang"+PM_Lang+"$["+getarg(0)+"]"); } //================== DUPLICATE ===================== cydonia,138,98,4 duplicate(PM_source) [PvP] Arena#1 899 cydonia,150,159,4 duplicate(PM_source) [PvP] Arena#2 899 sec_in01,90,176,4 duplicate(PM_source) [PvP] Arena#3 899 alberta,26,240,4 duplicate(PM_source) [PvP] Arena#4 899 izlude,122,119,4 duplicate(PM_source) [PvP] Arena#5 899 aldebaran,147,119,4 duplicate(PM_source) [PvP] Arena#6 899 xmas,145,136,4 duplicate(PM_source) [PvP] Arena#7 899 comodo,184,158,4 duplicate(PM_source) [PvP] Arena#8 899 gonryun,161,126,4 duplicate(PM_source) [PvP] Arena#9 899 louyang,226,106,4 duplicate(PM_source) [PvP] Arena#10 899 ayothaya,155,121,4 duplicate(PM_source) [PvP] Arena#11 899 hugel,87,164,4 duplicate(PM_source) [PvP] Arena#12 899 moscovia,209,190,5 duplicate(PM_source) [PvP] Arena#13 899 //================== WOE ===================== //Necessário para ativar o sistema de contagem dos pontos na woe. //caso queira desativar algum mapa, retire-o daqui. aldeg_cas01 mapflag loadevent aldeg_cas02 mapflag loadevent aldeg_cas03 mapflag loadevent aldeg_cas04 mapflag loadevent gefg_cas01 mapflag loadevent gefg_cas02 mapflag loadevent gefg_cas03 mapflag loadevent gefg_cas04 mapflag loadevent gefg_cas05 mapflag loadevent payg_cas01 mapflag loadevent payg_cas02 mapflag loadevent payg_cas03 mapflag loadevent payg_cas04 mapflag loadevent payg_cas05 mapflag loadevent prtg_cas01 mapflag loadevent prtg_cas02 mapflag loadevent prtg_cas03 mapflag loadevent prtg_cas04 mapflag loadevent prtg_cas05 mapflag loadevent schg_cas01 mapflag loadevent schg_cas02 mapflag loadevent schg_cas03 mapflag loadevent schg_cas04 mapflag loadevent schg_cas05 mapflag loadevent arug_cas01 mapflag loadevent arug_cas02 mapflag loadevent arug_cas03 mapflag loadevent arug_cas04 mapflag loadevent arug_cas05 mapflag loadevent //NÃO APAGUE DAQUI PARA BAIXO! pay_gld mapflag loadevent prt_gld mapflag loadevent sch_gld mapflag loadevent aru_gld mapflag loadevent gef_fild13 mapflag loadevent alde_gld mapflag loadevent n_castle mapflag loadevent
-
Hello good afternoon I entedi not very good, could be clearer? if you can help me thank you very much I will post a print error, showing Porings are locked at the finish line and npc not give prizes nor return.
-
Hello I have a custom map that has a space which has 5 lanes to make poring race, I tried to adapt the current race poring script to my map more not work, it seems to me that the race takes place on the original map in the straight X and in my custom map it can only occur in a straight line Y, anyway after much tinkering could make the race work, however the Porings run and catch on arrival and did not return to the place of beginning and not delivering premium, if anyone can help me thank you very ... follows the npc. //===== Athena Script ======================================== //= Poring Race System //===== By: ================================================== //= Zell_ff8 //= -Made for Daegaladh, www.gatsuro.tk Admin //= -and RUNE, http://ro-enhanced.net //= Some Rights Reserved //= http://creativecommons.org/licenses/by-nc-sa/2.5/ar/ //===== Current Version: ===================================== //= 0.78 //===== Compatible With: ===================================== //= eAthena SVN 9991+ && Cronus SVN 1268+ //===== Description: ========================================= //= Poring Race //===== Additional Comments: ================================= //= Tested, eA SVN Stable r10128 working 100% //= Need a lot of clean up... but, WORKS!! WTH xD //= Sorry to C&P the position check after a selection, it's a //= fast fix and don't have time to make it a function. //====== Checker: ============================================== cydonia,99,44,0 script Checker#prace0 -1,{ end; OnChequeo: set .@prace_prize, 17006; // ID do prêmio para quem vencer.[Padrão: ????] set .@prace_prize_quantity, 1; // Quantidade do prêmio. [Padrão: 1] set $prace_gate,0; for(set .@i,0; .@i < (getarraysize($prace_bidders)); set .@i, .@i + 1){ if(attachrid($prace_bidders[.@i])){ if (@prace_playing!=1) end; set @z, rand(150000,400000); dispbottom "O vencedor é o "+$prace_winner$+" e você apostou em "+@prace_winner$+"."; if (@prace_winner$==$prace_winner$ && @prace_winner$!=""){ dispbottom "Você venceu! Prêmio: 1 "+getitemname(@id); mapannounce "cydonia"," Parabéns! "+strcharinfo(0)+" venceu!",1,0xFFAB54; getitem .@prace_prize,1; emotion 21,1; } else { dispbottom "Você perdeu."; emotion 28,1; } set @prace_winner$,"";set @prace_playing,0; } //else { announce .@i+" || "+$prace_bidders[.@i],bc_all; } //debug } for(set .@i,0; .@i < (getarraysize($prace_bidders)); set .@i, .@i + 1) set $prace_bidders[.@i],0; } - script Timers#prace0 -1,{ OnClock0000: callsub OnCalll; OnClock0200: callsub OnCalll; OnClock0400: callsub OnCalll; OnClock0600: callsub OnCalll; OnClock0816: callsub OnCalll; OnClock1000: callsub OnCalll; OnClock1200: callsub OnCalll; OnClock1400: callsub OnCalll; OnClock1600: callsub OnCalll; OnClock1800: callsub OnCalll; OnClock2000: callsub OnCalll; OnClock2200: callsub OnCalll; OnCalll: set $prace_gate,1; announce "A 'Corrida dos Porings' irá começar em breve, façam suas apostas!",bc_all|bc_yellow; end; } //====== Principal: ============================================ cydonia,104,59,3 script Bidder#prace0 765,{ set .@prace_zeny,20000000; // Preço para apostar. [Padrão: 20000000] if ($prace_random < 1) callsub OnInit; if (@prace_playing==1) callsub AlreadyPlaying; if($prace_gate == 0){ mes "[Bidder]"; mes "Uma corrida está em andamento..."; close; } getmapxy(.@mapname$,.@x1,.@y,1,"Poring#prace1"); getmapxy(.@mapname$,.@x2,.@y,1,"Angeling#prace2"); getmapxy(.@mapname$,.@x3,.@y,1,"Metaling#prace3"); getmapxy(.@mapname$,.@x4,.@y,1,"Deviling#prace4"); getmapxy(.@mapname$,.@x5,.@y,1,"Poring Noel#prace5"); if (.@x1 != 103 || .@x2 != 106 || .@x3 != 109 || .@x4 != 112 || .@x5 != 115){ mes "[Bidder]"; mes "Uma corrida está em andamento..."; close; } mes "[Bidder]"; mes "Escolha o poring em que deseja apostar:";mes "Irá custar "+.@prace_zeny+" Zeny.";next; switch(select("Poring","Angeling","Metaling","Deviling","Poring Noel")){ case 1: callfunc "OnBid","Poring"; case 2: callfunc "OnBid","Angeling"; case 3: callfunc "OnBid","Metaling"; case 4: callfunc "OnBid","Deviling"; case 5: callfunc "OnBid","Poring Noel"; } OnReady: set $prace_bets,$prace_bets+1; set $prace_bidders[$prace_bets],getcharid(3); set @prace_playing,1; mes "[Bidder]"; mes "Eu tenho "+$prace_bets+" apostas."; setnpctimer 60000; startnpctimer; npctalk strcharinfo(0)+" fez sua aposta!"; close; Start1: setnpctimer 0; startnpctimer; end; AlreadyPlaying: mes "[Bidder]"; mes "Você apostou em ^00bb00"+@prace_winner$+"^000000."; close; StartRace: donpcevent "Metaling#prace3::OnRace"; donpcevent "Poring#prace1::OnRace"; donpcevent "Angeling#prace2::OnRace"; donpcevent "Poring Noel#prace5::OnRace"; donpcevent "Deviling#prace4::OnRace"; end; OnStopRace: donpcevent "Poring#prace1::OnStop"; donpcevent "Angeling#prace2::OnStop"; donpcevent "Metaling#prace3::OnStop"; donpcevent "Deviling#prace4::OnStop"; donpcevent "Poring Noel#prace5::OnStop"; if ($prace_winner$!="") callsub WinRace; end; ReturnRace: donpcevent "Poring#prace1::OnReturn"; donpcevent "Angeling#prace2::OnReturn"; donpcevent "Metaling#prace3::OnReturn"; donpcevent "Deviling#prace4::OnReturn"; donpcevent "Poring Noel#prace5::OnReturn"; end; WinRace: set $prace_gate,0; mapannounce "cydonia","O vencedor é o "+$prace_winner$+".",1,0xFFAB54; donpcevent "Checker#prace0::OnChequeo"; setnpctimer 30000;startnpctimer; end; OnInit: set $prace_random,70; set $prace_random2,600; set $prace_winner$,""; set $prace_bets,0; set $prace_bidders,0; end; OnTimer500: mapannounce "cydonia","Porings, em suas marcas...",1,0xFFAB54; end; OnTimer3000: mapannounce "cydonia","...3...",1,0xFFAB54; end; OnTimer4000: mapannounce "cydonia","...2...",1,0xFFAB54; end; OnTimer5000: mapannounce "cydonia","...1...",1,0xFFAB54; callsub StartRace; end; OnTimer6000: stopnpctimer; mapannounce "cydonia","Gooo!!!",1,0xFFAB54; end; OnTimer35000: set $prace_winner$,""; set $prace_bets,0; stopnpctimer; callsub ReturnRace; OnTimer90000: npctalk "Eu tenho "+$prace_bets+" aposta(s). Alguém mais?"; end; OnTimer110000: npctalk "A corrida irá começar em breve. Última chance."; end; OnTimer120000: callsub Start1; } //====== Função Apostar: ======================================= function script OnBid { getmapxy(.@mapname$,.@x1,.@y,1,"Poring#prace1"); getmapxy(.@mapname$,.@x2,.@y,1,"Angeling#prace2"); getmapxy(.@mapname$,.@x3,.@y,1,"Metaling#prace3"); getmapxy(.@mapname$,.@x4,.@y,1,"Deviling#prace4"); getmapxy(.@mapname$,.@x5,.@y,1,"Poring Noel#prace5"); if (.@x1 == 103 || .@x2 == 106 || .@x3 == 109 || .@x4 == 112 || .@x5 == 115){ if (Zeny < .@prace_zeny) { callsub OnZeny; } else { set Zeny,Zeny-.@prace_zeny; } set @prace_winner$,getarg(0); callsub OnReady; } mes "[Bidder]"; mes "Uma corrida está em andamento..."; close; OnZeny: set @prace_winner$,""; mes "[Bidder]"; mes "Você não tem Zeny suficiente."; close; OnReady: set $prace_bets,$prace_bets+1; set $prace_bidders[$prace_bets],getcharid(3); set @prace_playing,1; mes "[Bidder]"; mes "Eu tenho "+$prace_bets+" apostas."; setnpctimer 60000; startnpctimer; npctalk strcharinfo(0)+" fez sua aposta!"; close; } //====== Monstros: ============================================== cydonia,103,54,4 script Poring#prace1 1002,{ end; OnRace: initnpctimer; startnpctimer; end; OnStop: stopnpctimer; end; OnReturn: npcwalkto 103,54; end; OnTimer1100: getmapxy(.@mapname$,.@x,.@y,1,"Poring#prace1"); if(rand(100) < $prace_random) npcwalkto .@x,.@y-1; setnpctimer rand($prace_random2); startnpctimer; if ((.@y-1) == 20) { set $prace_winner$,"Poring"; emotion 20; donpcevent "Bidder#prace0::OnStopRace"; } } cydonia,106,54,4 script Angeling#prace2 1096,{ end; OnRace: initnpctimer; startnpctimer; end; OnStop: stopnpctimer; end; OnReturn: npcwalkto 106,54; end; OnTimer1100: getmapxy(.@mapname$,.@x,.@y,1,"Angeling#prace2"); if(rand(100) < $prace_random) npcwalkto .@x,.@y-1; setnpctimer rand($prace_random2); startnpctimer; if ((.@y-1) == 20) { set $prace_winner$,"Angeling"; emotion 20; donpcevent "Bidder#prace0::OnStopRace"; } } cydonia,109,54,4 script Metaling#prace3 1613,{ end; OnRace: initnpctimer; startnpctimer; end; OnStop: stopnpctimer; end; OnReturn: npcwalkto 109,54; end; OnTimer1100: getmapxy(.@mapname$,.@x,.@y,1,"Metaling#prace3"); if(rand(100) < $prace_random) npcwalkto .@x,.@y-1; setnpctimer rand($prace_random2); startnpctimer; if ((.@y-1) == 20) { set $prace_winner$,"Metaling"; emotion 20; donpcevent "Bidder#prace0::OnStopRace"; } } cydonia,112,54,4 script Deviling#prace4 1582,{ end; OnRace: initnpctimer; startnpctimer; end; OnStop: stopnpctimer; end; OnReturn: npcwalkto 112,54; end; OnTimer1100: getmapxy(.@mapname$,.@x,.@y,1,"Deviling#prace4"); if(rand(100) < $prace_random) npcwalkto .@x,.@y-1; setnpctimer rand($prace_random2); startnpctimer; if ((.@y-1) == 20) { set $prace_winner$,"Deviling"; emotion 20; donpcevent "Bidder#prace0::OnStopRace"; } } cydonia,115,54,4 script Poring Noel#prace5 1062,{ end; OnRace: initnpctimer; startnpctimer; end; OnStop: stopnpctimer; end; OnReturn: npcwalkto 115,54; end; OnTimer1100: getmapxy(.@mapname$,.@x,.@y,1,"Poring Noel#prace5"); if(rand(100) < $prace_random) npcwalkto .@x,.@y-1; setnpctimer rand($prace_random2); startnpctimer; if ((.@y-1) == 20) { set $prace_winner$,"Poring Noel"; emotion 20; donpcevent "Bidder#prace0::OnStopRace"; } }
-
The letter Ghostring only works in pvp and gvg, wanted to edit it to get everywhere, even against monsters. Thank you.
-
I wonder where I change the src to leave the skill Martyr's Reckoning, not to lose HP. also would like to know what you want siginifa this line in src //FIXME: invalid return type! //return (damage_lv)skill_attack(BF_WEAPON,src,src,target,PA_SACRIFICE,skilllv,tick,0); } if (sc) { if (sc->data[SC_SACRIFICE]) { int skilllv = sc->data[SC_SACRIFICE]->val1; if( --sc->data[SC_SACRIFICE]->val2 <= 0 ) status_change_end(src, SC_SACRIFICE,-1); status_zap(src, sstatus->max_hp*9/100, 0);//Damage to self is always 9% //FIXME: invalid return type! return (damage_lv)skill_attack(BF_WEAPON,src,src,target,PA_SACRIFICE,skilllv,tick,0); << That }
-
downloaded a site here in the forum and I can not install it, like much of a help. http://rathena.org/board/files/file/3066-medieval-theme-for-fluxcp-by-mardesigns/
-
I did exactly as you said and it did not work.
-
The Zen of skill champion you can use it several times despite having the balls and it is consuming sp, like the person who wore it already having the balls that failed skill, if not to use zen already strained spheres.
-
want to activate pvp only in a specific area of the map, I made these changes more still not work, do not be activating pvp. I wonder if there's something wrong. SRC //battle.c //find this int battle_check_target( struct block_list *src, struct block_list *target,int flag) //add this before it bool cell_pk_check(struct block_list *t_bl, struct block_list *s_bl, int m) { if(t_bl->type == BL_PC && map[m].cell[s_bl->x+s_bl->y*map[m].xs].pk == true && map[m].cell[t_bl->x+t_bl->y*map[m].xs].pk == true) { if(status_get_party_id(t_bl)==status_get_party_id(s_bl)) if(map[m].flag.pvp_noparty) return true; else return false; if(status_get_guild_id(t_bl)==status_get_guild_id(s_bl)) if(map[m].flag.pvp_noguild && map[m].flag.gvg) return true; else return false; return true; } return false; } //+++++++++++++++++++++++++++++++++// //find this else if(( sd->duel_group && !((!battle_config.duel_allow_pvp && map[m].flag.p //use this to replace else if(( sd->duel_group && !((!battle_config.duel_allow_pvp && map[m].flag.pvp) || (!battle_config.duel_allow_gvg&& map_flag_gvg(m))))||( cell_pk_check(t_bl, s_bl, m) == true )) //+++++++++++++++++++++++++++++++++// //map.c void map_setcell(int m, int x, int y, cell_t cell, bool flag) { int j; if( m < 0 || m >= map_num || x < 0 || x >= map[m].xs || y < 0 || y >= map[m].ys ) return; j = x + y*map[m].xs; switch( cell ) { case CELL_WALKABLE: map[m].cell[j].walkable = flag; break; case CELL_SHOOTABLE: map[m].cell[j].shootable = flag; break; case CELL_WATER: map[m].cell[j].water = flag; break; case CELL_NPC: map[m].cell[j].npc = flag; break; case CELL_BASILICA: map[m].cell[j].basilica = flag; break; case CELL_LANDPROTECTOR: map[m].cell[j].landprotector = flag; break; case CELL_NOVENDING: map[m].cell[j].novending = flag; break; case CELL_NOCHAT: map[m].cell[j].nochat = flag; break; case CELL_PK: map[m].cell[j].pk = flag; break;//<---add this default: ShowWarning("map_setcell: invalid cell type '%d'\n", (int)cell); break; } } //+++++++++++++++++++++++++++++++++// //map.h typedef enum { CELL_WALKABLE, CELL_SHOOTABLE, CELL_WATER, CELL_NPC, CELL_BASILICA, CELL_LANDPROTECTOR, CELL_NOVENDING, CELL_NOCHAT, CELL_PK,//<---add this } cell_t; //+++++++++++++++++++++++++++++++++// struct mapcell { // terrain flags unsigned char walkable : 1, shootable : 1, water : 1; // dynamic flags unsigned char npc : 1, basilica : 1, landprotector : 1, novending : 1, nochat : 1, pk : 1;//<---add this //+++++++++++++++++++++++++++++++++// //db\const.txt cell_walkable 0 cell_shootable 1 cell_water 2 cell_npc 3 cell_basilica 4 cell_landprotector 5 cell_novending 6 cell_nochat 7 cell_pk 8//<---add this //+++++++++++++++++++++++++++++++++// script - script SetPvPCells -1,{ end; OnInit: //setcell "prontera",<x1>,<y1>,<x2>,<y2>,<type>,<flag>; //A1 setcell "prontera",133,192,142,170,cell_pk,1; setcell "prontera",126,185,134,178,cell_pk,1; setcell "prontera",141,185,149,178,cell_pk,1;
-
I've been researching how to put pvp in just one area of map, such as the center of Prontera found a change in eAthena allowing leaves an area in PK mode which is very functional, but I wish it was pvp instead of PK. wanted someone to help me leave it so pvp. Modifications of SRC //battle.c //find this int battle_check_target( struct block_list *src, struct block_list *target,int flag) //add this before it bool cell_pk_check(struct block_list *t_bl, struct block_list *s_bl, int m) { if(t_bl->type == BL_PC && map[m].cell[s_bl->x+s_bl->y*map[m].xs].pk == true && map[m].cell[t_bl->x+t_bl->y*map[m].xs].pk == true) { if(status_get_party_id(t_bl)==status_get_party_id(s_bl)) if(map[m].flag.pvp_noparty) return true; else return false; if(status_get_guild_id(t_bl)==status_get_guild_id(s_bl)) if(map[m].flag.pvp_noguild && map[m].flag.gvg) return true; else return false; return true; } return false; } //+++++++++++++++++++++++++++++++++// //find this else if(( sd->duel_group && !((!battle_config.duel_allow_pvp && map[m].flag.p //use this to replace else if(( sd->duel_group && !((!battle_config.duel_allow_pvp && map[m].flag.pvp) || (!battle_config.duel_allow_gvg&& map_flag_gvg(m))))||( cell_pk_check(t_bl, s_bl, m) == true )) //+++++++++++++++++++++++++++++++++// //map.c void map_setcell(int m, int x, int y, cell_t cell, bool flag) { int j; if( m < 0 || m >= map_num || x < 0 || x >= map[m].xs || y < 0 || y >= map[m].ys ) return; j = x + y*map[m].xs; switch( cell ) { case CELL_WALKABLE: map[m].cell[j].walkable = flag; break; case CELL_SHOOTABLE: map[m].cell[j].shootable = flag; break; case CELL_WATER: map[m].cell[j].water = flag; break; case CELL_NPC: map[m].cell[j].npc = flag; break; case CELL_BASILICA: map[m].cell[j].basilica = flag; break; case CELL_LANDPROTECTOR: map[m].cell[j].landprotector = flag; break; case CELL_NOVENDING: map[m].cell[j].novending = flag; break; case CELL_NOCHAT: map[m].cell[j].nochat = flag; break; case CELL_PK: map[m].cell[j].pk = flag; break;//<---add this default: ShowWarning("map_setcell: invalid cell type '%d'\n", (int)cell); break; } } //+++++++++++++++++++++++++++++++++// //map.h typedef enum { CELL_WALKABLE, CELL_SHOOTABLE, CELL_WATER, CELL_NPC, CELL_BASILICA, CELL_LANDPROTECTOR, CELL_NOVENDING, CELL_NOCHAT, CELL_PK,//<---add this } cell_t; //+++++++++++++++++++++++++++++++++// struct mapcell { // terrain flags unsigned char walkable : 1, shootable : 1, water : 1; // dynamic flags unsigned char npc : 1, basilica : 1, landprotector : 1, novending : 1, nochat : 1, pk : 1;//<---add this //+++++++++++++++++++++++++++++++++// //db\const.txt cell_walkable 0 cell_shootable 1 cell_water 2 cell_npc 3 cell_basilica 4 cell_landprotector 5 cell_novending 6 cell_nochat 7 cell_pk 8//<---add this //+++++++++++++++++++++++++++++++++// Example of how the script would - script SetPvPCells -1,{ end; OnInit: //setcell "prontera",<x1>,<y1>,<x2>,<y2>,<type>,<flag>; //A1 setcell "prontera",133,192,142,170,cell_pvp,1; setcell "prontera",126,185,134,178,cell_pvp,1; setcell "prontera",141,185,149,178,cell_pvp,1;