Jump to content

fallen0519

Members
  • Posts

    52
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by fallen0519

  1. Using Hercules Hi sir, I met this problem when running the script, can anyone please help me regarding this matter? Thanks a lot!! Addon: Also, how to fix the "warning" problem because most of my custom script met such problems. Thanks!~
  2. No, other MVP didnt give a card, Ex: Eddga, Maya, Tao Gunka and etc... i did set something like this because its for the MVP check script. beach_dun,0,0,0,0 boss_monster Tao Gunka 1583,1,18000000,600000,"convex::OnMyMvPDead" //===== eAthena Script ======================================= //= Super Convex Mirror //===== By: ================================================== //= Brian //===== Current Version: ===================================== //= 1.0 //===== Compatible With: ===================================== //= eAthena SVN //===== Description: ========================================= //= Detects if every MVP is alive or dead. //===== Additional Comments: ================================= //= http://www.eathena.ws/board/index.php?showtopic=242050 //============================================================ prontera,144,173,5 script MVP Board::convex 857,{ if (!.display_type) donpcevent strnpcinfo(3)+"::OnInit"; // initialize variables for( set .@i,0; .@i < getarraysize(.mvp_name$); set .@i, .@i+1 ) { switch (.@i) { case 9: set .@alive, mobcount("lhz_dun03","summon_boss_lt::OnMyMvPDead"); break; case 29: set .@alive, ($ktullanux_summon<4 || mobcount("ice_dun03","ice_boss#on::OnMyMobDead")); break; case 31: set .@alive, mobcount("niflheim","NifInvasion::OnLoDDead"); break; case 46: set .@alive, ($@thana_summon<6 || mobcount("thana_boss","#Death::OnThanaDead")); break; default: set .@alive, mobcount(.mvp_map$[.@i],"convex::OnMyMvPDead"); break; } if (.display_type == 2) set .@menu$, .@menu$+ (.@alive ? "^008000" : "^FF0000") + .mvp_name$[.@i] +"^000000 ("+ .mvp_map$[.@i] +"):"; else if (.display_type == 1) mes (.@alive ? "^008000" : "^FF0000") + .mvp_name$[.@i] +"^000000 ("+ .mvp_map$[.@i] +")"; } if (.display_type == 2) set .@num, select(.@menu$) -1; if (.warp_to_mvp >= 1) warp .mvp_map$[.@num],0,0; if (.warp_to_mvp == 2) { sleep2 1000; sc_start SC_BOSSMAPINFO,600000,0; } end; OnInit: waitingroom "MVP Board",0; set .display_type, 2; // 1=mes, 2=menu set .warp_to_mvp, 2; // 0=disabled, 1=enabled, 2=enabled+SC_BOSSMAPINFO setarray .mvp_map$[0], "moc_pryd06","ra_fild02","ra_fild03","ra_fild04","ve_fild01", "ve_fild02","lou_dun03","prt_maze03","abbey03","lhz_dun03","bra_dun02", "gl_chyard","gld_dun04","abyss_03","gef_dun02","gld_dun02","gef_dun01","treasure02", "pay_fild11","gld_dun01","gon_dun03","abbey02","xmas_fild01","ra_san05", "prt_sewb4","mosk_dun03","thor_v03","ama_dun03", "kh_dun02","ice_dun03","ayo_dun02","niflheim","anthell02","gld_dun03", "mjolnir_04","pay_dun04","2@nyd","gef_fild02","gef_fild14","gef_fild10", "moc_pryd04","in_sphinx5","moc_fild17","ein_dun02","xmas_dun02", "beach_dun","thana_boss","tur_dun04","odin_tem03", "jupe_core","moc_fild22","lhz_dun02"; setarray .mvp_name$[0], "AmonRa","Atroce","Atroce","Atroce","Atroce", "Atroce","Bacsojin","Baphomet","Beelzebub","Biolab3","Boitata", "DarkLord","DarkLord","Detale","Doppelganger","Doppelganger","Dracula","Drake", "Eddga","Eddga","EvilSnakeLord","FallenBishop","Garm","GloomUnderNight", "GoldenThiefBug","Gopinich","Ifrit","IncantationSamurai", "KielD01","Ktullanux","LadyTanee","LordofDeath","Maya","Maya", "Mistress","MoonlightFlower","NidhoggrShadow","OrcHero","OrcHero","OrcLord", "Osiris","Pharaoh","Phreeoni","RSX0806","StormyKnight", "TaoGunka","Thanatos","TurtleGeneral","ValkyrieRandgris", "Vesper","Wounded Morroc","Ygnizem"; if (.warp_to_mvp) set .display_type,2; // in order for the user to pick an option, the list must be displayed as a menu OnMyMvPDead: end; }
  3. How can I fix that yea, I need to set all mvp with the "npcbiddon:OnEvent" ? Hmmmm..... Hope anyone can help me about this.... Bump~~~
  4. When I use the bottom script which edited by Emistry and Annieruru, it's weird because the normal mvp won't drop TCG, but GM summoned MVP will drop tcg. Can anyone help me fix this, I will post 2 script wonder if it's the reason they make the script fail, another script is my mvp rank ladder script. Any pro scripter please help me about this yea... - script jfksdhfkjs -1,{ OnNPCKillEvent: if ( !getmonsterinfo( killedrid, MOB_MVPEXP ) ) end; if ( getcharid(1) ) { getpartymember getcharid(1), 1; getpartymember getcharid(1), 2; for ( .@i = 0; .@i < $@partymembercount; .@i++ ) { if ( isloggedin( $@partymemberaid[.@i], $@partymembercid[.@i] ) ) { // what happens if someone in the party member is offline =/ .@partymemberaid[.@c] = $@partymemberaid[.@i]; .@c++; } } getitem 7227, 1, .@partymemberaid[ rand( .@c ) ]; announce "Party ["+ strcharinfo(1) +"] has killed "+ getmonsterinfo( killedrid, MOB_NAME ) +" and rewarded 1 TCG at "+ strcharinfo(3), 0; } else { getitem 7227, 1; announce "Player ["+ strcharinfo(0) +"] has killed "+ getmonsterinfo( killedrid, MOB_NAME ) +" and rewarded 1 TCG at "+ strcharinfo(3), 0; } end; } prontera,162,152,4 script MVP Ladder 619,{ query_sql( "DELETE FROM `mvp_ranking` WHERE `name` NOT IN ( SELECT `name` FROM `char` )" ); set .@size, query_sql( "select name, points from mvp_ranking where points > 0 order by points desc limit "+ .top, .@name$, .@points ); mes "[^FF0000MvP ^0000FFRank ^996600Top ^FF0000" + .top +"^000000]"; for (set .@c, 0; .@c < .@size; set .@c, .@c + 1) mes "Top ^FF0000" +(.@c + 1) +"^000000 ^0000FF" + .@name$[.@c] +"^000000 with ^FF0000" + .@points[.@c] +"^000000 MvP killed."; close; OnInit: // Script Configuration set .a, 1; // Broadcast who killed the MvP and wich MvP and wick Map [0 Off - 1 On] set .top, 10; // Max. Top Rank (Hihgly recommended between 5~10, more maybe bug the server (limited variables) waitingroom "MvP Rank",0; end; OnNPCKillEvent: // Script execution if ( getmonsterinfo( killedrid,MOB_MODE ) & 0x0020 == 0 ) end;// not an mvp if (.a) // If announce On announce "Player [" +strcharinfo(0) +"] had killed MVP [" +getmonsterinfo(killedrid,0) +"] in [" +strcharinfo(3) +"]",bc_blue|bc_all; query_sql "insert into `mvp_ranking` value ( "+ getcharid(0) +", '"+ escape_sql( strcharinfo(0) ) +"', 1 ) on duplicate key update `points` = `points` + 1"; end; }
  5. I had no idea why player can't cast skill on the following map "guild_vs5", and Admin can't use any command within this map. I had check the script, there is nth to prevent admin use commands and skill disabling inside the script. prontera,161,140,4 script Last Man Standing 637,{ if ( !.start ) { mes "no event atm"; close; } if ( .start == 2 ) { mes "event is running"; close; } if ( .register_count >= .register_limit ) { mes "this event has reach the maximum player participations"; close; } percentheal 100,100; warp "guild_vs5", 0,0; .register_aid[ .register_count ] = getcharid(3); .register_count++; end; OnWhisperGlobal: if ( getgmlevel() < 60 ) end; //OnClock0000: // put all your start timer here OnClock2100: if ( .start == 2 ) callsub L_resetmap; else if ( .start == 1 ) end; announce "LMS event registration start. TCG Reward - 30 TCG Cards", 0; .start = 1; sleep 50000; // registration timer here announce "LMS event registration close.", 0; .start = 2; sleep 3000; mapannounce "guild_vs5", "THIS IS SPARTA !!!!!", 0; if ( .register_count < .register_min ) { announce "not enough participants for LMS event", 0; mapwarp "guild_vs5", .map$, .x, .y; callsub L_resetmap; end; } pvpon "guild_vs5"; end; OnPCDieEvent: OnPCLogoutEvent: if ( .start != 2 || strcharinfo(3) != "guild_vs5" ) end; while ( .register_aid != getcharid(3) && .@i < .register_count ) .@i++; deletearray .register_aid[.@i], 1; .register_count--; warp "SavePoint", 0,0; if ( .register_count > 1 ) end; killmonsterall "guild_vs5"; announce "Congratulations ~ the winner of LMS event got 30 TCG Card. - "+ rid2name( .register_aid ), 0; getitem .reward_item_id, .reward_item_amount, .register_aid; // winner prize warpchar "SavePoint", 0,0, getcharid( 0, rid2name( .register_aid ) ); callsub L_reset; end; L_resetmap: mapwarp "guild_vs5", .map$, .x, .y; L_reset: .start = 0; deletearray .register_aid; .register_count = 0; pvpoff "guild_vs5"; return; OnInit: getmapxy .map$, .x, .y, 1; .register_min = 2; // minimum amount of players to start this event, or else it auto-abort .register_limit = 100; // maximum amount of players able to participate in this event .reward_item_id = 7227; .reward_item_amount = 30; end; } guild_vs5 mapflag nosave SavePoint guild_vs5 mapflag nowarp guild_vs5 mapflag nowarpto guild_vs5 mapflag noteleport guild_vs5 mapflag nomemo //guild_vs5 mapflag nopenalty //guild_vs5 mapflag nobranch //guild_vs5 mapflag noicewall guild_vs5 mapflag pvp_noparty guild_vs5 mapflag pvp_noguild Hope anyone can help me out !! Thank you !!
  6. Hmm, I am using the following script, when the MVP die, players rank is not updated, means didn't +1, may I know how to fix this bug. Thanks in advance~ prontera,162,152,4 script MVP Ladder 619,{ query_sql( "DELETE FROM `mvp_ranking` WHERE `name` NOT IN ( SELECT `name` FROM `char` )" ); set .@size, query_sql( "select name, points from mvp_ranking where points > 0 order by points desc limit "+ .top, .@name$, .@points ); mes "[^FF0000MvP ^0000FFRank ^996600Top ^FF0000" + .top +"^000000]"; for (set .@c, 0; .@c < .@size; set .@c, .@c + 1) mes "Top ^FF0000" +(.@c + 1) +"^000000 ^0000FF" + .@name$[.@c] +"^000000 with ^FF0000" + .@points[.@c] +"^000000 MvP killed."; close; OnInit: // Script Configuration set .a, 1; // Broadcast who killed the MvP and wich MvP and wick Map [0 Off - 1 On] set .top, 10; // Max. Top Rank (Hihgly recommended between 5~10, more maybe bug the server (limited variables) waitingroom "MvP Rank",0; end; OnNPCKillEvent: // Script execution if ( getmonsterinfo( killedrid,MOB_MODE ) & 0x0020 == 0 ) end;// not an mvp if (.a) // If announce On announce "Player [" +strcharinfo(0) +"] had killed MVP [" +getmonsterinfo(killedrid,0) +"] in [" +strcharinfo(3) +"]",bc_blue|bc_all; query_sql "insert into `mvp_ranking` value ( "+ getcharid(0) +", '"+ escape_sql( strcharinfo(0) ) +"', 1 ) on duplicate key update `points` = `points` + 1"; end; }
  7. Capuche, why when the players didnt kill the MVP and his/her name was posted under top 10, what cause this bug to happen yea...
  8. Why the item ID like changed to another script? >_< Nvm, I'll just use the previous script because its only the item check problem. TQ!!
  9. Capuche, is there anyway to check if players have enough space to got the item? Because whenever player have almost full inventory, it cause server crash when claiming the g.pack. Thanks~
  10. Thanks Capuche, the deleted character name was gone, now was trying to see if the ranking position appear bugs again. Thanks much !!
  11. This is my MVP rank script at below, I want to make it when character deleted, name in the position will be gone too. prontera,162,152,4 script MVP Ladder 619,{ set .@size, query_sql( "select name, points from mvp_ranking where points > 0 order by points desc limit "+ .top, .@name$, .@points ); mes "[^FF0000MvP ^0000FFRank ^996600Top ^FF0000" + .top +"^000000]"; for (set .@c, 0; .@c < .@size; set .@c, .@c + 1) mes "Top ^FF0000" +(.@c + 1) +"^000000 ^0000FF" + .@name$[.@c] +"^000000 with ^FF0000" + .@points[.@c] +"^000000 MvP killed."; close; OnInit: // Script Configuration set .a, 1; // Broadcast who killed the MvP and wich MvP and wick Map [0 Off - 1 On] set .top, 10; // Max. Top Rank (Hihgly recommended between 5~10, more maybe bug the server (limited variables) waitingroom "MvP Rank",0; end; OnNPCKillEvent: // Script execution if ( getmonsterinfo( killedrid,MOB_MODE ) & 0x0020 == 0 ) end;// not an mvp if (.a) // If announce On announce "Player [" +strcharinfo(0) +"] had killed MVP [" +getmonsterinfo(killedrid,0) +"] in [" +strcharinfo(3) +"]",bc_blue|bc_all; query_sql "insert into `mvp_ranking` value ( "+ getcharid(0) +", '"+ escape_sql( strcharinfo(0) ) +"', 1 ) on duplicate key update `points` = if ( `points` + 1 > 200, 0, `points` + 1 )"; end; } Emistry teach me about the below addon, but I don't know how to fix it, hope someone can help me add it in the top script. Besides that, bottom..... query_sql( "DELETE FROM `mvp_ranking` WHERE `name` NOT IN ( SELECT `name` FROM `char` )" ); query_sql( "select name, points from mvp_ranking where points > 0 order by points desc limit "+ .top, .@name$, .@points ); The main point is that there is something wrong with this MVP Rank script, at first I saw a player with 67 MVP Killed, and then the next day I click the NPC, it shows 11 MVP Killed. HELP~~ Anybody know whats wrong about this please !! =(((
  12. Sir Emistry, I need to remove something from my current script? Can you tell me where to insert from...hmmm I show you the full script below, post me an edited full script if possible yea.. Thanks much appreciate it. prontera,162,152,4 script MVP Ladder 619,{ set .@size, query_sql( "select name, points from mvp_ranking where points > 0 order by points desc limit "+ .top, .@name$, .@points ); mes "[^FF0000MvP ^0000FFRank ^996600Top ^FF0000" + .top +"^000000]"; for (set .@c, 0; .@c < .@size; set .@c, .@c + 1) mes "Top ^FF0000" +(.@c + 1) +"^000000 ^0000FF" + .@name$[.@c] +"^000000 with ^FF0000" + .@points[.@c] +"^000000 MvP killed."; close; OnInit: // Script Configuration set .a, 1; // Broadcast who killed the MvP and wich MvP and wick Map [0 Off - 1 On] set .top, 10; // Max. Top Rank (Hihgly recommended between 5~10, more maybe bug the server (limited variables) waitingroom "MvP Rank",0; end; OnNPCKillEvent: // Script execution if ( getmonsterinfo( killedrid,MOB_MODE ) & 0x0020 == 0 ) end;// not an mvp if (.a) // If announce On announce "Player [" +strcharinfo(0) +"] had killed MVP [" +getmonsterinfo(killedrid,0) +"] in [" +strcharinfo(3) +"]",bc_blue|bc_all; query_sql "insert into `mvp_ranking` value ( "+ getcharid(0) +", '"+ escape_sql( strcharinfo(0) ) +"', 1 ) on duplicate key update `points` = if ( `points` + 1 > 200, 0, `points` + 1 )"; end; } Guys, there is something wrong with this MVP Rank script, at first I saw a player with 67 MVP Killed, and then the next day I click the NPC, it shows 11 MVP Killed. HELP~~ Anybody know whats wrong about this please !! =((( Bump~ Anyone would help please... ><
  13. I use this automated gold room, but the only problem is it only allow 1 people go in to farm while activated. How to make it no limit for players who can go in to the gold room yea. Or make it like 10 players to go in only. prontera,156,168,5 script Gold Room 925,{ if( getmapusers( .Map$ ) ){ npctalk "You cant go in right now. There is someone inside."; }else{ announce "["+strcharinfo(0)+"] entered Gold Room.",0; warp .Map$,0,0; initnpctimer; } end; OnInit: disablenpc "Gold Room"; set .Map$,"1@orcs"; monster .Map$,0,0,"Gold",1062,100,strnpcinfo(0)+"::OnMobKill"; while( 1 ){ delwaitingroom; if( getmapusers( .Map$ ) ){ waitingroom "Countdown "+( 60 - ( getnpctimer(0) / 1000 ) )+" Seconds",0; } sleep 1000; } end; OnClock0010: OnClock0110: OnClock0210: OnClock0310: OnClock0410: OnClock0510: OnClock0610: OnClock0710: OnClock0810: OnClock0910: OnClock1010: OnClock1110: OnClock1210: OnClock1310: OnClock1410: OnClock1510: OnClock1610: OnClock1710: OnClock1810: OnClock1910: OnClock2010: OnClock2110: OnClock2210: OnClock2310: enablenpc "Gold Room"; announce "Gold Room Activated", 0; end; OnClock0011: OnClock0111: OnClock0211: OnClock0311: OnClock0411: OnClock0511: OnClock0611: OnClock0711: OnClock0811: OnClock0911: OnClock1011: OnClock1111: OnClock1211: OnClock1311: OnClock1411: OnClock1511: OnClock1611: OnClock1711: OnClock1811: OnClock1911: OnClock2011: OnClock2111: OnClock2211: OnClock2311: disablenpc "Gold Room"; announce "Gold Room Deactivated", 0; end; OnMobKill: getitem 969,2; monster .Map$,0,0,"Gold",1062,1,strnpcinfo(0)+"::OnMobKill"; end; OnTimer60000: mapannounce .Map$,"Time's Up !! You will be warped out right now..",0; mapwarp .Map$,"prontera",156,187; end; } 1@orcs mapflag nowarp 1@orcs mapflag nowarpto 1@orcs mapflag noteleport 1@orcs mapflag nosave 1@orcs mapflag nomemo 1@orcs mapflag nobranch 1@orcs mapflag noloot 1@orcs mapflag noskill 1@orcs mapflag nopenalty
  14. Thanks Capuche, it solved !!
  15. Thx, it works !! you're the best xD Patskie, when I delete character, the character gone, but the rank still shows the name, how to make it like when delete character, name gone from the ladder. Hmmm....
  16. Sir Capuche, I used your MVP ladder script, there is some bugs here. The ranking shows that.. Top 1 Game Master with 1 MVP killed. Top 2 Milk with 1 MVP killed. Top 3 Nakku with 7 MVP Killed. as it shows, the player who kill the most didn't get to Top 1, may I know how to fix this please? Thanks in advance. bottom is the edited script shown CREATE TABLE IF NOT EXISTS `mvp_ranking` ( `char_id` int(11) unsigned NOT NULL DEFAULT '0', `name` varchar(30) NOT NULL DEFAULT '', `points` int(11) unsigned NOT NULL default '0', PRIMARY KEY (`char_id`) ) ENGINE=MyISAM; ///////////////////////////////////////////////////////////////// prontera,162,152,4 script MVP Ladder 619,{ set .@size, query_sql( "select name, points from mvp_ranking where points > 0 order by points limit "+ .top, .@name$, .@points ); mes "[^FF0000MvP ^0000FFRank ^996600Top ^FF0000" + .top +"^000000]"; for (set .@c, 0; .@c < .@size; set .@c, .@c + 1) mes "Top ^FF0000" +(.@c + 1) +"^000000 ^0000FF" + .@name$[.@c] +"^000000 with ^FF0000" + .@points[.@c] +"^000000 MvP killed."; close; OnInit: // Script Configuration set .a, 1; // Broadcast who killed the MvP and wich MvP and wick Map [0 Off - 1 On] set .top, 10; // Max. Top Rank (Hihgly recommended between 5~10, more maybe bug the server (limited variables) waitingroom "MvP Rank",0; end; OnNPCKillEvent: // Script execution if ( getmonsterinfo( killedrid,MOB_MODE ) & 0x0020 == 0 ) end;// not an mvp if (.a) // If announce On announce "Player [" +strcharinfo(0) +"] had killed MVP [" +getmonsterinfo(killedrid,0) +"] in [" +strcharinfo(3) +"]",bc_blue|bc_all; query_sql "insert into `mvp_ranking` value ( "+ getcharid(0) +", '"+ escape_sql( strcharinfo(0) ) +"', 1 ) on duplicate key update `points` = if ( `points` + 1 > 200, 0, `points` + 1 )"; end; }
  17. I think there is some bug upon this script, it shows the top players but the class is stuck at novice and won't be updated under the waitingroom. Hopefully any pro scripter can help to fix them out. Thanks much. /* CREATE TABLE IF NOT EXISTS `E-MVPRank` ( `char_id` int(11) unsigned NOT NULL default '0', `name` varchar(30) NOT NULL DEFAULT '', `Class` smallint(6) unsigned NOT NULL default '0', `Count` int(11) unsigned NOT NULL default '0', PRIMARY KEY (`char_id`) ) ENGINE=MyISAM; */ prontera,162,152,4 script MVP Ladder 619,{ query_sql( "SELECT `name`,`Count` FROM `E-MVPRank` ORDER BY `Count` DESC LIMIT 5",.@Name$,.@Count ); if( getarraysize( .@Name$ ) ){ for( set .@i,0; .@i < getarraysize( .@Name$ ); set .@i,.@i + 1 ) mes "[ "+( .@i + 1 )+". ] "+.@Name$[.@i]+" - "+.@Count[.@i]+" MvP killed"; }else{ mes "No Record Found."; } close; OnNPCKillEvent: if( getmonsterinfo( killedrid,MOB_MVPEXP ) ) query_sql( "INSERT INTO `E-MVPRank` SET `char_id`='"+getcharid(0)+"',`name`='"+strcharinfo(0)+"',`Count`='1' ON DUPLICATE KEY UPDATE `Count`=`Count`+1" ); OnMinute31: query_sql( "SELECT `name`,`Class`,`Count` FROM `E-MVPRank` ORDER BY `Count` DESC LIMIT 1",.@Name$,.@Class,.@Count ); delwaitingroom; waitingroom "TOP : "+.@Name$+" ("+jobname( .@Class )+") : "+.@Count+" Kill",0; end; }
  18. Thanks Capuche, it works !! Do you mind looking at this Guild Pack script? No matter how it records player's IP in sql, player can still create another account to claimed them. http://rathena.org/board/topic/94294-guild-pack-npc-giver-help-please/ Sorry if it post in the wrong topic.
  19. Hello Sand Box, I think there is some error with the script about the party pvp, when i click the party type, it stuck, following is my edit script. prontera,162,159,4 script 1v1 PK 843,{ mes .Npc_Name$; mes "Hello!"; switch(select("1vs1 PvP:Party PvP")) { next; mes .Npc_Name$; case 1: if(getmapusers(.Map$[0]) > 1) { mes "There are people fighting in this map!"; close; } mes "Goodluck!"; warp .Map$[0],0,0; announce strcharinfo(0)+" entered the 1 VS 1 PvP Room",0; close; break; case 2: if(!strcharinfo(1)) { mes "You must have a party in order to enter!"; close; } mes "Goodluck!"; warp .Map$[1],0,0; announce strcharinfo(0)+" entered the Party PvP Room",0; close; break; } end; OnInit: waitingroom "1v1 PvP",0; .Npc_Name$ = "[^0000FF "+strnpcinfo(1)+" ^000000]"; setarray .Map$[0],"pvp_y_4-4","pvp_y_8-5"; end; } Kindly wait for your help yea...
  20. May I asked where is the sql executed script? Hmm.... or it's auto execute to the sql database.
  21. //Script Name: Guild Package NPC Giver //Developer: ShogS //Description: This NPC will Give a Package for each Guild Member take Note: this NPC will record each player IP address to avoid abuse on players side by getting 2 Package in 1 IP //Version: 1.0 //Some Explanation: Do not forget to set the items to a not tradeable Sample: 17638,91,99 = Can not be droped,sell,trade //====================================================================================================== // - SQL TABLE /* CREATE TABLE IF NOT EXISTS `guildpack` ( `id` int(11) NOT NULL auto_increment, `account_id` int(11) NOT NULL default '0', `name` varchar(23) NOT NULL default '', `last_ip` varchar(100) NOT NULL default '', PRIMARY KEY (`account_id`), KEY (`id`) ) ENGINE=MyISAM; */ //====================================================================================================== prontera,130,172,5 script Guild Pack Info 468,{ set .@frnd2$,strcharinfo(0); if(##Gpack == 1) goto L_AG; mes "[Guild Pack NPC]"; mes "Hello there, it seems you are claiming for a Guild Pack."; next; mes "[Guild Pack NPC]"; mes "Let me gift you a guild pack for joining and"; mes "playing in Lunar RO, we hope you enjoy them."; next; mes "These guild pack is not duplicable and not dropable."; next; switch(select("Yes:No")) { case 1: query_sql("SELECT last_ip FROM `login` WHERE account_id = "+getcharid(3)+"", .@lip$); // recruits ip address query_sql("SELECT last_ip FROM `guildpack`", .@flip$); // recruiter ip address and information if ( .@lip$ == .@flip$ ) { mes "^616D7EIt seems you have same IP Address among Guild Mates: ^ff0000" + .@flip$ + "^000000. Sorry, but its not allowed."; close; } query_sql("INSERT INTO `guildpack` VALUES (NULL," + getcharid(3) + ",'" + escape_sql(strcharinfo(0)) + "','" + .@lip$ + "')"); //THIS PART WERE all items they will get getitem 29828,1; getitem 29851,1; getitem 29868,1; getitem 29834,1; getitem 29804,1; getitem 29835,1; getitem2 5170,1,1,7,0,0,0,0,0; getitem2 2319,1,1,7,0,4141,0,0,0; getitem2 2114,1,1,7,0,4058,0,0,0; getitem2 2528,1,1,7,0,4133,0,0,0; getitem2 2424,1,1,7,0,4097,0,0,0; getitem 2607,2; getitem 4035,5; getitem 4064,2; getitem 4079,2; getitem 14175,1; getitem 671,1; getitem 607,300; getitem 12045,100; getitem 12060,100; getitem 12050,100; getitem 12055,100; getitem 12065,100; getitem 12070,100; set ##Gpack, 1; warp "prontera",156,172; close; case 2: mes "^616D7ENevermind~, You can come back again later!"; close; set .@GID,getcharid(2); if (.@GID <= 0) { mes "You have no guild!"; close; } }end; L_AG: mes "^616D7EYou already given a Guild Package"; close; OnInit: waitingroom "Guild Package",0; end; } Hi, top is my guild pack script, I have problem about this script. Players can get the guild pack even when they are not in guild. And besides that, players who create another account can get the g.pack as well. I already execute the sql table, anyone please help me yea... I really don't know how to fix this bug~~
  22. Can anyone tell me what's wrong with the script, when players kill MVP, the stats is not shown. Please help me~~ >_< prontera,162,152,4 script MVP Ladder 619,{ mes "[MVP Ladder]"; mes "Hello!"; mes "What are you doing here?"; next; switch(select("Check rankings.:My stats.:Nothing...")) { case 1: mes "[MVP Ladder]"; query_sql("SELECT char_id,CAST(`value` AS SIGNED) FROM `global_reg_value` WHERE `str` = 'MVP_Rank' ORDER BY CAST(`value` AS SIGNED) DESC LIMIT 20",.@cid,.@value); for(set .@i,0; .@i<getarraysize(.@cid); set .@i,.@i+1) { query_sql("SELECT `name` FROM `char` WHERE char_id = "+.@cid[.@i]+";",.@j$); set .@name$[.@i], .@j$; } if (!getarraysize(.@cid)) mes "The rankings are empty."; else for(set .@i,0; .@i<getarraysize(.@cid); set .@i,.@i+1) mes "["+(.@i+1)+"] "+.@name$[.@i]+" ~ "+.@value[.@i]+" kills"; close; case 2: mes "[MVP Ladder]"; mes "You have killed "+((MVP_Rank)?"^0055FF"+MVP_Rank:"no")+"^000000 MVP"+((MVP_Rank == 1)?".":"s."); close; case 3: close; OnInit: waitingroom "MvP Rank",0; end; } OnNPCKillEvent: if (getmonsterinfo(killedrid,22)) { set MVP_Rank, MVP_Rank+1; if (MVP_Rank == 1) query_sql("INSERT INTO `global_reg_value` (`char_id`,`str`,`value`,`type`,`account_id`) VALUES ("+getcharid(0)+",'MVP_Rank','1',3,0)"); else query_sql("UPDATE `global_reg_value` SET `value` = '"+MVP_Rank+"' WHERE char_id = "+getcharid(0)+" AND `str` ='MVP_Rank'"); dispbottom "~ You've killed "+MVP_Rank+" MVP"+((MVP_Rank == 1)?"":"s")+". ~"; specialeffect2 313; } end; }
  23. When I use Old version 3, rAthena only. it appear this bug in putty, hopefully someone will be able to fix it. [Warning]: script:getelementofarray: index out of range (-1) [Debug]: Data: variable name='.tmp$' index=0 [Debug]: Source (NPC): dualclientkicker (invisible/not on a map) following is my script... - script dualclientkicker -1,{ OnPCLoadMapEvent: set .@charmap$, strcharinfo(3); query_sql("SELECT FIND_IN_SET('"+.@charmap$+"', '"+.maps$+"');",.@q); if(.@charmap$!=.tmp$[(.@q-1)]) end; set .@len, query_sql("SELECT DISTINCT `account_id` FROM `char` WHERE `account_id` IN (SELECT `account_id` FROM `login` WHERE `last_ip` = (SELECT `last_ip` FROM `login` WHERE `account_id`="+getcharid(3)+")) AND `online` <> 0;",.@a); if(.@len-1) { for(set(.@d,0);.@d<.@len;set(.@d,.@d+1)) { getmapxy(.@map$,.@x,.@y,0,rid2name(.@a[.@d])); if(.tmp$[(.@q-1)]==.@map$&&rid2name(.@a[.@d])!=strcharinfo(0)) { dispbottom "Dual accounts not allowed in HERE."; warp "prontera",156,178; } } } end; OnInit: set .maps$ ,"bat_a01,bat_room,guild_vs3,prtg_cas05"; explode(.tmp$,.maps$,",") ; set .lens , getarraysize(.tmp$); for(set .a,0;.a<.lens;set .a,.a+1) setmapflag .tmp$[.a], mf_loadevent; }
×
×
  • Create New...