Jump to content

Yami

Members
  • Posts

    111
  • Joined

  • Last visited

Everything posted by Yami

  1. Hi there, I'm currently using a script for PK Point System in my server. The script goes like this. If player 1 killed player 2. Player 1 will get 3 PK Points from Player 2, regardless if player 2 doesnt have enough PK Points to give. In continuation, Player 2 loses 2 PK Points if he/she dies. But if he/she has less than 2 PK Point, he/she wont lose any point. BUT! If player 1 kills player 2 again, he SHOULD NOT GET any PK Point. And player 2 SHOULD NOT LOSE any PK Point either. I believe my script has a 3 minutes Cooldown for antispam. But for an unknown reason, players are getting PK Points on every kill (without 3 minutes delay) Can someone please fix my script. I don't really know what's wrong with the script at this moment. Here's the script: - script PK Point System -1,{ OnPCKillEvent: if(strcharinfo(3) != "pvp_n_2-5") end; if(@LastKilled == killedrid) end; set .@Killer,getcharid(3); set .@Killed,killedrid; detachrid; if(attachrid(.@Killed)){ if(#PKPOINTS){ if(#PKPOINTS <= 2) end; set #PKPOINTS,#PKPOINTS-2; dispbottom "You Lost 2 PK Point from "+rid2name(.@Killer); dispbottom "Current PK Points : "+#PKPOINTS+" "; detachrid; if(attachrid(.@Killer)){ set #PKPOINTS,#PKPOINTS+3; dispbottom "You Gained 3 PK Point from "+rid2name(.@Killed); dispbottom "Current PK Points : "+#PKPOINTS+" "; set @LastKilled,.@Killed; attachnpctimer; initnpctimer; } } else { detachrid; if(attachrid(.@Killer)){ //dispbottom "No PK Point to take from "+rid2name(.@Killed); set #PKPOINTS,#PKPOINTS+3; dispbottom "You Gained 3 PK Point from "+rid2name(.@Killed); dispbottom "Current PK Points : "+#PKPOINTS+" "; attachnpctimer; initnpctimer; } } } end; } OnTimer180000: set @LastKilled,0; stopnpctimer; detachnpctimer; end; }
  2. Thanks @okuz! I've done the script in a different way and is working perfectly now. Thank you for you help!
  3. Thank you @okuz! But this line make it not work, I don't know what's wrong here. switch ( select ( "Most Kills","Highest Streak","Longest Ownage","Own Information","Explanation",((getgmlevel()==99)?"Reset Ladder":"") ) ) {
  4. @okuz thank you! it worked! now just need to restrict the option to lvl 99 gms only thank you!
  5. It really doesn't work @okuz, thats exactly how I did it. NPC can't be clicked. I tested it, just now. I believe the problem is this line: switch ( select ( "Most Kills","Highest Streak","Longest Ownage","Own Information","Explanation",((getgmlevel()==99)?"Reset Ladder":"") ) ) { Because I tried the no getgmlevel check menu (seen below this). The NPC worked. But when I choose reset ladder it will just bring me back to the menu. Because I haven't added the case 6 script yet. switch ( select ( "Most Kills","Highest Streak","Longest Ownage","Own Information","Explanation","Reset Ladder" ) ) { But when I add this case 6 script, I can't click the NPC anymore. case 6: truncate table `pvpladder`; truncate table `ownladder`; mes "DONE!"; break; Basically both codes didn't work. Does anyone have a different way on making this? GM lvl 99 only, will get to see the "Reset Ladder" option in the menu. And how to reset that sql table of the ladder itself.
  6. The script didn't work. No error but the whole ladder npc can't be clicked anymore. Maybe there's another way in resetting?
  7. Will test this script ASAP! Thanks @technoken!
  8. Thanks for the reply @technoken. But looking at this manual resetting, I dont think it's locked for gm lvl 99 only. Then it would be available for all players to reset the ladder. Can you add the needed script for this? Reset only for GM lvl 99. Thank you in advance!
  9. Hi, I'm using this PVP Announcement and Ladder Script. Can someone please help me add an option to reset the Ladder please? I'm planning on resetting the ladder every month to monitor players' progress. Thank you in advance! Here's the script: //===== eAthena Script ======================================================= //= PVP ladder script with dota announcement ( SQL only ) //===== By: ================================================================== //= ~AnnieRuru~ //===== Current Version: ===================================================== //= 2.9 //===== Compatible With: ===================================================== //= eAthena SQL 14279, with MySQL 5.1 //===== Description: ========================================================= //= PVP ladder store in SQL table //= plus anti-sit-killer feature //===== Topic ================================================================ //= http://www.eathena.ws/board/index.php?showtopic=177918 //===== Additional Comments: ================================================= //= still don't have modify value option, will be done ... in next year ... //============================================================================ // add all the maps that you want this script to trigger ... all pvp and event maps perhaps ? // but if you already enable "all" maps, then can comment all these guild_vs1 mapflag loadevent guild_vs2 mapflag loadevent guild_vs3 mapflag loadevent guild_vs4 mapflag loadevent guild_vs5 mapflag loadevent - script DOTAPVP -1,{ OnInit: // Config set .sound, 0; // soundeffect : 0 - disable, 1 - play soundeffect to all players on map, 2 - play soundeffect to an area around the killer, 3 - play soundeffect to killer only set .announce, 0; // announce to : 0 - global, 1 - map set .announcemap, 0; // announce the map name in the announcement ? : 0 - off, 1 - on set .announcekill, 1; // announce who pawn who's head : 0 - off, 1 - on set .msg_die, 0; // show message who kill you when die : 0 - off, 1 - on set .msg_kill, 0; // show message you kill who when killed someone : 0 - off, 1 - on set .gmnokill, 2; // GMs are not suppose to kill players. A GM with <this number> level or higher will do nothing. IF set to 60, GM60 and above kill any player will not get anything : 0 - off set .killingspree, 3; set .dominating, 4; set .megakill, 5; set .unstoppable, 6; set .wickedsick, 7; set .monsterkill, 8; set .godlike, 9; set .holyshit, 10; set .continue, 1; // after beyond-godlike, every <this number> kills will make announcement again set .owned, 5; // how many times the party/guild has to kill to announce ownage set .owncontinue, 10; // after ownage, every <this number> party/guild cumulative kills will make ownage announce again set .min_gm_menu, 90; // minimum level of GM can use the GM menu on ladder npc set .showtotal, 10; // show the length of ladder. Note : Maximum value = 128 set .showpage, 10; // set the views per page. Note : Maximum value = 128 set .loweststreak, 5; // mininum streak count allow to show in highest streak ladder. Default 3 means must at least have killing spree streak to display in ladder set .lowestownage, 5; // mininum ownage count allow to show in longest ownage ladder. Default 5 means must at least have 5 ownage counts to display in ladder setarray .maptrigger$, // only these maps will trigger this script "all", // uncomment this to allow load all maps "guild_vs1", "guild_vs2", "guild_vs3", "guild_vs4", "guild_vs5"; // anti-sit-killer system // a player must kill another player with this minimum <this number> base level to get the announcement and in the ladder. // Otherwise only have streak ended announcement and killed player's streak reset. // Its possible for a level 1 novice to kill a level 99 player and he/she will still get in the ladder // but a level 99 kill a level 1 player will get nothing // 0 - off this system ( default is 55, pk setting ) set .lvltokill, 150; // when a player kill another same player <this number> times in a row, the player is warp back to save point. // and the player's streak, kills, and ownage count will deduct accordingly // 0 - off this system set .counttopunish, 6; // minimum level range to kill another player // eg. when set to 20, player level 99 needs to kill another player with minimum level of 79 to get announcement and increase the kill rank. // but a player with base level 50 kills a level 99 will also get the announcement // higher base level cannot kill lower level, but lower level can kill higher level // 0 - off this system set .minlvlrange, 1; // Config ends ------------------------------------------------------------------------------------------ // to prevent bug happen if ( .announce < 0 || .announce > 1 ) set .announce, 0; if ( .continue < 1 ) set .continue, 1; if ( .owncontinue < 1 ) set .owncontinue, 1; if ( .gmnokill <= 0 ) set .gmnokill, 100; if ( .lvltokill <= 1 ) set .lvltokill, 0; if ( .counttopunish <= 1 ) set .counttopunish, 0; set .maptriggersize, getarraysize(.maptrigger$); end; // script start. OnPCKillEvent: if ( getgmlevel() >= .gmnokill ) end; getmapxy .@map$, .@x, .@y, 0; if ( .maptrigger$ != "all" ) { for ( set .@i, 0; .@i < .maptriggersize; set .@i, .@i +1 ) { if ( .@map$ == .maptrigger$[.@i] ) break; } if ( .@i == .maptriggersize ) end; } attachrid killedrid; if ( killerrid != getcharid(3) && ( .msg_die || .msg_kill ) ) { if ( .msg_die ) message strcharinfo(0),"You have been killed by "+ rid2name(killerrid); if ( .msg_kill ) message rid2name(killerrid),"You just killed "+ strcharinfo(0); } if ( @PlayersKilledStreak >= .holyshit ) set .@streakname$,"Beyond Godlike"; else if ( @PlayersKilledStreak >= .godlike ) set .@streakname$,"Godlike"; else if ( @PlayersKilledStreak >= .monsterkill ) set .@streakname$,"Monster Kill"; else if ( @PlayersKilledStreak >= .wickedsick ) set .@streakname$,"Wicked Sick"; else if ( @PlayersKilledStreak >= .unstoppable ) set .@streakname$,"Unstoppable"; else if ( @PlayersKilledStreak >= .megakill ) set .@streakname$,"Mega-kill"; else if ( @PlayersKilledStreak >= .dominating ) set .@streakname$,"Dominating"; else if ( @PlayersKilledStreak >= .killingspree ) set .@streakname$,"Killing Spree"; if ( @PlayersKilledStreak >= .killingspree && killerrid == getcharid(3) ) announce strcharinfo(0) +" has ended "+( (sex)?"him":"her" )+" own "+ .@streakname$ +"["+ @PlayersKilledStreak +"] streak "+( (.announcemap)?("at "+ .@map$):""),16|.announce; else if ( @PlayersKilledStreak >= .killingspree ) announce rid2name(killerrid) +" has ended "+ strcharinfo(0) +"'s "+ .@streakname$ +"["+ @PlayersKilledStreak +"] streak "+( (.announcemap)?("at "+ .@map$):""),16|.announce; else if ( .announcekill && killerrid != getcharid(3) ) announce rid2name(killerrid) +" has pawned "+ strcharinfo(0) +" "+( (.announcemap)?("at "+ .@map$):""),16|.announce; set @PlayersKilledStreak,0; set @dota_sql_deaths, @dota_sql_deaths +1; set @dota_multikills,0; query_sql "replace into pvpladder values ( "+ getcharid(0) +", '"+ escape_sql(strcharinfo(0)) +"', "+ @dota_sql_streaks +", "+ @dota_sql_kills +", "+ @dota_sql_deaths +", from_unixtime("+ @dota_sql_streaktime +") )"; set .@killed_gid, getcharid(2); if ( .@killed_gid ) { setd ".dota_sql_"+ .@killed_gid +"_c", 0; if ( getd(".dota_sql_"+ .@killed_gid +"_h") ) query_sql "replace into ownladder values ( "+ .@killed_gid +", '"+ escape_sql(getguildname(.@killed_gid)) +"', "+ getd(".dota_sql_"+ .@killed_gid +"_c") +", "+ getd(".dota_sql_"+ .@killed_gid +"_h") +", from_unixtime("+ getd(".dota_sql_"+ .@killed_gid +"_t") +") )"; } if ( killerrid == getcharid(3) || baselevel < .lvltokill ) end; if ( .minlvlrange ) set .@killedlvl, baselevel; attachrid killerrid; if ( .minlvlrange && .@killedlvl + .minlvlrange < baselevel ) end; if ( .counttopunish ) { if ( @sitkillminute != gettime(2) ) { deletearray @sitkillid, 128; deletearray @sitkilltimes, 128; set @sitkillminute, gettime(2); } set .@sitkillsize, getarraysize(@sitkillid); for ( set .@i,0; .@i < .@sitkillsize; set .@i, .@i +1 ) { if ( @sitkillid[.@i] != killedrid ) continue; else { set @sitkilltimes[.@i], @sitkilltimes[.@i] +1 ; if ( @sitkilltimes[.@i] >= .counttopunish ) { warp "SavePoint",0,0; announce strcharinfo(0) +" , Stop killing "+ rid2name(killedrid) + " !!!",0; debugmes strcharinfo(0) +" is sit-killing "+ rid2name(killedrid) +" for "+ @sitkilltimes[.@i] + " times"; logmes "is sit-killing "+ rid2name(killedrid) +" for "+ @sitkilltimes[.@i] +" times"; if ( @PlayersKilledStreak == @dota_sql_streaks ) { set @dota_sql_streaks, @dota_sql_streaks +1 - .counttopunish; set @dota_sql_streaktime, gettimetick(2); } set @PlayersKilledStreak, @PlayersKilledStreak +1 - .counttopunish; set @dota_sql_kills, @dota_sql_kills +1 - .counttopunish; query_sql "replace into pvpladder values ( "+ getcharid(0) +", '"+ escape_sql(strcharinfo(0)) +"', "+ @dota_sql_streaks +", "+ @dota_sql_kills +", "+ @dota_sql_deaths +", from_unixtime("+ @dota_sql_streaktime +") )"; set .@killer_gid, getcharid(2); if ( .@killer_gid ) { if ( getd(".dota_sql_"+ .@killer_gid +"_c") == getd(".dota_sql_"+ .@killer_gid +"_h") ) { setd ".dota_sql_"+ .@killer_gid +"_h", getd(".dota_sql_"+ .@killer_gid +"_h") +1 - .counttopunish; setd ".dota_sql_"+ .@killer_gid +"_t", gettimetick(2); } setd (".dota_sql_"+ .@killer_gid +"_c"), getd(".dota_sql_"+ .@killer_gid +"_c") +1 - .counttopunish; query_sql "replace into ownladder values ( "+ .@killer_gid +", '"+ escape_sql(getguildname(.@killer_gid)) +"', "+ getd(".dota_sql_"+ .@killer_gid +"_c") +", "+ getd(".dota_sql_"+ .@killer_gid +"_h") +", from_unixtime("+ getd(".dota_sql_"+ .@killer_gid +"_t") +") )"; } end; } break; } } if ( .@i == .@sitkillsize ) { set @sitkillid[.@i], killedrid; set @sitkilltimes[.@i], 1; } } set @PlayersKilledStreak, @PlayersKilledStreak +1 ; set @dota_sql_kills, @dota_sql_kills +1 ; if ( @PlayersKilledStreak > @dota_sql_streaks ) { set @dota_sql_streaks, @PlayersKilledStreak; set @dota_sql_streaktime, gettimetick(2); } query_sql "replace into pvpladder values ( "+ getcharid(0) +", '"+ escape_sql(strcharinfo(0)) +"', "+ @dota_sql_streaks +", "+ @dota_sql_kills +", "+ @dota_sql_deaths +", from_unixtime("+ @dota_sql_streaktime +") )"; if ( @PlayersKilledStreak == .killingspree ) setarray .@streakname$,"killingspree.wav","is on a KILLING SPREE","!"; else if ( @PlayersKilledStreak == .dominating ) setarray .@streakname$,"dominating.wav","is DOMINATING","!"; else if ( @PlayersKilledStreak == .megakill ) setarray .@streakname$,"megakill.wav","has a MEGA KILL","!"; else if ( @PlayersKilledStreak == .unstoppable ) setarray .@streakname$,"unstoppable.wav","is UNSTOPPABLE","!!"; else if ( @PlayersKilledStreak == .wickedsick ) setarray .@streakname$,"wickedsick.wav","is WICKED SICK","!!"; else if ( @PlayersKilledStreak == .monsterkill ) setarray .@streakname$,"monsterkill.wav","has a MONSTER KILL","!!"; else if ( @PlayersKilledStreak == .godlike ) setarray .@streakname$,"godlike.wav","is GODLIKE","!!!"; else if ( @PlayersKilledStreak >= .holyshit && ( (@PlayersKilledStreak - .holyshit) % .continue == 0 ) ) setarray .@streakname$,"holyshit.wav","is BEYOND GODLIKE",". Someone KILL "+( (sex)?"HIM":"HER" ) +"!!!!!!"; if ( .@streakname$[1] != "" ) { announce strcharinfo(0) +" "+ .@streakname$[1] +"["+ @PlayersKilledStreak +"] "+( (.announcemap)?("at "+ .@map$):"") + .@streakname$[2],16|.announce; if ( .sound == 1 ) soundeffectall .@streakname$[0],0,.@map$; else if ( .sound == 2 ) soundeffectall .@streakname$[0],0; else if ( .sound == 3 ) soundeffect .@streakname$[0],0; } set @dota_multikills, @dota_multikills + 1; deltimer "DOTAPVP::OnStreakReset"; addtimer 18000,"DOTAPVP::OnStreakReset"; set .@killer_gid, getcharid(2); if ( .@killer_gid && .@killer_gid != .@killed_gid ) { setd ".dota_sql_"+ .@killer_gid +"_c", getd(".dota_sql_"+ .@killer_gid +"_c") +1 ; if ( getd(".dota_sql_"+ .@killer_gid +"_c") > getd(".dota_sql_"+ .@killer_gid +"_h") ) { setd ".dota_sql_"+ .@killer_gid +"_h", getd(".dota_sql_"+ .@killer_gid +"_c"); setd ".dota_sql_"+ .@killer_gid +"_t", gettimetick(2); } query_sql "replace into ownladder values ( "+ .@killer_gid +", '"+ escape_sql(getguildname(.@killer_gid)) +"', "+ getd(".dota_sql_"+ .@killer_gid +"_c") +", "+ getd(".dota_sql_"+ .@killer_gid +"_h") +", from_unixtime("+ getd(".dota_sql_"+ .@killer_gid +"_t") +") )"; } set .@dota_multikills, @dota_multikills; set .@origin, getcharid(3); sleep 1500; if ( .@killer_gid && .@killer_gid != .@killed_gid && getd(".dota_sql_"+ .@killer_gid +"_c") >= .owned && ( ( getd(".dota_sql_"+ .@killer_gid +"_c") - .owned ) % .owncontinue == 0 ) ) { if ( .announce ) mapannounce .@map$, "The guild ["+ getguildname(.@killer_gid) +"] is OWNING["+ getd(".dota_sql_"+ .@killer_gid +"_c") +"] !!!",16; else announce "The guild ["+ getguildname(.@killer_gid) +"] is OWNING["+ getd(".dota_sql_"+ .@killer_gid +"_c") +"] !!!",16; if ( .sound == 1 ) soundeffectall "ownage.wav",0,.@map$; else if ( .sound == 2 ) soundeffectall "ownage.wav",0; else if ( .sound == 3 && attachrid(.@origin) ) soundeffect "ownage.wav",0; } sleep 1250; if ( !attachrid(.@origin) ) end; if ( .@dota_multikills == 2 ) { if ( .announce ) mapannounce .@map$, strcharinfo(0) +" just got a Double Kill !",16; else announce strcharinfo(0) +" just got a Double Kill !",16; if ( .sound == 1 ) soundeffectall "doublekill.wav",0,.@map$; else if ( .sound == 2 ) soundeffectall "doublekill.wav",0; else if ( .sound == 3 ) soundeffect "doublekill.wav",0; } else if ( .@dota_multikills == 3 ) { if ( .announce ) mapannounce .@map$, strcharinfo(0) +" just got a Triple Kill !!!",16; else announce strcharinfo(0) +" just got a Triple Kill !!!",16; if ( .sound == 1 ) soundeffectall "triplekill.wav",0,.@map$; else if ( .sound == 2 ) soundeffectall "triplekill.wav",0; else if ( .sound == 3 ) soundeffect "triplekill.wav",0; } else if ( .@dota_multikills == 4 ) { if ( .announce ) mapannounce .@map$, strcharinfo(0) +" just got a Ultra Kill !!!",16; else announce strcharinfo(0) +" just got a Ultra Kill !!!",16; if ( .sound == 1 ) soundeffectall "ultrakill.wav",0,.@map$; else if ( .sound == 2 ) soundeffectall "ultrakill.wav",0; else if ( .sound == 3 ) soundeffect "ultrakill.wav",0; } else if ( .@dota_multikills >= 5 ) { if ( .announce ) mapannounce .@map$, strcharinfo(0) +" is on a Rampage !!!",16; else announce strcharinfo(0) +" is on a Rampage !!!",16; if ( .sound == 1 ) soundeffectall "rampage.wav",0,.@map$; else if ( .sound == 2 ) soundeffectall "rampage.wav",0; else if ( .sound == 3 ) soundeffect "rampage.wav",0; } end; OnStreakReset: set @dota_multikills, 0; end; OnWhisperGlobal: if ( @spam_dotapvp + 3 >= gettimetick(2) ) // 3 seconds interval so player don spam this command end; set @spam_dotapvp, gettimetick(2); if ( @dota_sql_kills == 0 && @dota_sql_deaths == 0 ) query_sql "select kills, deaths, streaks, unix_timestamp(streaktime) from pvpladder where char_id = "+ getcharid(0), @dota_sql_kills, @dota_sql_deaths, @dota_sql_streaks, @dota_sql_streaktime; if ( @dota_sql_kills || @dota_sql_deaths ) { dispbottom "Your current Streak : "+ @PlayersKilledStreak; dispbottom "Your total Kills : "+ @dota_sql_kills; dispbottom "Your total Deaths : "+ @dota_sql_deaths; dispbottom "Your highest Streak : "+ @dota_sql_streaks; query_sql "select date_format( from_unixtime("+ @dota_sql_streaktime +"),'%a %e/%c/%y %r')", .@time1$; dispbottom "Your highest Streak on : "+ .@time1$; } else dispbottom "You are not in the pvp ladder yet."; if ( getcharid(2) ) { if ( getd(".dota_sql_"+ getcharid(2) +"_h") == 0 ) { query_sql "select currentown, highestown, unix_timestamp(owntime) from ownladder where guild_id = "+ getcharid(2), .@c, .@h, .@t; setd ".dota_sql_"+ getcharid(2) +"_c", .@c; setd ".dota_sql_"+ getcharid(2) +"_h", .@h; setd ".dota_sql_"+ getcharid(2) +"_t", .@t; } if ( getd(".dota_sql_"+ getcharid(2) +"_h") ) { dispbottom "Your guild current Own : "+ getd(".dota_sql_"+ getcharid(2) +"_c"); dispbottom "Your guild highest Own : "+ getd(".dota_sql_"+ getcharid(2) +"_h"); query_sql "select date_format( from_unixtime("+ getvariableofnpc( getd(".dota_sql_"+ getcharid(2) +"_t"), "DOTAPVP" ) +"),'%a %e/%c/%y %r')", .@time2$; dispbottom "Your guild highest Own on : "+ .@time2$; } else dispbottom "Your guild is not in the ladder yet."; } end; OnPCLoginEvent: if ( .maptrigger$ != "all" ) end; OnPCLoadMapEvent: if ( @dota_sql_kills == 0 && @dota_sql_deaths == 0 ) { if ( .maptrigger$ != "all" ) { getmapxy .@map$, .@x, .@y, 0; for ( set .@i, 0; .@i < .maptriggersize; set .@i, .@i +1 ) { if ( .@map$ == .maptrigger$[.@i] ) break; } if ( .@i == .maptriggersize ) end; } query_sql "select kills, deaths, streaks, unix_timestamp(streaktime) from pvpladder where char_id = "+ getcharid(0), @dota_sql_kills, @dota_sql_deaths, @dota_sql_streaks, @dota_sql_streaktime; } if ( getcharid(2) && getd(".dota_sql_"+ getcharid(2) +"_h") == 0 ) { query_sql "select currentown, highestown, unix_timestamp(owntime) from ownladder where guild_id = "+ getcharid(2), .@c, .@h, .@t; setd ".dota_sql_"+ getcharid(2) +"_c", .@c; setd ".dota_sql_"+ getcharid(2) +"_h", .@h; setd ".dota_sql_"+ getcharid(2) +"_t", .@t; } end; } prontera,145,184,5 script PVP Ladder 837,{ set .@npcname$, strnpcinfo(0); while (1) { mes "["+ .@npcname$ +"]"; mes "Hello "+ strcharinfo(0) +"..."; mes "If you want to I can show you your PVP stats."; next; switch ( select ( "Most Kills","Highest Streak","Longest Ownage","Own Information","Explanation" ) ) { case 1: set .@nb, query_sql("select name, kills, deaths from pvpladder order by kills desc limit "+ getvariableofnpc(.showtotal,"DOTAPVP"), .@name$, .@kills, .@deaths); if ( .@nb == 0 ) { mes "["+ .@npcname$ +"]"; mes "The ladder currently is empty."; next; } for ( set .@j,0; .@j < .@nb; set .@j, .@j + getvariableofnpc(.showpage,"DOTAPVP") ) { mes "["+ .@npcname$ +"]"; for ( set .@i, .@j; .@i < (getvariableofnpc(.showpage,"DOTAPVP") + .@j) && .@i < .@nb; set .@i, .@i + 1 ) { mes "^996600"+ (.@i+1) +": ^006699"+ .@name$[.@i] +" ^00AA00["+ .@kills[.@i] +"] ^FF0000<"+ .@deaths[.@i] +">^000000"; } next; } break; case 2: set .@nb, query_sql("select name, streaks, date_format(streaktime,'%a %e/%c/%y %r') from pvpladder where streaks >= "+ getvariableofnpc(.loweststreak,"DOTAPVP") +" order by streaks desc limit "+ getvariableofnpc(.showtotal,"DOTAPVP"), .@name$, .@streak, .@time$); if ( .@nb == 0 ) { mes "["+ .@npcname$ +"]"; mes "The ladder currently is empty."; next; } for ( set .@j,0; .@j < .@nb; set .@j, .@j + getvariableofnpc(.showpage,"DOTAPVP") ) { mes "["+ .@npcname$ +"]"; for ( set .@i, .@j; .@i < (getvariableofnpc(.showpage,"DOTAPVP") + .@j) && .@i < .@nb; set .@i, .@i + 1 ) { mes "^996600"+ (.@i+1) +": ^006699"+ .@name$[.@i] +" ^70AC11{"+ .@streak[.@i] +"} ^000000on :"; mes " ^EE8800"+ .@time$[.@i] +"^000000"; } next; } break; case 3: set .@nb, query_sql("select name, highestown, date_format(owntime,'%a %e/%c/%y %r') from ownladder where highestown >= "+ getvariableofnpc(.lowestownage,"DOTAPVP") +" order by highestown desc limit "+ getvariableofnpc(.showtotal,"DOTAPVP"), .@name$, .@owned, .@time$); if ( .@nb == 0 ) { mes "["+ .@npcname$ +"]"; mes "The ladder currently is empty."; next; } for ( set .@j,0; .@j < .@nb; set .@j, .@j + getvariableofnpc(.showpage,"DOTAPVP") ) { mes "["+ .@npcname$ +"]"; for ( set .@i, .@j; .@i < (getvariableofnpc(.showpage,"DOTAPVP") + .@j) && .@i < .@nb; set .@i, .@i + 1 ) { mes "^996600"+ (.@i+1) +": ^006699"+ .@name$[.@i] +" ^00AAAA("+ .@owned[.@i] +") ^000000on :"; mes " ^EE8800"+ .@time$[.@i] +"^000000"; } next; } break; case 4: if ( @dota_sql_kills == 0 && @dota_sql_deaths == 0 ) query_sql "select kills, deaths, streaks, unix_timestamp(streaktime), date_format(streaktime,'%a %e/%c/%y %r') from pvpladder where char_id = "+ getcharid(0), @dota_sql_kills, @dota_sql_deaths, @dota_sql_streaks, @dota_sql_streaktime, .@time1$; mes "["+ .@npcname$ +"]"; if ( @dota_sql_kills == 0 && @dota_sql_deaths == 0 ) mes "You not yet kill any player."; else { mes "Your Current Streak : ^70AC11{"+ @PlayersKilledStreak +"}^000000"; mes "Your Total Kills : ^00AA00["+ @dota_sql_kills +"]^000000"; mes "Your Death Counts : ^FF0000<"+ @dota_sql_deaths +">^000000"; if ( @dota_sql_kills || @dota_sql_streaks ) { mes "Highest Streak was ^70AC11{"+ @dota_sql_streaks +"}^000000 on :"; query_sql "select date_format( from_unixtime("+ @dota_sql_streaktime +"),'%a %e/%c/%y %r')", .@time1$; mes " ^EE8800"+ .@time1$ +"^000000"; } } next; if ( getcharid(2) ) { if ( getvariableofnpc( getd(".dota_sql_"+ getcharid(2) +"_h"), "DOTAPVP" ) == 0 ) { query_sql "select currentown, highestown, unix_timestamp(owntime) from ownladder where guild_id = "+ getcharid(2), .@c, .@h, .@t; set getvariableofnpc( getd(".dota_sql_"+ getcharid(2) +"_c"), "DOTAPVP" ), .@c; set getvariableofnpc( getd(".dota_sql_"+ getcharid(2) +"_h"), "DOTAPVP" ), .@h; set getvariableofnpc( getd(".dota_sql_"+ getcharid(2) +"_t"), "DOTAPVP" ), .@t; } mes "["+ .@npcname$ +"]"; if ( getvariableofnpc( getd(".dota_sql_"+ getcharid(2) +"_h"), "DOTAPVP" ) == 0 ) { mes "Your guild not yet kill any player."; } else { mes "Your guild name : ^006699"+ strcharinfo(2) +"^000000"; mes "Current Owning : ^00AAAA("+ getvariableofnpc( getd(".dota_sql_"+ getcharid(2) +"_c"), "DOTAPVP" ) +")^000000"; mes "Longest Ownage was ^00AAAA("+ getvariableofnpc( getd(".dota_sql_"+ getcharid(2) +"_h"), "DOTAPVP" ) + ")^000000 on :"; query_sql "select date_format( from_unixtime("+ getvariableofnpc( getd(".dota_sql_"+ getcharid(2) +"_t"), "DOTAPVP" ) +"),'%a %e/%c/%y %r')", .@time2$; mes " ^EE8800"+ .@time2$ +"^000000"; } next; } break; case 5: mes "["+ .@npcname$ +"]"; mes "Explanation for Most Kills:"; mes " "; mes "^996600Rank. ^006699NAME ^00AA00[Total Kills] ^FF0000<Deaths>^000000"; mes " "; mes "--------------------------------"; mes " "; mes "The ^00AA00Kills^000000 added when a player kills another player."; mes " "; mes "^FF0000Deaths^000000 count increase when a player killed by another player, or suicide (eg: Grand Cross)."; mes " "; mes "A player killed by monsters, homunculus or pets will not add the kills or deaths count."; next; mes "["+ .@npcname$ +"]"; mes "Explanation for Highest Streak:"; mes " "; mes "^996600Rank. ^006699NAME ^70AC11{Highest Streak} ^000000on :"; mes " ^EE8800TIME^000000"; mes " "; mes "--------------------------------"; mes " "; mes "The ^70AC11Streak^000000 are added every time a player kills another player. It will reset upon log out, killed by another player, or suicide (eg: Sacrifice)."; mes " "; mes "Then it record in the server the ^EE8800TIME^000000 when that player got that highest streak."; mes " "; mes "A player killed by monsters, homunculus or pets will not reset the streak."; mes " "; mes "--------------------------------"; mes " "; mes "The numbers of straight kills to get these announcements are :"; mes "^70AC11"+ getvariableofnpc(.killingspree,"DOTAPVP") +"^000000 : Killing Spree"; mes "^70AC11"+ getvariableofnpc(.dominating,"DOTAPVP") +"^000000 : Dominating"; mes "^70AC11"+ getvariableofnpc(.megakill,"DOTAPVP") +"^000000 : Mega Kill"; mes "^70AC11"+ getvariableofnpc(.unstoppable,"DOTAPVP") +"^000000 : Unstoppable"; mes "^70AC11"+ getvariableofnpc(.wickedsick,"DOTAPVP") +"^000000 : Wicked Sick"; mes "^70AC11"+ getvariableofnpc(.monsterkill,"DOTAPVP") +"^000000 : Monster Kill"; mes "^70AC11"+ getvariableofnpc(.godlike,"DOTAPVP") +"^000000 : Godlike"; mes "^70AC11"+ getvariableofnpc(.holyshit,"DOTAPVP") +"^000000 : Beyond Godlike"; next; mes "["+ .@npcname$ +"]"; mes "Explanation for Longest Ownage:"; mes " "; mes "^996600Rank. ^006699NAME ^00AAAA(Longest Ownage) ^000000on :"; mes " ^EE8800TIME^000000"; mes " "; mes "--------------------------------"; mes " "; mes "The ^00AAAAOwnage^000000 added every time any guild members killed another player that doesn't belong to his/her guild. It will reset when any of the guild member was killed by ANY player, including his/her guild member."; mes " "; mes "Then it record in the server the ^EE8800TIME^000000 when the guild got that longest ownage."; mes " "; mes "If the server went under maintainance, the current ownage will survive after the server restart."; mes " "; mes "Any guild member killed by monster, homunculus or pets will not reset the ownage count."; next; if ( getvariableofnpc(.lvltokill,"DOTAPVP") ) { mes "["+ .@npcname$ +"]"; mes "You must kill another player with minimum base level of "+ getvariableofnpc(.lvltokill,"DOTAPVP") +", in order to get an announcement or get in the ladder."; mes " "; mes "It's possible for a base level 1 novice kills a base level 99 player and still can get in the ladder."; mes "However when a player level 99 kills a level 1 novice will get nothing."; next; } if ( getvariableofnpc(.counttopunish,"DOTAPVP") ) { mes "["+ .@npcname$ +"]"; mes "Some noob players try to kill the same person over and over again in hope of getting his/her name appear in the ladder."; mes "However if you trying to do the same thing on this ladder, your name will announce to the public, and your action will be recorded into the server to notify the GMs."; next; } if ( getvariableofnpc(.minlvlrange,"DOTAPVP") ) { mes "["+ .@npcname$ +"]"; mes "When you kill another player thats lower base level than you, the base level gap between you and that player must not more than "+ getvariableofnpc(.minlvlrange,"DOTAPVP") +"."; mes " "; if ( getvariableofnpc(.minlvlrange,"DOTAPVP") >= 200) mes "In other words, if your base level is 500, the player you killed must be at least level "+( 500 - getvariableofnpc(.minlvlrange,"DOTAPVP") )+" then only you will get the announcement and in the ladder."; else if ( getvariableofnpc(.minlvlrange,"DOTAPVP") >= 70) mes "In other words, if your base level is 255, the player you killed must be at least level "+( 255 - getvariableofnpc(.minlvlrange,"DOTAPVP") )+" then only you will get the announcement and in the ladder."; else mes "In other words, if your base level is 99, the player you killed must be at least level "+( 99 - getvariableofnpc(.minlvlrange,"DOTAPVP") )+" then only you will get the announcement and in the ladder."; mes "Higher base level kills lower level gets nothing, however lower level player kills higher level will get the announcement."; next; } break; } } }
  10. Hi,I would like to add a Win Count on Official Battleground script, then make an NPC for the required win count. For example, I'll set the NPC (Battleground Daily Reward) to give reward to players with 5 BG wins (Tierra,Flavius,KVM wins combined) everyday (24hour CD), I usually use this (if( #Daily != gettime(5) )) to get my daily control. Can someone help me to make this happen? Thank you in advanced! I'm using default BG scripts @ rAthena/npc/battleground.
  11. No working script like this? Any help please?
  12. I got it to work now!! But now I need help with, If someone breaks it,The Player's Guild who lasthit the Jewel will receive the reward if they're on the same map (pvp_y_8-2) instead of only the player who broke the jewel gets the reward. Thank You in advance for the help! - script izlude_king -1,{ OnClock1900: if(gettime(4)==2 || gettime(4)==4 ) { // Tue Thur //set .koe_start, 1; set .King,1; announce "The King of Izlude has begun!!", 0; monster "pvp_y_8-2",127,162,"King's Jewel",2035,1,"izlude_king::OnKoeDead"; end; } OnClock2100: if(gettime(4)==2 || gettime(4)==4 ) { // Tue Thurs if (.King != 0){ //goto OnKoeDead; set .King,0; announce "The King of Izlude is over!!", 0; killmonster "pvp_y_8-2","All"; end; } end; } OnKoeDead: set .King,0; announce "The King of Izlude is over!!", 0; announce "The current King of Izlude is " + strcharinfo(0) + "!!", 0; getitem 7608, 1; //sleep 500; //if ( .koe_start ) // monster "pvp_y_8-2",127,162,"EMPERIUM",1288,1,"KoE::OnKoeDead"; end; } // End of Script
  13. But sir emistry, the script is not working, its been on my server for 4 days now and it hasn't activated even once since. Can you check the script if there's something wrong with it and why it's not working.
  14. Can someone give me an automated poring race script? Thank you
  15. I'll share this script that I found before. Still being used in my server. Just change the config to your server's configuration and reward that you want to give them. - script max_lv 99,{ // Configuration OnInit: .max_base = 175; .max_job = 60; .item_id = 19721; .amount = 1; end; // Script OnPCBaseLvUpEvent: OnPCJobLvUpEvent: // Determine if Base Level and Job Level are max if ( #helm == 0 && BaseLevel == .max_base && JobLevel == .max_job) { // Receive reward dispbottom "You reached 175/60! Here's Your Reward."; getitembound .item_id, .amount,Bound_Account; set #helm,1; } end; } Change this if ( #helm == 0 && BaseLevel == .max_base && JobLevel == .max_job) { // Receive reward dispbottom "You reached 175/60! Here's Your Reward."; getitembound .item_id, .amount,Bound_Account; set #helm,1; to this if ( BaseLevel == .max_base && JobLevel == .max_job) { // Receive reward dispbottom "You reached 99/70! Here's Your Reward."; getitembound .item_id, .amount,Bound_Account;
  16. Hi I have Mr. Sandox's Poring Race script, I tried to have it start automatically every 2 hours but fails to start anyway. No errors, No nothing but doesn't start on the hour set. Here's the script with a bit of editing for my Server. As you can see, I have followed the instructions provided at his link, also hours are set. I have no Idea why it's still not starting by any chance without errors or anything. //======Name======================================== // Poring Race //======Version===================================== // 1.0 //======Author(s)=================================== // Sandbox //======Comments==================================== // In loving memory of AstralRO //================================================== //======================================Race Trigger Function========================================= //==================================================================================================== - script praced#disable -1,{ OnInit: disablenpc "PWarper"; disablenpc "Bet Manager"; end; } prontera,156,172,4 warp PWarper 2,2,p_track02,43,41 - script PRaceStart -1,{ OnMinute27: if(gettime(3) == 1 || gettime(3) == 3 || gettime(3) == 5 || gettime(3) == 7 || gettime(3) == 9 || gettime(3) == 11 || gettime(3) == 13 || gettime(3) == 15 || gettime(3) == 17 || gettime(3) == 19 || gettime(3) == 21 || gettime(3) == 23) donpcevent "pracetrigger::OnRaceTrigger"; end; } - script pracetrigger -1,{ OnRaceTrigger: if(agitcheck() == 1) end; enablenpc "PWarper"; announce "It's Time for Poring Race Event!",bc_all,0x7FFF00; sleep2 1000; announce "Enter the Portal in Prontera to join.",bc_all,0x7FFF00; sleep2 1000; announce "Poring Race Event will begin 2 minutes.",bc_all,0x7FFF00; announce "Enter the Portal in Prontera if You want to join.",bc_all,0x7FFF00; sleep2 90000; announce "Last 30 Seconds.",bc_all,0x7FFF00; sleep2 30000; announce "The Portal is Now Closed.",bc_all,0x7FFF00; disablenpc "PWarper"; donpcevent "Poring Race Event::OnPoringRaceStart"; end; } - script Poring Race Event -1,{ OnPoringRaceStart: set $@race,1; enablenpc "Poring#race"; movenpc "Poring#race",58,38; enablenpc "Drops#race"; movenpc "Drops#race",58,36; enablenpc "Poporing#race"; movenpc "Poporing#race",58,34; enablenpc "Marin#race"; movenpc "Marin#race",58,32; enablenpc "Pouring#race"; movenpc "Pouring#race",58,30; enablenpc "Santa Poring#race"; movenpc "Santa Poring#race",58,28; mapannounce "p_track02","The Poring Race will start in a minute.",bc_blue; enablenpc "Bet Manager"; sleep2 1500; mapannounce "p_track02","We will be collecting your bets now, when the race starts, you can't place bets anymore.",bc_blue; sleep2 1500; mapannounce "p_track02","You can talk to the Bet Manager found at the bottom right corner of the map if you want to place a bet.",bc_blue; sleep2 2000; //mapannounce "p_track02","3 minutes before the race starts..",bc_blue; //sleep2 60000; //mapannounce "p_track02","2 minutes before the race starts..",bc_blue; //sleep2 60000; mapannounce "p_track02","1 minute before the race starts..",bc_blue; sleep2 30000; mapannounce "p_track02","30 seconds before the race starts..",bc_blue; sleep2 1500; mapannounce "p_track02","We are not accepting bets anymore.",bc_blue; disablenpc "Bet Manager"; set $@race,2; sleep2 1500; mapannounce "p_track02","When the race ends, you'll have 25 minutes to claim your prizes, after that the npc closes.",bc_blue; sleep2 25000; mapannounce "p_track02","Gentlerings, get ready!",bc_blue; sleep2 5000; mapannounce "p_track02","On your mark!",bc_blue; sleep2 3000; mapannounce "p_track02","Get Set!",bc_blue; sleep2 3000; mapannounce "p_track02","GOOOOOOOOOOOOOOOOO!!!!!",bc_blue; areawarp "p_track02",58,42,76,18,"p_track02",61,32; set $@win,rand(1,6); switch($@win) { case 1: donpcevent "Poring#race::OnPoringWin"; break; case 2: donpcevent "Drops#race::OnDropsWin"; break; case 3: donpcevent "Poporing#race::OnPoporingWin"; break; case 4: donpcevent "Marin#race::OnMarinWin"; break; case 5: donpcevent "Pouring#race::OnPouringWin"; break; default: donpcevent "Santa Poring#race::OnSantaWin"; break; } donpcevent "Bet Manager::OnRaceStart"; end; } //=================================Bet Manager======================================================== //==================================================================================================== p_track02,73,22,1 script Bet Manager 109,{ mes " [ ^0000FFBet Manager^000000 ]"; mes " Hi, what would you want to do?"; menu "Place a Bet",-,"Claim Prize",Lclaim; next; if(@bet > 0) goto Lalreadybet; if($@race < 1) goto Lnorace; if($@race == 2) goto Lracestarted; mes " [ ^0000FFBet Manager^000000 ]"; mes " Where would you place your bet?"; mes " There's a 1,000,000z fee and you could only bet once."; //Edit bet type you want, by default it is set to 1,000,000z for a player to place a bet. The player can only bet once menu "Poring",-,"Drops",Ldrops,"Poporing",Lpopo,"Marin",Lmarin,"Pouring",Lpour,"Santa Poring",Lsanta; next; if(Zeny < 1000000) goto Lnenough; //Edit to match the desired bet type. mes " [ ^0000FFBet Manager^000000 ]"; mes " You've placed your bet on ^0000FFPoring^000000, Goodluck!"; set @bet,1; set Zeny,Zeny-1000000; //Edit to match the desired bet type. close; Ldrops: next; if(Zeny < 1000000) goto Lnenough; //Edit to match the desired bet type. mes " [ ^0000FFBet Manager^000000 ]"; mes " You've placed your bet on ^0000FFDrops^000000, Goodluck!"; set @bet,2; set Zeny,Zeny-1000000; //Edit to match the desired bet type. close; Lpopo: next; if(Zeny < 1000000) goto Lnenough; //Edit to match the desired bet type. mes " [ ^0000FFBet Manager^000000 ]"; mes " You've placed your bet on ^0000FFPoporing^000000, Goodluck!"; set @bet,3; set Zeny,Zeny-1000000; //Edit to match the desired bet type. close; Lmarin: next; if(Zeny < 1000000) goto Lnenough; //Edit to match the desired bet type. mes " [ ^0000FFBet Manager^000000 ]"; mes " You've placed your bet on ^0000FFMarin^000000, Goodluck!"; set @bet,4; set Zeny,Zeny-1000000; //Edit to match the desired bet type. close; Lpour: next; if(Zeny < 1000000) goto Lnenough; //Edit to match the desired bet type. mes " [ ^0000FFBet Manager^000000 ]"; mes " You've placed your bet on ^0000FFPouring^000000, Goodluck!"; set @bet,5; set Zeny,Zeny-1000000; //Edit to match the desired bet type. close; Lsanta: next; if(Zeny < 1000000) goto Lnenough;//Edit to match the desired bet type. mes " [ ^0000FFBet Manager^000000 ]"; mes " You've placed your bet on ^0000FFSanta Poring^000000, Goodluck!"; set @bet,6; set Zeny,Zeny-1000000;//Edit to match the desired bet type. close; Lnenough: next; mes " [ ^0000FFBet Manager^000000 ]"; mes " We need zeny for the race maintenance!"; //Edit to match the desired bet type. close; Lalreadybet: mes " [ ^0000FFBet Manager^000000 ]"; mes " You've already placed your bet on: ^0000FF"; switch(@bet){ case 1: mes " Poring"; break; case 2: mes " Drops"; break; case 3: mes " Poporing"; break; case 4: mes " Marin"; break; case 5: mes " Pouring"; break; case 6: mes " Santa Poring"; break; default: mes " None"; break; } mes " ^000000"; close; Lnorace: mes " [ ^0000FFBet Manager^000000 ]"; mes " There's no race being held at the moment, or it's finished already."; close; Lclaim: next; if($@race == 1) goto Lnoclaim; if($@win != @bet) goto Lnowin; mes " [ ^0000FFBet Manager^000000 ]"; mes " Congratulations! You've won!"; set @bet,0; getitem 7859,250; //Edit to the prize that you want if a bettor's bet wins. close; Lnoclaim: mes " [ ^0000FFBet Manager^000000 ]"; mes " You can't claim prizes during the bet collection process."; close; Lracestarted: mes " [ ^0000FFBet Manager^000000 ]"; mes " The race has started, you can't place bets anymore."; close; Lnowin: mes " [ ^0000FFBet Manager^000000 ]"; mes " Either you've already got your prize or the monster you've placed your bet on didn't won."; close; OnRaceStart: sleep2 1800000; set $@win,7; disablenpc "Bet Manager"; disablenpc "Poring#race"; disablenpc "Drops#race"; disablenpc "Poporing#race"; disablenpc "Marin#race"; disablenpc "Pouring#race"; disablenpc "Santa Poring#race"; end; } //======================================Race Function================================================= //==================================================================================================== p_track02,58,38,3 script Poring#race 1002,{ end; npcspeed 200; OnInit: disablenpc "Poring#race"; disablenpc "Bet Manager"; end; OnPoringWin: npcwalkto 55,38; donpcevent "Drops#race::OnDropsLose"; donpcevent "Poporing#race::OnPoporingLose"; donpcevent "Marin#race::OnMarinLose"; donpcevent "Pouring#race::OnPouringLose"; donpcevent "Santa Poring#race::OnSantaLose"; sleep2 2500; npcwalkto 52,38; sleep2 4000; npcwalkto 46,38; sleep2 2500; npcwalkto 41,38; sleep2 2500; npcwalkto 37,38; sleep2 2500; npcwalkto 30,38; sleep2 10000; mapannounce "p_track02","Poring won the Race!!",bc_blue; set $@race,0; enablenpc "Bet Manager"; npcwalkto 58,38; end; OnPoringLose: npcwalkto 53,38; sleep2 4000; npcwalkto 46,38; sleep2 2500; npcwalkto 44,38; sleep2 2500; npcwalkto 39,38; sleep2 2500; npcwalkto 36,38; sleep2 4500; npcwalkto 30,38; sleep2 3000; npcwalkto 58,38; end; } p_track02,58,36,3 script Drops#race 1113,{ end; npcspeed 200; OnInit: disablenpc "Drops#race"; end; OnDropsWin: npcwalkto 55,36; donpcevent "Poring#race::OnPoringLose"; donpcevent "Poporing#race::OnPoporingLose"; donpcevent "Marin#race::OnMarinLose"; donpcevent "Pouring#race::OnPouringLose"; donpcevent "Santa Poring#race::OnSantaLose"; sleep2 2500; npcwalkto 52,36; sleep2 4000; npcwalkto 46,36; sleep2 2500; npcwalkto 41,36; sleep2 2500; npcwalkto 37,36; sleep2 2500; npcwalkto 30,36; sleep2 10000; mapannounce "p_track02","Drops won the Race!!",bc_blue; set $@race,0; enablenpc "Bet Manager"; npcwalkto 58,36; end; OnDropsLose: npcwalkto 54,36; sleep2 4000; npcwalkto 47,36; sleep2 2500; npcwalkto 43,36; sleep2 2500; npcwalkto 37,36; sleep2 2500; npcwalkto 35,36; sleep2 4500; npcwalkto 30,36; sleep2 3000; npcwalkto 58,36; end; } p_track02,58,34,3 script Poporing#race 1031,{ end; npcspeed 200; OnInit: disablenpc "Poporing#race"; end; OnPoporingWin: npcwalkto 55,34; donpcevent "Poring#race::OnPoringLose"; donpcevent "Drops#race::OnDropsLose"; donpcevent "Marin#race::OnMarinLose"; donpcevent "Pouring#race::OnPouringLose"; donpcevent "Santa Poring#race::OnSantaLose"; sleep2 500; npcwalkto 52,34; sleep2 4000; npcwalkto 46,34; sleep2 2500; npcwalkto 41,34; sleep2 2500; npcwalkto 37,34; sleep2 2500; npcwalkto 30,34; sleep2 10000; mapannounce "p_track02","Poporing won the Race!!",bc_blue; set $@race,0; enablenpc "Bet Manager"; npcwalkto 58,34; end; OnPoporingLose: npcwalkto 54,34; sleep2 4000; npcwalkto 47,34; sleep2 2500; npcwalkto 43,34; sleep2 2500; npcwalkto 37,34; sleep2 2500; npcwalkto 34,34; sleep2 4500; npcwalkto 30,34; sleep2 3000; npcwalkto 58,34; end; } p_track02,58,32,3 script Marin#race 1242,{ end; npcspeed 200; OnInit: disablenpc "Marin#race"; end; OnMarinWin: npcwalkto 55,32; donpcevent "Poring#race::OnPoringLose"; donpcevent "Drops#race::OnDropsLose"; donpcevent "Poporing#race::OnPoporingLose"; donpcevent "Pouring#race::OnPouringLose"; donpcevent "Santa Poring#race::OnSantaLose"; sleep2 2500; npcwalkto 52,32; sleep2 4000; npcwalkto 46,32; sleep2 2500; npcwalkto 41,32; sleep2 2500; npcwalkto 37,32; sleep2 2500; npcwalkto 30,32; sleep2 10000; mapannounce "p_track02","Marin won the Race!!",bc_blue; set $@race,0; enablenpc "Bet Manager"; npcwalkto 58,32; end; OnMarinLose: npcwalkto 52,32; sleep2 4000; npcwalkto 48,32; sleep2 2500; npcwalkto 40,32; sleep2 2500; npcwalkto 37,32; sleep2 2500; npcwalkto 33,32; sleep2 4500; npcwalkto 30,32; sleep2 3000; npcwalkto 58,32; end; } p_track02,58,30,3 script Pouring#race 1894,{ end; npcspeed 200; OnInit: disablenpc "Pouring#race"; end; OnPouringWin: npcwalkto 55,30; donpcevent "Poring#race::OnPoringLose"; donpcevent "Drops#race::OnDropsLose"; donpcevent "Poporing#race::OnPoporingLose"; donpcevent "Marin#race::OnMarinLose"; donpcevent "Santa Poring#race::OnSantaLose"; sleep2 2500; npcwalkto 52,30; sleep2 4000; npcwalkto 46,30; sleep2 2500; npcwalkto 41,30; sleep2 2500; npcwalkto 37,30; sleep2 2500; npcwalkto 30,30; sleep2 10000; mapannounce "p_track02","Pouring won the Race!!",bc_blue; set $@race,0; enablenpc "Bet Manager"; npcwalkto 58,30; end; OnPouringLose: npcwalkto 50,30; sleep2 4000; npcwalkto 43,30; sleep2 2500; npcwalkto 38,30; sleep2 2500; npcwalkto 35,30; sleep2 2500; npcwalkto 31,30; sleep2 4500; npcwalkto 30,30; sleep2 3000; npcwalkto 58,30; end; } p_track02,58,28,3 script Santa Poring#race 1062,{ end; npcspeed 200; OnInit: disablenpc "Santa Poring#race"; end; OnSantaWin: npcwalkto 55,28; donpcevent "Poring#race::OnPoringLose"; donpcevent "Drops#race::OnDropsLose"; donpcevent "Poporing#race::OnPoporingLose"; donpcevent "Pouring#race::OnPouringLose"; donpcevent "Marin#race::OnMarinLose"; sleep2 2500; npcwalkto 52,28; sleep2 4000; npcwalkto 46,28; sleep2 2500; npcwalkto 41,28; sleep2 2500; npcwalkto 37,28; sleep2 4500; npcwalkto 30,28; sleep2 10000; mapannounce "p_track02","Santa Poring won the Race!!",bc_blue; set $@race,0; enablenpc "Bet Manager"; npcwalkto 58,28; end; OnSantaLose: npcwalkto 49,28; sleep2 4000; npcwalkto 48,28; sleep2 2500; npcwalkto 47,28; sleep2 2500; npcwalkto 35,28; sleep2 2500; npcwalkto 32,28; sleep2 4500; npcwalkto 30,28; sleep2 3000; npcwalkto 58,28; end; } p_track02 mapflag nowarp p_track02 mapflag nowarpto p_track02 mapflag noskill p_track02 mapflag noteleport p_track02 mapflag nomemo p_track02 mapflag nosave SavePoint p_track02 mapflag noicewall p_track02 mapflag noreturn p_track02 mapflag noloot
  17. if (.@equip_id == 22000) { //getitem2 22006,1,1,.@equip_refine,0,0,0,.@enchant,.@card3; getitem 22006,1; //Temporal_Str_Boots_ } else if (.@equip_id == 22001) { //getitem2 22009,1,1,.@equip_refine,0,0,0,.@enchant,.@card3; getitem 22009,1; //Temporal_Int_Boots_ } else if (.@equip_id == 22002) { //getitem2 22010,1,1,.@equip_refine,0,0,0,.@enchant,.@card3; getitem 22010,1; //Temporal_Agi_Boots_ } else if (.@equip_id == 22003) { //getitem2 22007,1,1,.@equip_refine,0,0,0,.@enchant,.@card3; getitem 22007,1; //Temporal_Vit_Boots_ } else if (.@equip_id == 22004) { //getitem2 22008,1,1,.@equip_refine,0,0,0,.@enchant,.@card3; getitem 22008,1; //Temporal_Dex_Boots_ } else if (.@equip_id == 22005) { //getitem2 22011,1,1,.@equip_refine,0,0,0,.@enchant,.@card3; getitem 22011,1; //Temporal_Luk_Boots_ } close; Switch the backslashes (//) with the getitem2 I recently revert it back to official setting after some research. But here's the script to help you out.
  18. I'm trying to have a Ladder NPC for my PK Points, can somebody help me with this please? And by the way, can sombody help me with the map restiction for this script too? Thank you! This is my PK Point Script: - script PvP_System -1,{ OnInit: setarray .map$[0],"bossnia_01","guild_vs5","pvp_y_8-2","aldeg_cas01","payg_cas01","gefg_cas01","prtg_cas01","schg_cas01","arug_cas01"; end; OnPCKillEvent: for(set .@i,0; .@i<getarraysize(.maps$); set .@i,.@i+1){ if(strcharinfo(3) != .map$) end; } if(@LastKilled == killedrid) end; set .@Killer,getcharid(3); set .@Killed,killedrid; detachrid; if(attachrid(.@Killed)){ if(#PKPOINTS){ if(#PKPOINTS <= 1) end; set #PKPOINTS,#PKPOINTS-2; dispbottom "You Lost 2 PK Point from "+rid2name(.@Killer); dispbottom "Current PK Points = "+#PKPOINTS+" "; //emotion e_sob,1; detachrid; if(attachrid(.@Killer)){ set #PKPOINTS,#PKPOINTS+3; dispbottom "You Gained 3 PK Point from "+rid2name(.@Killed); dispbottom "Current PK Points = "+#PKPOINTS+" "; //emotion e_meh,1; set @LastKilled,.@Killed; attachnpctimer; initnpctimer; } } else { //emotion e_sob,1; detachrid; if(attachrid(.@Killer)){ dispbottom "Sorry No PK Point to Gain from "+rid2name(.@Killed); //emotion e_meh,1; set @LastKilled,.@Killed; attachnpctimer; initnpctimer; } } } end; OnTimer180000: set @LastKilled,0; stopnpctimer; detachnpctimer; end; } Oh is it possible that the Ladder will show last character in the account that obtained the PK Point? because #PKPOINTS is account binded right?
  19. Thanks Panda! Will test this out later
  20. I just need to add some more maps in this script, I'm not really good at adding arrays. Here's the script: - script PvP_System -1,{ OnPCKillEvent: if(strcharinfo(3) != "pvp_y_8-2") end; if(@LastKilled == killedrid) end; set .@Killer,getcharid(3); set .@Killed,killedrid; detachrid; if(attachrid(.@Killed)){ if(#PKPOINTS){ if(#PKPOINTS <= 1) end; set #PKPOINTS,#PKPOINTS-2; dispbottom "You Lost 2 PK Point from "+rid2name(.@Killer); dispbottom "Current PK Points = "+#PKPOINTS+" "; //emotion e_sob,1; detachrid; if(attachrid(.@Killer)){ set #PKPOINTS,#PKPOINTS+3; dispbottom "You Gained 3 PK Point from "+rid2name(.@Killed); dispbottom "Current PK Points = "+#PKPOINTS+" "; //emotion e_meh,1; set @LastKilled,.@Killed; attachnpctimer; initnpctimer; } } else { //emotion e_sob,1; detachrid; if(attachrid(.@Killer)){ dispbottom "Sorry No PK Point to get from "+rid2name(.@Killed); //emotion e_meh,1; set @LastKilled,.@Killed; attachnpctimer; initnpctimer; } } } end; OnTimer180000: set @LastKilled,0; stopnpctimer; detachnpctimer; end; } Thank you in Advance!!
  21. I found this antibot script on an archived post. The 30 second timer for the script is not working. Can someone help me with this please? Here's the script, I edited some part of it to suit my wanting. It's just that, the timer is not working. - script AntiBot2 -1,{ //OnPCLoginEvent: // setoption 0x40, 0; // prevent abuse // end; OnCheat: dispbottom "too long"; atcommand "@kick "+strcharinfo(0); //sc_end sc_berserk; //percentheal 100,100; //setoption 0x3, 0; end; OnNPCKillEvent: if ( rand(500) ) end; // 1% chance to triggering setoption 0x3, 1; sc_start sc_berserk, 1000000000, 1; addtimer 30000, strnpcinfo(0)+"::OnCheat"; set .@respond, gettimetick(2); mes "if A = "+( .@a = rand(1,50) )+", B = "+( .@b = rand(1,50) ); setarray .@arithmetic$, "+"; mes "How many is A "+ .@arithmetic$[ .@arithmetic = rand(1) ] +" B ?"; switch ( .@arithmetic ) { default: .@answer = .@a + .@b; break; case 1: .@answer = .@a - .@b; break; case 2: .@answer = .@a * .@b; break; case 3: .@answer = .@a / .@b; } next; input .@input, -100, 100; deltimer strnpcinfo(0)+"::OnCheat"; sc_end sc_berserk; percentheal 100,100; setoption 0x3, 0; if ( gettimetick(2) > .@respond +30 ) { mes "you taken too long to answer"; atcommand "@kick "+strcharinfo(0); close; } else if ( .@input == .@answer ) { mes "Good Job"; close; } else { mes "Wrong"; atcommand "@kick "+strcharinfo(0); close; } }
  22. Oh okay! Haha thanks, I'll get back to you soon as I've tested it.
  23. Thanks Haziel, will test this now. Yes i have the mapflag for the loadevents on a different script, I tend to put all my mapflags on a seperate one so It's all in one place. Oh BTW, i think i should change the .@c into .@count as what you made.
  24. Hi, I have this script and I want to add more maps on it. Here's the script. I like to add this maps besides the one already declared, and maybe more in the future. Thank you. "prtg_cas01","schg_cas01","arug_cas01" - script GuildLimit1 -1,{ OnPCLoadMapEvent: getmapxy .@map$, .@x, .@y, 0; if ( .@map$ == "aldeg_cas01" ) { query_sql "SELECT `connect_member` FROM `guild` WHERE `guild_id` = '" +getcharid(2)+ "'",.@c; if ( .@c > 10 ) { message strcharinfo(0),"Your guild members are over the limit"; sleep2 2000; warp "prontera",156,183; } } end; }
×
×
  • Create New...