Jump to content

ThyroDree

Members
  • Content Count

    532
  • Joined

  • Last visited

6 Followers

About ThyroDree

  • Rank
    Advanced Member

Profile Information

  • Gender
    Not Telling
  • Location:
    Philippines
  • Github
    bosxkate23
  • Emulator
    Hercules

Recent Profile Visitors

2305 profile views
  1. Anyone can help me? I have tried this and it doesn't remove curse status //===== Hercules Script ====================================== //= Healer //===== By: ================================================== //= Euphy //===== Current Version: ===================================== //= 1.2 //===== Description: ========================================= //= Basic healer script. //===== Additional Comments: ================================= //= 1.0 Initial script. //= 1.1 Aligned coordinates with @go. //= 1.2 Fix variables and character stuck at healing //============================================================ - script Healer FAKE_NPC,{ [email protected] = 0; // Zeny required for heal [email protected] = 0; // Also buff players? (1: yes / 0: no) [email protected] = 1; // Heal delay, in seconds if (@HD > gettimetick(2)) end; if ([email protected]) { message strcharinfo(PC_NAME),"Healing costs "[email protected]+" Zeny."; if (Zeny < [email protected]) end; if(select("^0055FFHeal^000000", "^777777Cancel^000000") == 2) close; Zeny -= [email protected]; } specialeffect(EF_HEAL2, AREA, playerattached()); percentheal 100,100; getinventorylist; for( set [email protected],0; [email protected] < @inventorylist_count; set [email protected], [email protected] + 1 ) { if ( @inventorylist_identify[[email protected]] == 1 ) continue; delitem2 @inventorylist_id[[email protected]],1,0,0,0,0,0,0,0; getitem @inventorylist_id[[email protected]],1; } // Remove negative status effects for ( [email protected] = 0; [email protected] < getarraysize( .debuffs ); [email protected] ) { sc_end .debuffs[ [email protected] ]; } // Repair equipment while( getbrokenid(1) ) { repairall; } if ([email protected]) { specialeffect(EF_INCAGILITY, AREA, playerattached()); sc_start SC_INC_AGI,240000,10; specialeffect(EF_BLESSING, AREA, playerattached()); sc_start SC_BLESSING,240000,10; } if ([email protected]) @HD = gettimetick(2)[email protected]; end; } // Duplicates //============================================================ alberta,186,143,6 duplicate(Healer) Healer#alb 4_M_ALCHE_C aldebaran,135,118,6 duplicate(Healer) Healer#alde 4_M_ALCHE_C amatsu,200,79,4 duplicate(Healer) Healer#ama 4_M_ALCHE_C ayothaya,207,169,6 duplicate(Healer) Healer#ayo 4_M_ALCHE_C comodo,184,158,6 duplicate(Healer) Healer#com 4_M_ALCHE_C einbech,57,36,6 duplicate(Healer) Healer#einbe 4_M_ALCHE_C einbroch,57,202,6 duplicate(Healer) Healer#einbr 4_M_ALCHE_C geffen,115,72,6 duplicate(Healer) Healer#gef 4_M_ALCHE_C gonryun,156,122,6 duplicate(Healer) Healer#gon 4_M_ALCHE_C hugel,89,150,6 duplicate(Healer) Healer#hug 4_M_ALCHE_C izlude,125,118,5 duplicate(Healer) Healer#izl 4_M_ALCHE_C jawaii,250,139,4 duplicate(Healer) Healer#jaw 4_M_ALCHE_C lighthalzen,152,100,6 duplicate(Healer) Healer#lhz 4_M_ALCHE_C louyang,212,43,5 duplicate(Healer) Healer#lou 4_M_ALCHE_C manuk,272,144,6 duplicate(Healer) Healer#man 4_M_ALCHE_C mid_camp,203,289,6 duplicate(Healer) Healer#mid 4_M_ALCHE_C moc_ruins,72,164,4 duplicate(Healer) Healer#moc 4_M_ALCHE_C morocc,153,97,6 duplicate(Healer) Healer#mor 4_M_ALCHE_C moscovia,220,191,4 duplicate(Healer) Healer#mos 4_M_ALCHE_C niflheim,212,182,5 duplicate(Healer) Healer#nif 4_M_ALCHE_C payon,179,106,4 duplicate(Healer) Healer#pay 4_M_ALCHE_C payon,163,229,4 duplicate(Healer) Healer#pay2 4_M_ALCHE_C prontera,151,185,4 duplicate(Healer) Healer#prt 4_M_ALCHE_C rachel,125,116,6 duplicate(Healer) Healer#rac 4_M_ALCHE_C splendide,201,153,4 duplicate(Healer) Healer#spl 4_M_ALCHE_C thor_camp,249,74,4 duplicate(Healer) Healer#thor 4_M_ALCHE_C umbala,105,148,3 duplicate(Healer) Healer#umb 4_M_ALCHE_C veins,217,121,4 duplicate(Healer) Healer#ve 4_M_ALCHE_C xmas,143,136,4 duplicate(Healer) Healer#xmas 4_M_ALCHE_C yuno,164,45,4 duplicate(Healer) Healer#yuno 4_M_ALCHE_C // Duplicates (Renewal) //============================================================ brasilis,194,221,6 duplicate(Healer) Healer#bra 4_M_ALCHE_C dewata,195,187,4 duplicate(Healer) Healer#dew 4_M_ALCHE_C dicastes01,201,194,4 duplicate(Healer) Healer#dic 4_M_ALCHE_C ecl_in01,45,60,4 duplicate(Healer) Healer#ecl 4_M_ALCHE_C malangdo,132,114,6 duplicate(Healer) Healer#mal 4_M_ALCHE_C malaya,205,205,6 duplicate(Healer) Healer#ma 4_M_ALCHE_C mora,55,152,4 duplicate(Healer) Healer#mora 4_M_ALCHE_C
  2. Yes adding more zeroes, like that. How can i use the sprintf and mesf to work in this script. I tried adding it to the script. Also searched for sprintf and mesf at herc.ws
  3. Hello how can I add 2 more zeroes to ms? also can add 5 top breakers not only the fastest one? heres the script im using.. //===== rAthena Script ======================================= //= Emperium Break Room //===== By: ================================================== //= Masao //===== Current Version: ===================================== //= 1.0 //===== Compatible With: ===================================== //= rAthena SVN //===== Description: ========================================= //= An little Emperium Break Room NPC in which you can test your //= strength and speed against Emperiums. //===== Additional Comments: ================================= //= 1.0 First Version. [Masao] //============================================================ prontera,145,173,5 script Emperium Breaker 4_GEFFEN_14,{ set [email protected]_time,$empbrk_record; set [email protected]_m,[email protected]_time / 60000; set [email protected]_s,[email protected]_time / 1000; set [email protected]_ms,[email protected]_time / 10000; set [email protected],empbrk_record; set [email protected],[email protected] / 60000; set [email protected],[email protected] / 1000; set [email protected],[email protected] / 10000; mes "[ ^FF0000Emperium Breaker^000000 ]";; mes "^FF0000Your Latest Record^000000: "[email protected]+"."[email protected]+" Seconds."; mes "^FF0000Top Breaker^000000: "+$empbrk_master$+""; mes "^0000FFTime Taken^000000: [ "[email protected]_s+"."[email protected]_ms+" Sec. ]"; next; mes "[ ^FF0000Emperium Breaker^000000 ]"; mes "Would you like to try to set a new record?"; next; if (getgmlevel() >= 20) { menu "Standard Menu",-,"Reset",L_RO,"Reset Rooms",L_RR,"Cancel",L_C; menu "Yes",-,"No",L_C,"Reset",L_R; } else { menu "Yes",-,"No",L_C,"Reset",L_R; } cleararray .arena$[0],"",4; mes "[ ^FF0000Emperium Breaker^000000 ]"; if (getareausers("pvp_n_4-5",94,128,105,139)){ mes "Emperium Room 1: ^FF0000 Busy^000000"; }else{ mes "Emperium Room 1: ^00A000 Free^000000"; set .arena$[0],"Emperium Room 1"; } if (getareausers("pvp_n_4-5",60,94,71,105)){ mes "Emperium Room 2: ^FF0000 Busy^000000"; }else{ mes "Emperium Room 2: ^00A000 Free^000000"; set .arena$[1],"Emperium Room 2"; } if (getareausers("pvp_n_4-5",94,60,105,71)){ mes "Emperium Room 3: ^FF0000 Busy^"; }else{ mes "Emperium Room 3: ^00A000 Free^000000"; set .arena$[2],"Emperium Room 3"; } if (getareausers("pvp_n_4-5",128,94,139,105)){ mes "Emperium Room 4: ^FF0000 Busy^000000"; }else{ mes "Emperium Room 4: ^00A000 Free^000000"; set .arena$[3],"Emperium Room 4"; } next; switch (select(.arena$[0],.arena$[1],.arena$[2],.arena$[3],"Exit")){ case 1: if (getareausers("pvp_n_4-5",60,94,71,105) == 0){ if([email protected]_occupied[0] > 0){ mes "[Emperium Breaker]"; mes "This room is currently occupied, please try again later."; close; } close2; set [email protected]_occupied[0],1; set [email protected]_charid[0],getcharid(0); warp "pvp_n_4-5",99,128; initnpctimer "EmpBrk#1"; sc_end SC_ALL; end; } mes "[ ^FF0000Emperium Breaker^000000 ]"; mes "This room is currently occupied, please try again later."; close; case 2: if (getareausers("pvp_n_4-5",60,94,71,105) == 0){ if([email protected]_occupied[1] > 0){ mes "[ ^FF0000Emperium Breaker^000000 ]"; mes "This room is currently occupied, please try again later."; close; } close2; set [email protected]_occupied[1],1; set [email protected]_charid[1],getcharid(0); warp "pvp_n_4-5",68,99; initnpctimer "EmpBrk#2"; sc_end SC_ALL; end; } mes "[ ^FF0000Emperium Breaker^000000 ]"; mes "This room is currently occupied, please try again later."; close; case 3: if (getareausers("pvp_n_4-5",94,60,105,71) == 0){ if([email protected]_occupied[2] > 0){ mes "[ ^FF0000Emperium Breaker^000000 ]"; mes "This room is currently occupied, please try again later."; close; } close2; set [email protected]_occupied[2],1; set [email protected]_charid[2],getcharid(0); warp "pvp_n_4-5",100,68; initnpctimer "EmpBrk#3"; sc_end SC_ALL; end; } mes "[ ^FF0000Emperium Breaker^000000 ]"; mes "This room is currently occupied, please try again later."; close; case 4: if (getareausers("pvp_n_4-5",128,94,139,105) == 0){ if([email protected]_occupied[3] > 0){ mes "[ ^FF0000Emperium Breaker^000000 ]"; mes "This room is currently occupied, please try again later."; close; } close2; set [email protected]_occupied[3],1; set [email protected]_charid[3],getcharid(0); warp "pvp_n_4-5",130,99; initnpctimer "EmpBrk#4"; sc_end SC_ALL; end; } mes "[ ^FF0000Emperium Breaker^000000 ]"; mes "This room is currently occupied, please try again later."; close; case 5: close; } L_RO: mes "[ ^FF0000Emperium Breaker^000000 ]"; mes "Are you sure you want to reset the official record?"; next; menu "Yes",-,"No",L_C; set $empbrk_record,0; set $empbrk_master$,""; close; L_R: mes "[ ^FF0000Emperium Breaker^000000 ]"; mes "Are you sure you want to reset your record?"; next; menu "Yes",-,"No",L_C; set empbrk_record,0; close; L_RR: mes "[ ^FF0000Emperium Breaker^000000 ]"; mes "Rooms have been reset."; cleararray [email protected]_occupied[0],0,4; close; L_C: close; } - script EmpBrk#1 -1,{ OnTimer5000: areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"Get ready to break the Emperium!",bc_area; end; OnTimer8000: areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"5",bc_area; end; OnTimer9000: areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"4",bc_area; end; OnTimer10000: areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"3",bc_area; end; OnTimer11000: areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"2",bc_area; end; OnTimer12000: areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"1",bc_area; end; OnTimer13000: areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"GO!!!",bc_area; monster "pvp_n_4-5",.xe,.ye,"Emperium",EMPELIUM,1,"EmpBrk#1::OnEmpBreak"; end; OnTimer600000: warpchar "prontera",156,191,[email protected]_charid[0]; killmonster "pvp_n_4-5","EmpBrk#1::OnEmpBreak"; set [email protected]_occupied[0],0; stopnpctimer; end; OnEmpBreak: stopnpctimer; set .current_time,getnpctimer(0,"EmpBrk#1"); set .new_time,.current_time - 13000; if (.new_time < empbrk_record || empbrk_record == 0) { areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"New Own Record!!!",bc_area; set empbrk_record,.new_time; } if (.new_time < $empbrk_record || $empbrk_record == 0) { announce strcharinfo(0)+" is now the new No. 1 Emperium Breaker!!",bc_all; set $empbrk_record,.new_time; set $empbrk_master$,strcharinfo(0); } set .m,.new_time / 60000; set .s,.new_time / 1000; set .ms,.new_time / 10000; if(.m < 0){ set .m,0; } if(.s < 0){ set .s,0; } set [email protected]_occupied[0],0; areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"Your time is "+.m+"m "+.s+"s "+.ms+"ms",bc_area; warpchar "prontera",156,191,[email protected]_charid[0]; end; OnInit: set .x1,94; set .y1,128; set .x2,105; set .y2,139; set .xe,100; set .ye,134; end; } pvp_n_4-5,99,125,0 script EmpBrk#1_touch FAKE_NPC,3,1,{ OnTouch: mes "[ ^FF0000Emperium Breaker^000000 ]"; mes "You cannot exit your square!"; close2; warp "pvp_n_4-5",99,128; end; } - script EmpBrk#2 -1,{ OnTimer5000: areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"Get ready to break the Emperium!",bc_area; end; OnTimer8000: areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"5",bc_area; end; OnTimer9000: areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"4",bc_area; end; OnTimer10000: areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"3",bc_area; end; OnTimer11000: areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"2",bc_area; end; OnTimer12000: areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"1",bc_area; end; OnTimer13000: areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"GO!!!",bc_area; monster "pvp_n_4-5",.xe,.ye,"Emperium",EMPELIUM,1,"EmpBrk#2::OnEmpBreak"; end; OnTimer600000: warpchar "prontera",156,191,[email protected]_charid[1]; killmonster "pvp_n_4-5","EmpBrk#2::OnEmpBreak"; set [email protected]_occupied[1],0; stopnpctimer; end; OnEmpBreak: stopnpctimer; set .current_time,getnpctimer(0,"EmpBrk#2"); set .new_time,.current_time - 13000; if (.new_time < empbrk_record || empbrk_record == 0) { areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"New Own Record!!!",bc_area; set empbrk_record,.new_time; } if (.new_time < $empbrk_record || $empbrk_record == 0) { announce strcharinfo(0)+" is now the new No. 1 Emperium Breaker!!",bc_all; set $empbrk_record,.new_time; set $empbrk_master$,strcharinfo(0); } set .m,.new_time / 60000; set .s,.new_time / 1000; set .ms,.new_time / 10000; if(.m < 0){ set .m,0; } if(.s < 0){ set .s,0; } areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"Your time is "+.m+"m "+.s+"s "+.ms+"ms",bc_area; warpchar "prontera",156,191,[email protected]_charid[1]; set [email protected]_occupied[1],0; end; OnInit: set .x1,60; set .y1,94; set .x2,71; set .y2,105; set .xe,65; set .ye,99; end; } pvp_n_4-5,74,99,0 script EmpBrk#2_touch FAKE_NPC,1,3,{ OnTouch: mes "[ ^FF0000Emperium Breaker^000000 ]"; mes "You cannot exit your square!"; close2; warp "pvp_n_4-5",68,99; end; } - script EmpBrk#3 -1,{ OnTimer5000: areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"Get ready to break the Emperium!",bc_area; end; OnTimer8000: areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"5",bc_area; end; OnTimer9000: areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"4",bc_area; end; OnTimer10000: areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"3",bc_area; end; OnTimer11000: areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"2",bc_area; end; OnTimer12000: areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"1",bc_area; end; OnTimer13000: areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"GO!!!",bc_area; monster "pvp_n_4-5",.xe,.ye,"Emperium",EMPELIUM,1,"EmpBrk#3::OnEmpBreak"; end; OnTimer600000: warpchar "prontera",156,191,[email protected]_charid[2]; killmonster "pvp_n_4-5","EmpBrk#3::OnEmpBreak"; set [email protected]_occupied[2],0; stopnpctimer; end; OnEmpBreak: stopnpctimer; set .current_time,getnpctimer(0,"EmpBrk#3"); set .new_time,.current_time - 13000; if (.new_time < empbrk_record || empbrk_record == 0) { areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"New Own Record!!!",bc_area; set empbrk_record,.new_time; } if (.new_time < $empbrk_record || $empbrk_record == 0) { announce strcharinfo(0)+" is now the new No. 1 Emperium Breaker!!",bc_all; set $empbrk_record,.new_time; set $empbrk_master$,strcharinfo(0); } set .m,.new_time / 60000; set .s,.new_time / 1000; set .ms,.new_time / 10000; if(.m < 0){ set .m,0; } if(.s < 0){ set .s,0; } areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"Your time is "+.m+"m "+.s+"s "+.ms+"ms",bc_area; warpchar "prontera",156,191,[email protected]_charid[2]; set [email protected]_occupied[2],0; end; OnInit: set .x1,94; set .y1,60; set .x2,105; set .y2,71; set .xe,99; set .ye,65; end; } pvp_n_4-5,100,74,0 script EmpBrk#3_touch FAKE_NPC,3,1,{ OnTouch: mes "[ ^FF0000Emperium Breaker^000000 ]"; mes "You cannot exit your square!"; close2; warp "pvp_n_4-5",100,68; end; } - script EmpBrk#4 -1,{ OnTimer5000: areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"Get ready to break the Emperium!",bc_area; end; OnTimer8000: areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"5",bc_area; end; OnTimer9000: areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"4",bc_area; end; OnTimer10000: areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"3",bc_area; end; OnTimer11000: areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"2",bc_area; end; OnTimer12000: areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"1",bc_area; end; OnTimer13000: areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"GO!!!",bc_area; monster "pvp_n_4-5",.xe,.ye,"Emperium",EMPELIUM,1,"EmpBrk#4::OnEmpBreak"; end; OnTimer600000: warpchar "prontera",156,191,[email protected]_charid[3]; killmonster "pvp_n_4-5","EmpBrk#4::OnEmpBreak"; set [email protected]_occupied[3],0; stopnpctimer; end; OnEmpBreak: stopnpctimer; set .current_time,getnpctimer(0,"EmpBrk#4"); set .new_time,.current_time - 13000; if (.new_time < empbrk_record || empbrk_record == 0) { areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"New Own Record!!!",bc_area; set empbrk_record,.new_time; } if (.new_time < $empbrk_record || $empbrk_record == 0) { announce strcharinfo(0)+" is now the new No. 1 Emperium Breaker!!",bc_all; set $empbrk_record,.new_time; set $empbrk_master$,strcharinfo(0); } set .m,.new_time / 60000; set .s,.new_time / 1000; set .ms,.new_time / 10000; if(.m < 0){ set .m,0; } if(.s < 0){ set .s,0; } areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"Your time is "+.m+"m "+.s+"s "+.ms+"ms",bc_area; warpchar "prontera",156,191,[email protected]_charid[3]; set [email protected]_occupied[3],0; end; OnInit: set .x1,128; set .y1,94; set .x2,139; set .y2,105; set .xe,134; set .ye,99; end; } pvp_n_4-5,125,100,0 script EmpBrk#4_touch FAKE_NPC,1,3,{ OnTouch: mes "[ ^FF0000Emperium Breaker^000000 ]"; mes "You cannot exit your square!"; close2; warp "pvp_n_4-5",130,99; end; } pvp_n_4-5 mapflag nowarp 20 pvp_n_4-5 mapflag nowarpto 20 pvp_n_4-5 mapflag notrade 20 pvp_n_4-5 mapflag nochat 20 pvp_n_4-5 mapflag nocommand 20 pvp_n_4-5 mapflag novending 20 pvp_n_4-5 mapflag gvg_castle 20 pvp_n_4-5 mapflag nobranch 20 pvp_n_4-5 mapflag noicewall 20 pvp_n_4-5 mapflag noloot 20 pvp_n_4-5 mapflag nomemo 20 pvp_n_4-5 mapflag nosave 20 pvp_n_4-5 mapflag noreturn 20 pvp_n_4-5 mapflag gvg 20 //DUPLICATES Emperium Breaker 4_M_JOB_ASSASSIN //payon,170,220,4 duplicate(Emperium Breaker) Emperium Breaker#pay 4_M_JOB_ASSASSIN //gonryun,153,112,4 duplicate(Emperium Breaker) Emperium Breaker#gon 4_M_JOB_ASSASSIN
  4. Hello! anyone can make this compatible to hercules? //===== rAthena Script ======================================= //= Private MVP & Branch Room //===== By: ================================================== //= AnnieRuru //===== Current Version: ===================================== //= 1.0 //===== Compatible With: ===================================== //= rAthena Project //===== Description: ========================================= //= Allows players to rent an MVP room for personal use, //= or for a party or guild. //===== Additional Comments: ================================= //= 1.0 First version, edited. [Euphy] //============================================================ prontera,155,180,4 script Private MVP Room 4_M_EIN_SOLDIER,{ mes "[Private MVP Room]"; mes "Please select a private MVP room."; if ( getvariableofnpc( .rentcost, "MVP Summoner" ) ) mes "The cost to rent a room for "+ getvariableofnpc( .timeout, "MVP Summoner" ) +" minutes is "+ callfunc("F_InsertComma", getvariableofnpc( .rentcost, "MVP Summoner" ) ) +" zeny."; else mes "You can only use the room for only "+ getvariableofnpc( .timeout, "MVP Summoner" ) +" minutes."; mes " "; for ( [email protected] = 1; [email protected] <= 8; [email protected]++ ) if ( getvariableofnpc( .renttime[[email protected]], "MVP Summoner" ) ) mes "Room #"+ [email protected] +" = "+ .color$[ .type[[email protected]] ] + .whoinuse$[[email protected]] +"^000000"; next; [email protected] = select( "MVP Room 1 ["+ getmapusers("06guild_01") +"]", "MVP Room 2 ["+ getmapusers("06guild_02") +"]", "MVP Room 3 ["+ getmapusers("06guild_03") +"]", "MVP Room 4 ["+ getmapusers("06guild_04") +"]", "MVP Room 5 ["+ getmapusers("06guild_05") +"]", "MVP Room 6 ["+ getmapusers("06guild_06") +"]", "MVP Room 7 ["+ getmapusers("06guild_07") +"]", "MVP Room 8 ["+ getmapusers("06guild_08") +"]"); if ( getvariableofnpc( .renttime[[email protected]], "MVP Summoner" ) ) { if ( .inuseid[[email protected]] == getcharid( .type[[email protected]] ) ) { warp "06guild_0"+ [email protected], 0,0; close; } else { mes "[Private MVP Room]"; mes "This room is reserved for "; mes .color$[ .type[[email protected]] ] + .whoinuse$[[email protected]] +"^000000."; mes "Please select another."; close; } } mes "[Private MVP Room]"; mes "Reserve this room for..."; next; set [email protected], select( "For my party members", "For my guild members", "For personal account use" ); if ( !getcharid([email protected]) ) { mes "[Private MVP Room]"; mes "You do not own a "+( ( [email protected] == 1 )? "Party" : "Guild" )+"."; close; } else if ( Zeny < getvariableofnpc( .rentcost, "MVP Summoner" ) ) { mes "You don't have enough zeny to rent a room."; close; } else if ( getvariableofnpc( .renttime[[email protected]], "MVP Summoner" ) ) { mes "[Private MVP Room]"; mes "I'm sorry, somebody else has already registered this room faster than you."; close; } for ( [email protected] = 1; [email protected] <= 8; [email protected]++ ) { if ( ( getvariableofnpc( .renttime[[email protected]], "MVP Summoner" ) ) && [email protected] == .type[[email protected]] && getcharid([email protected]) == .inuseid[[email protected]] ) { mes "[Private MVP Room]"; mes "You already rented Room#"+ [email protected] +". Use that room instead."; close; } } set .type[[email protected]], [email protected]; set .inuseid[[email protected]], getcharid([email protected]); set .whoinuse$[[email protected]], strcharinfo( ( [email protected] == 3 )? 0 : [email protected] ); Zeny -= getvariableofnpc( .rentcost, "MVP Summoner" ); warp "06guild_0"+ [email protected], 0,0; killmonsterall "06guild_0"+ [email protected]; donpcevent "MVP Summoner#"+ [email protected] +"::OnEnterMap"; close; OnInit: .color$[1] = "^EE8800"; // party color .color$[2] = "^70CC11"; // guild color .color$[3] = "^0000FF"; // account color end; } - script MVP Summoner FAKE_NPC,{ mes "[MVP Summoner]"; mes "Time left: " + callfunc( "Time2Str", .renttime[ atoi( strnpcinfo(2) ) ] + .timeout * 60 ); mes "Hi, what can I do for you?"; next; switch ( select(.menu$) ) { case 1: mes "[MVP Summoner]"; if ( mobcount( "this", strnpcinfo(3)+"::OnMobDead" ) ) { mes "I cannot offer heal service when there are monsters around."; close; } sc_end SC_STONE; sc_end SC_SLOWDOWN; sc_end SC_FREEZE; sc_end SC_SLEEP; sc_end SC_CURSE; sc_end SC_SILENCE; sc_end SC_CONFUSION; sc_end SC_BLIND; sc_end SC_BLEEDING; sc_end SC_DECREASEAGI; sc_end SC_POISON; sc_end SC_HALLUCINATION; sc_end SC_STRIPWEAPON; sc_end SC_STRIPARMOR; sc_end SC_STRIPHELM; sc_end SC_STRIPSHIELD; sc_end SC_CHANGEUNDEAD; sc_end SC_ORCISH; sc_end SC_BERSERK; sc_end SC_SKE; sc_end SC_SWOO; sc_end SC_SKA; percentheal 100,100; specialeffect(EF_HEAL2, AREA, playerattached()); mes "You are completely healed."; close; case 2: if ( mobcount( "this", strnpcinfo(3)+"::OnMobDead" ) ) { mes "[MVP Summoner]"; mes "I cannot summon another MVP when there are monsters around."; close; } else if ( .mvpcost ) { mes "[MVP Summoner]"; mes "The cost to summon an MVP is "+ callfunc( "F_InsertComma", .mvpcost ) +" zeny."; next; set [email protected], select(.mvpid_menu$) -1; mes "[MVP Summoner]"; if ( Zeny < .mvpcost ) { mes "You don't have enough zeny to summon an MVP."; close; } } else { set [email protected], select(.mvpid_menu$) -1; mes "[MVP Summoner]"; } mes "Please get ready."; close2; if ( Zeny < .mvpcost ) end; Zeny -= .mvpcost; monster "this", 0, 0, "--ja--", .mvpid[[email protected]], 1, strnpcinfo(3)+"::OnMobDead"; end; case 3: if ( mobcount( "this", strnpcinfo(3)+"::OnMobDead" ) ) { mes "[MVP Summoner]"; mes "I cannot summon another mini-boss when there are monsters around."; close; } else if ( .bosscost ) { mes "[MVP Summoner]"; mes "The cost to summon a mini-boss is "+ callfunc( "F_InsertComma", .bosscost ) +" zeny."; next; set [email protected], select(.bossid_menu$) -1; mes "[MVP Summoner]"; if ( Zeny < .bosscost ) { mes "You doesn't have enough zeny to summon a mini-boss."; close; } } else { set [email protected], select(.bossid_menu$) -1; mes "[MVP Summoner]"; } mes "Please get ready."; close2; if ( Zeny < .bosscost ) end; Zeny -= .bosscost; monster "this", 0, 0, "--ja--", .bossid[[email protected]], 1, strnpcinfo(3)+"::OnMobDead"; end; case 4: if ( mobcount( "this", strnpcinfo(3)+"::OnMobDead" ) > 0 ) { mes "[MVP Summoner]"; mes "I cannot offer this service when there are monsters around."; close; } close2; callshop "MVP room#branch", 1; end; case 5: mes "[MVP Summoner]"; mes "Are you sure you want to leave this room?"; next; if ( select( "Yes:No") == 1 ) warp .respawnmap$, .respawnx, .respawny; close; case 6: mes "[MVP Summoner]"; if ( getmapusers( strcharinfo(3) ) > 1 ) { mes "There are still some players in this room. Make sure you are the last member in this room to use this option."; close; } mes "Are you sure you want to give up this room?"; if ( .rentcost ) mes "You will need to pay again to enter this room."; next; if ( select( "Yes", "No" ) == 2 ) close; awake strnpcinfo(0); end; } close; OnMobDead: end; OnEnterMap: [email protected] = atoi( strnpcinfo(2) ); .renttime[[email protected]] = gettimetick(2); sleep .timeout * 60000; mapwarp strnpcinfo(4), .respawnmap$, .respawnx, .respawny; .renttime[[email protected]] = 0; killmonsterall strnpcinfo(4); end; OnInit: if ( !getstrlen( strnpcinfo(2) ) ) { // Config --------------------------------------------------------------------------------------- // Room rental time, in minutes. // When time runs out, all players inside the room will be kicked out. // Do NOT set this to zero! set .timeout, 60; set .rentcost, 100000; // Zeny cost for renting a room (0 = free) set .mvpcost, 100000; // Zeny cost to summon an MVP (0 = free) set .bosscost, 50000; // Zeny cost to summon a boss monster (0 = free) // Options setting inside MVP room set [email protected][1], 1; // Turn Heal option On/Off set [email protected][2], 1; // Turn MVP Summoning On/Off set [email protected][3], 1; // Turn Mini boss Summoning On/Off set [email protected][4], 0; // Sell items (branches) On/Off (see shop below, before the mapflags) // Respawn point when players leave the room set .respawnmap$, "prontera"; set .respawnx, 150; set .respawny, 174; setarray .mvpid[0], 1511,// Amon Ra 1647,// Assassin Cross Eremes 1785,// Atroce 1630,// Bacsojin 1039,// Baphomet 1874,// Beelzebub 1272,// Dark Lord 1719,// Datale 1046,// Doppelgangger 1389,// Dracula 1112,// Drake 1115,// Eddga 1418,// Evil Snake Lord 1871,// Fallen Bishop 1252,// Garm 1768,// Gloom Under Night 1086,// Golden Thief Bug 1885,// Gopinich 1649,// High Priest Magaleta 1651,// High Wizard Katrinn 1832,// Ifrit 1492,// Incantation Samurai 1734,// Kiel D-01 1251,// Knight of Windstorm 1779,// Ktullanux 1688,// Lady Tanee 1646,// Lord Knight Seyren 1373,// Lord of Death 1147,// Maya 1059,// Mistress 1150,// Moonlight Flower 1087,// Orc Hero 1190,// Orc Lord 1038,// Osiris 1157,// Pharaoh 1159,// Phreeoni 1623,// RSX 0806 1650,// Sniper Shecil 1583,// Tao Gunka 1708,// Thanatos 1312,// Turtle General 1751,// Valkyrie Randgris 1685,// Vesper 1648,// Whitesmith Harword 1917,// Wounded Morroc 1658;// Ygnizem setarray .bossid[0], 1096,// Angeling 1388,// Archangeling 1795,// Bloody Knight 1830,// Bow Guardian 1839,// Byorgue 1309,// Cat O' Nine Tail 1283,// Chimera 1302,// Dark Illusion 1198,// Dark Priest 1582,// Deviling 1091,// Dragon Fly 1093,// Eclipse 1205,// Executioner 1783,// Galion 1592,// Gangster 1120,// Ghostring 1259,// Gryphon 1720,// Hydro 1090,// Mastering 1289,// Maya Purple 1262,// Mutant Dragon 1203,// Mysteltainn 1870,// Necromancer 1295,// Owl Baron 1829,// Sword Guardian 1204,// Tirfing 1089,// Toad 1092,// Vagabond Wolf 1765;// Valkyrie // Config Ends ------------------------------------------------------------------------ if ( !.timeout ) set .timeout, 60; .menu$ = ( [email protected][1] ? "Heal" : "" ) +":" ; .menu$ = .menu$ + ( [email protected][2] ? "Summon MVP" : "" ) +":"; .menu$ = .menu$ + ( [email protected][3] ? "Summon Mini-boss" : "" ) +":"; .menu$ = .menu$ + ( [email protected][4] ? "Buy branches" : "" ) +":"; .menu$ = .menu$ + "Leave this room:Give up this room"; if ( [email protected][2] ) { [email protected] = getarraysize( .mvpid ); for ( [email protected] = 0; [email protected] < [email protected]; [email protected]++ ) .mvpid_menu$ = .mvpid_menu$ + getmonsterinfo( .mvpid[[email protected]], MOB_NAME ) +":"; } if ( [email protected][3] ) { [email protected] = getarraysize( .bossid ); for ( [email protected] = 0; [email protected] < [email protected]; [email protected]++ ) .bossid_menu$ = .bossid_menu$ + getmonsterinfo( .bossid[[email protected]], MOB_NAME ) +":"; } } else { mapannounce strnpcinfo(4), "An administrator has refreshed the server. Please re-register this room.", bc_map; mapwarp strnpcinfo(4), .respawnmap$, .respawnx, .respawny; } end; } - shop MVP room#branch2 FAKE_NPC,604:100000,12103:1000000 06guild_01,49,49,4 duplicate(MVP Summoner) Summoner#1 4_F_KAFRA2 06guild_02,49,49,4 duplicate(MVP Summoner) Summoner#2 4_F_KAFRA2 06guild_03,49,49,4 duplicate(MVP Summoner) Summoner#3 4_F_KAFRA2 06guild_04,49,49,4 duplicate(MVP Summoner) Summoner#4 4_F_KAFRA2 06guild_05,49,49,4 duplicate(MVP Summoner) Summoner#5 4_F_KAFRA2 06guild_06,49,49,4 duplicate(MVP Summoner) Summoner#6 4_F_KAFRA2 06guild_07,49,49,4 duplicate(MVP Summoner) Summoner#7 4_F_KAFRA2 06guild_08,49,49,4 duplicate(MVP Summoner) Summoner#8 4_F_KAFRA2 06guild_01 mapflag nowarpto 06guild_02 mapflag nowarpto 06guild_03 mapflag nowarpto 06guild_04 mapflag nowarpto 06guild_05 mapflag nowarpto 06guild_06 mapflag nowarpto 06guild_07 mapflag nowarpto 06guild_08 mapflag nowarpto 06guild_01 mapflag nomemo 06guild_02 mapflag nomemo 06guild_03 mapflag nomemo 06guild_04 mapflag nomemo 06guild_05 mapflag nomemo 06guild_06 mapflag nomemo 06guild_07 mapflag nomemo 06guild_08 mapflag nomemo 06guild_01 mapflag noteleport 06guild_02 mapflag noteleport 06guild_03 mapflag noteleport 06guild_04 mapflag noteleport 06guild_05 mapflag noteleport 06guild_06 mapflag noteleport 06guild_07 mapflag noteleport 06guild_08 mapflag noteleport 06guild_01 mapflag nosave SavePoint 06guild_02 mapflag nosave SavePoint 06guild_03 mapflag nosave SavePoint 06guild_04 mapflag nosave SavePoint 06guild_05 mapflag nosave SavePoint 06guild_06 mapflag nosave SavePoint 06guild_07 mapflag nosave SavePoint 06guild_08 mapflag nosave SavePoint 06guild_01 mapflag nopenalty 06guild_02 mapflag nopenalty 06guild_03 mapflag nopenalty 06guild_04 mapflag nopenalty 06guild_05 mapflag nopenalty 06guild_06 mapflag nopenalty 06guild_07 mapflag nopenalty 06guild_08 mapflag nopenalty getting alot of bug and error using this. 1 error is like this [Debug]: mapindex_name2id: Map "" not found in index list!
  5. Thank you it works for me too! but i have question im using Euphy WoE Controller and it has lines like this, do I need to change this lines too? function Disp_Owner { set [email protected], getcastledata(getarg(0),1); if ([email protected]) announce "The ["+getcastlename(getarg(0))+"] castle "+((getarg(1))?"has been conquered":"is currently held")+" by the ["+getguildinfo(GUILDINFO_NAME, [email protected])+"] guild.",bc_all|bc_woe; else announce "The ["+getcastlename(getarg(0))+"] castle is currently unoccupied.",bc_all|bc_woe; return; } I applied the changes on my woe-fe/agit_main.txt and it works but the euphy woe controller from my custom/ folder makes me confused o-o do i need to disable the agit_main? and change the announce line in euphy script instead?
  6. Before this error, I can login normally, after I remove and changed my dll files from my client side. I get failed to connect to the server after character select, and then I restarted the server using ./athena-start restart then I cannot connect to my map server.. Its always [Fatal Error]: Connection to char-server failed 3. I have same userid passwd at my conf files and sql login [Error]: Sent wrong packet id: 0x2711 [Error]: --- failed assertion -------------------------------------------- [Error]: socket.c:2112: '0' in function `socket_validateWfifo' [Error]: 0x556025745e15 nullpo_backtrace_print [Error]: /home/Thyro/Hercules/src/common/nullpo.c:77 [Error]: 0x556025745e15 assert_report [Error]: /home/Thyro/Hercules/src/common/nullpo.c:147 [Error]: 0x556025759c4b wfifoset [Error]: /home/Thyro/Hercules/src/common/socket.c:901 [Error]: [Status]: Done reading '255' entries in 'db/pre-re/statpoint.txt'. 0x556025738c7b login_parse_request_connection [Error]: /home/Thyro/Hercules/src/login/login.c:1473 [Error]: 0x556025734312 lclif_parse_CA_CHARSERVERCONNECT [Error]: /home/Thyro/Hercules/src/login/lclif.c:266 [Error]: 0x55602573474c lclif_parse_packet [Error]: /home/Thyro/Hercules/src/login/lclif.c:510 [Error]: 0x5560257343d1 lclif_parse [Error]: /home/Thyro/Hercules/src/login/lclif.c:419 [Error]: 0x556025758f05 do_sockets [Error]: /home/Thyro/Hercules/src/common/socket.c:1073 [Error]: 0x55602572ff61 main [Error]: /home/Thyro/Hercules/src/common/core.c:539 [Error]: 0x7f36b91412e0 ??? [Error]: ???:0 [Error]: 0x556025730149 ??? [Error]: ???:0 [Error]: 0xffffffffffffffff ??? [Error]: ???:0 [Error]: --- end failed assertion ---------------------------------------- [Error]: Can not connect to login-server. [Error]: The server communication passwords (default s1/p1) are probably invalid. [Error]: Also, please make sure your login db has the correct communication username/passwords and the gender of the account is S. [Error]: The communication passwords are set in /conf/map/map-server.conf and /conf/char/char-server.conf
  7. Anyone can help me add breaker name when aannounce who break the emperium? function Disp_Owner { set [email protected], getcastledata(getarg(0),1); if ([email protected]) announce "The ["+getcastlename(getarg(0))+"] castle "+((getarg(1))?"has been conquered":"is currently held")+" by the ["+getguildinfo(GUILDINFO_NAME, [email protected])+"] guild.",bc_all|bc_woe; else announce "The ["+getcastlename(getarg(0))+"] castle is currently unoccupied.",bc_all|bc_woe; return; } function Add_Zero { return ((getarg(0)<10)?"0":"")+getarg(0)+(getarg(1,0)?".":":")+"00"; } I tried, if ([email protected]) announce "The ["+getcastlename(getarg(0))+"] castle "+((getarg(1))?"has been conquered":"is currently held")+" by " + strcharinfo(0) + ", from ["+getguildinfo(GUILDINFO_NAME, [email protected])+"] guild.",bc_all|bc_woe; but didn't work..
  8. Anyone can help me where did this error come from? Every time I do enter my gold room script and get out the gold room map, maybe 3~5mins or so.. This error will show. I don't if its just coincidence. I will also put my Gold room script too. git hash: ed5d2d7222401f17f9c8ded96ff0e86aba8e88d6 Gold Room Script: // https://rathena.org/board/topic/108888-request-a-gold-room-drop-gold-point/ prontera,165,159,4 script Gold Room#goldroom 4_M_BARMUND,{ doevent "gold_room_main::OnTalk"; } // warp portal back prontera ordeal_3-2,155,153,4 script Gold Exit 2_M_OLDBLSMITH,{ mes "[ ^FF0000Gold Room Manager^000000 ]"; mes "Hello, I am expert at running away!"; mes "You want to leave?"; while (1) { switch(select("Yes, I'm Scared!", "Dqf? No!")) { case 1: warp "prontera" ,162,153; end; case 2: mes "[ Manager ]"; mes "Okay, Brave man!~"; close; } } } // Duplicados Warps v1.0 ordeal_3-2.gat,130,193,0 warp goldroomwrp#1 3,3,ordeal_3-2.gat,154,154 ordeal_3-2.gat,106,154,0 warp goldroomwrp#2 3,3,ordeal_3-2.gat,154,154 ordeal_3-2.gat,201,129,0 warp goldroomwrp#3 3,3,ordeal_3-2.gat,154,154 ordeal_3-2.gat,177,193,0 warp goldroomwrp#4 3,3,ordeal_3-2.gat,154,154 ordeal_3-2.gat,66,25,0 warp goldroomwrp#5 3,3,ordeal_3-2.gat,154,154 // peco peco summon ordeal_3-2,0,0,0,0 monster Golden Peco 3050,200,60000,0,"gold_room_main::OnKill" // GUARDIAN ordeal_3-2,0,0,0,0 monster Gold Guardian 3051,45,60000,0,"gold_room_main::OnKill" - script gold_room_main FAKE_NPC,{ OnInit: // gold room map .map$ = "ordeal_3-2"; // entrance fee .zeny_cost = 1000000; // rate to get gold .rate = 100; // gold random amount setarray .gold_amount,2; // setmapflag .map$,mf_noteleport; setmapflag .map$,mf_pvp; setmapflag .map$,mf_pvp_noguild; setmapflag .map$,mf_pvp_noparty; setmapflag .map$,mf_nobranch; setmapflag .map$,mf_nosave; setmapflag .map$,mf_nomemo; setmapflag .map$,mf_noreturn; setmapflag .map$,mf_nowarp; setmapflag .map$,mf_nowarpto; end; OnTalk: mes "[ ^FF0000Gold Room Manager^000000 ]"; mes "How may I serve for you ?"; mes "I can warp you to a Gold Mine."; mes "and it will only cost"; if ( .zeny_cost ) mes F_InsertComma( .zeny_cost ) + " Zeny"; next; mes "[ ^FF0000Gold Room Manager^000000 ]"; mes "A friendly reminder to our fellow gold diggers~"; mes "Exchange Gold when you're ^FF0000OVERWEIGHT^000000"; mes "Bye bye golds! GMs are not responsible for your lost."; switch ( select( "Enter Gold Room", "Exchange Gold Point(s)", "Cancel" )) { case 1: if ( Zeny < .zeny_cost ) { mes "Not enough Zeny."; } else { next; set [email protected],rand(50); set [email protected],rand(50); mes "[ ^FF0000Gold Room Manager^000000 ]"; mes "I need you to give me"; if ( .zeny_cost ) mes F_InsertComma( .zeny_cost ) + " Zeny to enter and"; mes "you need to answer the question for security check."; mes "If A = "[email protected]+" B = "[email protected]; switch( rand(1) ){ set [email protected],[email protected] + [email protected]; mes "How many is A + B ?"; next; input [email protected]; next; if( [email protected][email protected]swer ) { atcommand "@kick " + strcharinfo(0); close; break; } else if ([email protected][email protected]) { Zeny -= .zeny_cost; warp .map$,153,154; close; } end; } } break; case 2: next; mes "[ ^FF0000Gold Room Manager^000000 ]"; mes "Please check your inventory. If you're ^FF0000OVERWEIGHT^000000."; mes "your gold will be ^FF0000DROPPED^000000. GMs are not responsible for any lost!"; mes "We already warned you.."; mes "^0000FFYou got ("+F_InsertComma( #GOLDPOINTS )+") Gold Points^000000."; input [email protected],0,#GOLDPOINTS; if ( checkweight( 969, [email protected] ) ) { #GOLDPOINTS -= [email protected]; getitem 969,[email protected]; mes "Gained "[email protected]+" Gold."; } else { mes "[ ^FF0000Gold Room Manager^000000 ]"; mes "Sorry your transaction failed."; next; mes "[ ^FF0000Gold Room Manager^000000 ]"; mes "You have to farm gold to exchange."; mes "Please input Gold you wanted to exchange."; } default: break; } close; OnKill: if ( .rate ) { [email protected] = rand(1, .gold_amount[0]); #GOLDPOINTS += [email protected]; dispbottom "Gained "[email protected]+" Gold Point. You got "+F_InsertComma( #GOLDPOINTS )+" Gold Points now."; } end; OnPCDieEvent: if (strcharinfo(3) != "ordeal_3-2") end; #GOLDPOINTS = 0; dispbottom "You died, you lost all the Gold point(s)."; end; } // Map Flags v1.0 ordeal_3-2 mapflag nowarp //ordeal_3-2 mapflag noteleport ordeal_3-2 mapflag nobranch ordeal_3-2 mapflag nomemo ordeal_3-2 mapflag nowarpto ordeal_3-2 mapflag nopenalty ordeal_3-2 mapflag pvp_noparty ordeal_3-2 mapflag noskill ordeal_3-2 mapflag nosave ordeal_3-2 mapflag novending
  9. Heres what I found similar, it seems like its added inside the plugin https://rathena.org/board/topic/101064-security-login-message/ and this is the plugin of @security of herc //===== Hercules Plugin ====================================== //= Security //===== By: ================================================== //= by Dastgir/Hercules //===== Current Version: ===================================== //= 1.0 //===== Description: ========================================= //= Prohibits actions depending upon security level. //===== Changelog: =========================================== //= v1.0 - Initial Conversion //===== Additional Comments: ================================= //= Use NPC too along with this plugin //===== Repo Link: =========================================== //= https://github.com/dastgir/HPM-Plugins //============================================================ #include "common/hercules.h" #include <stdio.h> #include <string.h> #include <stdlib.h> #include <math.h> #include "common/HPMi.h" #include "common/nullpo.h" #include "common/memmgr.h" #include "common/mmo.h" #include "map/atcommand.h" #include "map/battle.h" #include "map/clif.h" #include "map/guild.h" #include "map/map.h" #include "map/mob.h" #include "map/npc.h" #include "map/pc.h" #include "map/storage.h" #include "map/trade.h" #include "plugins/HPMHooking.h" #include "common/HPMDataCheck.h" HPExport struct hplugin_info pinfo = { "Security", // Plugin name SERVER_TYPE_MAP,// Which server types this plugin works with? "1.0", // Plugin version HPM_VERSION, // HPM Version (don't change, macro is automatically updated) }; const char* secure = "#security"; const char* secure_opt = "#secure_opt"; #define is_secure(x) pc_readaccountreg(x, script->add_str(secure)) #define security_opt(x) pc_readaccountreg(x, script->add_str(secure_opt)) enum S_Options { //Security Options S_CANT_DROP = 0x0001, // Cannot Drop Items S_CANT_TRADE_R = 0x0002, // Cannot Receive Trade Request S_CANT_TRADE_S = 0x0004, // Cannot Send Trade Request S_CANT_OPEN_GS = 0x0008, // Cannot Open gStorage S_CANT_TAKE_GS = 0x0010, // Cannot take Item from gStorage S_CANT_ADD_GS = 0x0020, // Cannot add Item to gStorage S_CANT_SELL = 0x0040, // Cannot Sell item S_CANT_VEND = 0x0080, // Cannot Vend S_CANT_DELETE = 0x0100, // Cannot Delete Items(By Drop/delitem function) S_CANT_BUY = 0x0200, // Cannot Buy Items S_CANT_SEND_GINVITE = 0x0400, // Cannot Send Guild Invite S_CANT_RECEIVE_GINVITE = 0x0800, // Cannot Receive Guild Invite S_CANT_LEAVE_GUILD = 0x1000, // Cannot Leave Guild }; int pc_cant_drop(struct map_session_data **sd, int *n, int *amount) { // Can't Drop Items if (is_secure(*sd) > 0) { if (security_opt(*sd)&S_CANT_DROP || security_opt(*sd)&S_CANT_DELETE){ clif->message((*sd)->fd, "Security is on. You cannot drop item."); hookStop(); return 0; } } return 1; } void cant_trade(struct map_session_data **sd, struct map_session_data **target_sd){ // Can't receive/send Trade Requests if (*sd == NULL || *target_sd == NULL) return; if (is_secure(*sd) > 0) { if (security_opt(*sd) & S_CANT_TRADE_S) { //Cannot Send clif->message((*sd)->fd, "Security is on. You cannot initiate Trade."); hookStop(); return; } } if (is_secure(*target_sd) > 0) { // Cannot Receive if (security_opt(*target_sd) & S_CANT_TRADE_R) { clif->message((*sd)->fd, "Target Player Security is on, Player cannot receive Trade Requests."); hookStop(); return; } } return; } int gstorage_cant_open(struct map_session_data **sd){ if (sd==NULL) return 2; if (is_secure(*sd) > 0) { if (security_opt(*sd) & S_CANT_OPEN_GS) { clif->message((*sd)->fd, "Security is on. You cannot open gStorage."); hookStop(); return 1; } } return 0; } int gstorage_cant_add(struct map_session_data **sd, struct guild_storage **stor, struct item **item_data, int *amount) { if (*sd == NULL) return 1; if (is_secure(*sd) > 0) { if (security_opt(*sd) & S_CANT_ADD_GS) { clif->message((*sd)->fd, "Security is on. You cannot add item to gStorage."); hookStop(); return 1; } } return 0; } int gstorage_cant_take(struct map_session_data **sd, int *index, int *amount) { if (*sd == NULL) return 0; if (is_secure(*sd) > 0) { if (security_opt(*sd) & S_CANT_TAKE_GS) { clif->message((*sd)->fd, "Security is on. You cannot take item from gStorage."); hookStop(); return 0; } } return 1; } int pc_restrict_items(struct map_session_data **sd, int *n, int *amount, int *type, short *reason, e_log_pick_type *log_type){ if (*sd == NULL) return 1; if (is_secure(*sd) > 0) { if (security_opt(*sd) & S_CANT_DELETE) { clif->message((*sd)->fd, "Security is on. You cannot delete item."); hookStop(); return 1; } } return 0; } int npc_cant_sell(struct map_session_data **sd, struct itemlist **item_list) { if (*sd == NULL) return 1; if (is_secure(*sd) > 0) { if (security_opt(*sd) & S_CANT_SELL) { clif->message((*sd)->fd, "Security is on. You cannot sell item."); hookStop(); return 1; } } return 0; } int npc_cant_buy(struct map_session_data **sd, struct itemlist **item_list) { if (*sd == NULL) return 1; if (is_secure(*sd) > 0) { if (security_opt(*sd) & S_CANT_BUY) { clif->message((*sd)->fd, "Security is on. You cannot buy item."); hookStop(); return 1; } } return 0; } void open_vending(struct map_session_data **sd, int *num){ if (*sd == NULL) return; if (is_secure(*sd) > 0) { if (security_opt(*sd) & S_CANT_VEND) { clif->message((*sd)->fd, "Security is on. You cannot vend."); (*sd)->state.prevend = (*sd)->state.workinprogress = 0; hookStop(); return; } } return; } int guild_invite_permission(struct map_session_data **sd, struct map_session_data **tsd) { if (*sd == NULL || *tsd == NULL) return 0; if (is_secure(*sd) > 0) { if (security_opt(*sd) & S_CANT_SEND_GINVITE) { clif->message((*sd)->fd, "Security is on. You cannot send Guild Invite."); hookStop(); return 0; } } if (is_secure(*tsd) > 0) { if (security_opt(*tsd) & S_CANT_RECEIVE_GINVITE) { clif->message((*sd)->fd, "Target Player Security is on, Player cannot receive Guild Invites."); hookStop(); return 0; } } return 0; } int guild_leave_permission(struct map_session_data **sd, int *guild_id, int *account_id, int *char_id, const char **mes) { if (*sd == NULL) return 0; if (is_secure(*sd) > 0) { if (security_opt(*sd) & S_CANT_LEAVE_GUILD) { clif->message((*sd)->fd, "Security is on. You cannot leave Guild."); hookStop(); return 0; } } return 0; } /* Server Startup */ HPExport void plugin_init(void) { addHookPre(pc, dropitem, pc_cant_drop); addHookPre(trade, request, cant_trade); addHookPre(gstorage, open, gstorage_cant_open); addHookPre(gstorage, additem, gstorage_cant_add); addHookPre(gstorage, get, gstorage_cant_take); addHookPre(gstorage, gettocart, gstorage_cant_take); addHookPre(pc, delitem, pc_restrict_items); addHookPre(npc, selllist, npc_cant_sell); addHookPre(npc, buylist, npc_cant_buy); addHookPre(clif, openvendingreq, open_vending); addHookPre(guild, invite, guild_invite_permission); addHookPre(guild, leave, guild_leave_permission); } HPExport void server_online(void) { ShowInfo("'%s' Plugin by Dastgir/Hercules. Version '%s'\n", pinfo.name, pinfo.version); }
  10. If anyone gets interested with this, i got alternate solution i used callfunc heres the script //== Starter Scroll Buffs ====================================== function script R_Scroll1 { specialeffect(EF_INCAGILITY, AREA, playerattached()); sc_start SC_INC_AGI,240000,10; specialeffect(EF_BLESSING, AREA, playerattached()); sc_start SC_BLESSING,240000,10; end; } function script R_Scroll100 { specialeffect(EF_INCAGILITY, AREA, playerattached()); sc_start SC_INC_AGI,240000,10; specialeffect(EF_BLESSING, AREA, playerattached()); sc_start SC_BLESSING,240000,10; specialeffect(EF_CONCENTRATION, AREA, playerattached()); sc_start SC_CONCENTRATION,240000,10; end; } function script R_Scroll200 { specialeffect(EF_INCAGILITY, AREA, playerattached()); sc_start SC_INC_AGI,240000,10; specialeffect(EF_BLESSING, AREA, playerattached()); sc_start SC_BLESSING,240000,10; specialeffect(EF_CONCENTRATION, AREA, playerattached()); sc_start SC_CONCENTRATION,240000,10; specialeffect(EF_ASSUMPTIO, AREA, playerattached()); sc_start SC_ASSUMPTIO,200000,10; end; } item_db2 { Id: 30000 AegisName: "Level200BuffScroll" Name: "Level 200 All-in-One Buff Scroll" Type: "IT_USABLE" Buy: 2 Weight: 10 EquipLv: 200 Trade: { nodrop: true notrade: true noselltonpc: true nocart: true nogstorage: true nomail: true noauction: true } Nouse: { sitting: true } Script: <" callfunc "R_Scroll200",1; "> },
  11. Anyone i know this is too much script, may I just know how can I connect when the Thanatos Dies and Thatnatos Fragment availability to the script so the npc will announce? Thank you!
  12. Thank you for this. I will just make separate item scroll then 🤩
  13. I have this working security script, but I want to make like it will dispbottom the player he has security ON or OFF instead of forcing player to setup security once he/she logged in to the game.. On this script, you have choices as GM to force player to setup security to their account which it will always pop up a npc window for setting up security I just want that even i don't force the player to setup their @security. They will know by getting dispbottom that their Security is ON or OFF. also this makes the player knows that the server has security features. For me, npc pop up for force setup security is a very annoying. heres the script i used. /* By Dastgir/Hercules Use Plugin too along with this script(Found in https://github.com/dastgir/HPM-Plugins) */ - script Security FAKE_NPC,{ OnInit: bindatcmd("security",strnpcinfo(0)+"::OnSecurity",0,99); /* Config */ .max_attempt = 5; //3 Times Wrong Attempt = Ban. .ban_hour = 2; //Hours to ban .allowed = 1|2|4|8|64|128|512|1024|2048|4096; //Allowed Settings.. end; OnPCLoginEvent: if ($security){ if (!#security){ callsub OnPlayerMenu; } } close; OnSecurity: if (getgmlevel()){ mes "[^FFA500 Security System ^000000]"; mes "Hello GM, How may I help you?"; callsub OnGMMenu; end; } OnPlayerMenu: // Don't Change Order. setarray [email protected]$,"Can't Drop Item", // 1 "Can't receive Trade Requests", // 2 "Can't send Trade Request", // 4 "Can't open Guild Storage", // 8 "Can't take item from guild storage", // 16 "Can't add item to guild storage", // 32 "Can't sell items", // 64 "Can't use Vending", // 128 "Can't delete items by any means", // 256 "Can't buy items", // 512 "Can't Send Guild Invite", // 1024 "Can't Receive Guild Invite", // 2048 "Can't Leave the guild"; // 4096 while (1){ mes "[^FFA500 Security System ^000000]"; mes "Security Status: "+ ((#security>0)?"^00FF00On^000000":"^FF0000Off^000000"); mes "Status: "; for ([email protected] = 0; [email protected] < getarraysize([email protected]$); [email protected]++){ [email protected] = (1<<[email protected]); if (.allowed&[email protected]) mes [email protected]$[[email protected]] + " - "+ ((#secure_opt&[email protected])?"^00FF00On^000000":"^FF0000Off^000000"); } switch(select("Info",((#security>0)?"Dea":"A")+"ctivate the Security","Settings","Close")){ case 4: close; case 3: next; mes "[^FFA500 Security System ^000000]"; if (!#security){ mes "^FF0000You don't have security enabled^000000"; next; break; } mes "Enter your ^FF0000OLD^000000 Security Code"; mes "^FF0000- Wrong Code more than "+ .max_attempt +" times can result into ban.^000000"; mes "Chances Left: "+ (.max_attempt-security_maxtry); input [email protected]; next; mes "[^FFA500 Security System ^000000]"; if (#secure_code != [email protected]){ mes "Wrong Code..."; security_maxtry++; if (security_maxtry >= .max_attempt){ atcommand "@ban +"+.ban_hour+"h \""+strcharinfo(0)+"\""; //Ban the Player for 1 hour. security_maxtry = 0; //Reset After tha Ban end; } close; } next; security_maxtry = 0; mes "[^FFA500 Security System ^000000]"; mes "Choose Restrictions to Enable/Disable"; [email protected]$ = "^00FF00Enable All^000000:^FF0000Disable All^000000:"; [email protected] = 0; for ([email protected] = 0; [email protected] < getarraysize([email protected]$); [email protected]++){ [email protected] = (1<<[email protected]); if (.allowed&[email protected]){ [email protected][[email protected]] = [email protected]; [email protected]++; [email protected]$ = [email protected]$[[email protected]] + " - "+ ((#secure_opt&[email protected])?"^00FF00On^000000":"^FF0000Off^000000"); [email protected]$ = [email protected]$ + "" + [email protected]$ +":"; mes [email protected]$; } } [email protected]_menu = select([email protected]$)-1; next; if ([email protected]_menu == 1){ mes "[^FFA500 Security System ^000000]"; if (!#secure_opt){ mes "You already have all Settings disabled."; next; break; } mes "Are you Sure you want to disable all?"; if (select("Yes:No..") == 2){ next; mes "[^FFA500 Security System ^000000]"; mes "As you wish.."; next; break; } next; mes "[^FFA500 Security System ^000000]"; mes "All Settings Disabled"; #secure_opt = 0; next; break; } else if ([email protected]_menu == 0){ mes "[^FFA500 Security System ^000000]"; if (#secure_opt >= .allowed){ mes "You already have all Settings enabled."; next; break; } mes "Are you Sure you want to enable all?"; if (select("Yes:No..") == 2){ next; mes "[^FFA500 Security System ^000000]"; mes "As you wish.."; next; break; } next; mes "[^FFA500 Security System ^000000]"; mes "All Settings Enabled"; #secure_opt = .allowed; next; break; } [email protected]_menu -= 2; [email protected] = [email protected][[email protected]_menu]; mes "[^FFA500 Security System ^000000]"; mes [email protected]$[[email protected]]; mes "Are you sure you want to "+ ((#secure_opt&(1<<[email protected]))?"Disable":"Enable") +" this?"; if (select("Yes:No..") == 2){ next; mes "[^FFA500 Security System ^000000]"; mes "As you wish.."; next; break; } next; mes "[^FFA500 Security System ^000000]"; mes "Setting "+ ((#secure_opt&(1<<[email protected]))?"Disabled":"Enabled"); if (#secure_opt&(1<<[email protected])) #secure_opt -= 1<<[email protected]; else #secure_opt += 1<<[email protected]; next; break; case 2: next; mes "[^FFA500 Security System ^000000]"; if (#security){ mes "Enter your ^FF0000OLD^000000 Security Code"; mes "^FF0000- Wrong Code more than "+ .max_attempt +" times can result into ban.^000000"; mes "Chances Left: "+ (.max_attempt-security_maxtry); input [email protected]; next; mes "[^FFA500 Security System ^000000]"; if (#secure_code != [email protected]){ mes "Wrong Code..."; security_maxtry++; if (security_maxtry >= .max_attempt){ atcommand "@ban +"+.ban_hour+"h \""+strcharinfo(0)+"\""; //Ban the Player for 1 hour. security_maxtry = 0; //Reset After tha Ban end; } close; } mes "Security Deactivated."; #security = 0; security_maxtry = 0; close; } mes "Insert your ^00FF00NEW^000000 Security Code"; mes "^FF0000- Must be 4-8 Digits^000000"; mes "^FF0000- Only numerics are allowed(0-9)^000000"; mes "^FF0000- Don't use 0 in beginning of security code^000000"; input [email protected]; next; mes "[^FFA500 Security System ^000000]"; if ([email protected] < 1000 || [email protected] > 99999999){ mes "Security code must be of 4-8 digits."; next; break; } mes "^00FF00 Re-insert the Security Code ^000000"; input [email protected]; next; mes "[^FFA500 Security System ^000000]"; if ([email protected] != [email protected]){ mes "Security Code Mismatch.."; next; break; } mes "Security Code Set"; #secure_code = [email protected]; #security = 1; next; break; case 1: next; mes "[^FFA500 Security System ^000000]"; mes "Security Code can be of 4-8 Digits."; mes "When Security Code is enabled, you can do following settings as a security step:"; for ([email protected] = 0; [email protected] < getarraysize([email protected]$); [email protected]++){ [email protected] = (1<<[email protected]); if (.allowed&[email protected]) mes "^FF0000- "+ [email protected]$[[email protected]] +"^000000"; } next; break; } } end; OnGMMenu: switch(select("Player Menu: Settings")){ case 1: next; callsub OnPlayerMenu; end; case 2: next; mes "[^FFA500 Security System ^000000]"; mes "Force Player to set @security?"; mes "Status: "+ (($security>0)?"^00FF00On^000000":"^FF0000Off^000000"); [email protected] = select((($security>0)?"^00FF00Disable^000000":"^FF0000Enable^000000"),"Cancel"); if ([email protected] == 2) close; next; mes "[^FFA500 Security System ^000000]"; if ($security) $security = 0; else $security = 1; mes "Force Security Setting Set."; close; } end; } Thank you!
×
×
  • Create New...

Important Information

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