Jump to content

nasagnilac

Members
  • Posts

    232
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by nasagnilac

  1. Oh I got it... Thank you very much.. If you want my script just message me.. I still need to enhance it.
  2. check the loop for( set .@i, 0; .@i < .MaxMembers; set .@i, .@i + 1 ){ if(isloggedin($@partymemberaid[.@i],$@partymembercid[.@i])){ attachrid $@partymemberaid[.@i]; if(strcharinfo(3) == .Map$) {end;} if(strcharinfo(3) == .Map$) {end;} => the loop should continue, replace end by continue same that above others things: disablenpc "PVPB"; unknown npc PVPB set $teama$,"Null"; set $teamb$,"Null"; you could use an empty string by default and $@ variables (no need to save permanently theses var) query_sql ("SELECT `party_id`,`name` FROM `party` WHERE `name` = '"+.@teama$+"'",.@pid,$teama$); if (!.@pid){ dispbottom "Invalid party name."; end; to check if the player had a party, use getcharid(1) if (Class == Job_Lord_Knight || Class == Job_Paladin || Class == Job_Knight || Class == Job_Crusader){ you can use the const BaseJob I guess you don't understand @gvgsupply codes will be this one and no other thing.. Error must be somewhere in this code. //-------------------------------------------------------------------------------------// //-------------------------------------------------------------------------------------// //-------------------------------------------------------------------------------------// OnDoSupply: donpcevent "mainevent::OnSupply1"; donpcevent "mainevent::OnSupply2"; set .count_online1,0; set .count_online2,0; donpcevent "mainevent::OnDoStart"; end; OnSupply1: query_sql ("SELECT `party_id` FROM `party` WHERE `name` = '"+$teama$+"'",.@pid); getpartymember .@pid, 2; for( set .@i, 0; .@i < .MaxMembers; set .@i, .@i + 1 ){ attachrid $@partymemberaid[.@i]; if(strcharinfo(3) != .Map$) {end;} if(Class == Job_Whitesmith || Class == Job_Creator){atcommand "@clearcart";} getinventorylist; for(set .@k,0; .@k<getarraysize(.delitems); set .@k,.@k+1){ if(countitem( .delitems[.@k]) > 0){ delitem .delitems[.@k],countitem(.delitems[.@k]); } } if (Class == Job_Lord_Knight || Class == Job_Paladin || Class == Job_Knight || Class == Job_Crusader){ getitem 14003,5; getitem 657,10; }else if(Class == Job_Assassin_Cross || Class == Job_Assassin){ getitem 14003,5; getitem 656,10; getitem 678,3; }else if(Class == Job_Stalker || Class == Job_Rogue){ getitem 14003,5; getitem 657,10; }else if(Class == Job_Sniper || Class == Job_Clown || Class == Job_Gypsy || Class == Job_Hunter || Class == Job_Bard || Class == Job_Dancer){ getitem 14003,5; getitem 656,10; getitem 12009,2; }else if(Class == Job_High_Wizard || Class == Job_Professor || Class == Job_Wizard || Class == Job_Sage){ getitem 14003,5; getitem 656,10; getitem 717,75; getitem 716,75; getitem 715,75; }else if(Class == Job_High_Priest || Class == Job_Priest){ getitem 14003,5; getitem 645,10; getitem 717,75; }else if(Class == Job_Champion || Class == Job_Monk){ getitem 14003,5; getitem 656,10; }else if(Class == Job_Whitesmith || Class == Job_Blacksmith){ getitem 14003,5; getitem 657,10; getitem 601,1600; }else if(Class == Job_Creator || Class == Job_Alchemist){ getitem 14003,5; getitem 657,10; getitem 7136,5; getitem 7135,5; getitem 547,150; } } end; OnSupply2: query_sql ("SELECT `party_id` FROM `party` WHERE `name` = '"+$teamb$+"'",.@pid); getpartymember .@pid, 2; for( set .@i, 0; .@i < .MaxMembers; set .@i, .@i + 1 ){ attachrid $@partymemberaid[.@i]; if(strcharinfo(3) != .Map$) {end;} if (getgmlevel() >= .gmlvl){end;} if(Class == Job_Whitesmith || Class == Job_Creator){atcommand "@clearcart";} getinventorylist; for(set .@k,0; .@k<getarraysize(.delitems); set .@k,.@k+1){ if(countitem( .delitems[.@k]) > 0){ delitem .delitems[.@k],countitem(.delitems[.@k]); } } if (Class == Job_Lord_Knight || Class == Job_Paladin || Class == Job_Knight || Class == Job_Crusader){ getitem 14003,5; getitem 657,10; }else if(Class == Job_Assassin_Cross || Class == Job_Assassin){ getitem 14003,5; getitem 656,10; getitem 678,3; }else if(Class == Job_Stalker || Class == Job_Rogue){ getitem 14003,5; getitem 657,10; }else if(Class == Job_Sniper || Class == Job_Clown || Class == Job_Gypsy || Class == Job_Hunter || Class == Job_Bard || Class == Job_Dancer){ getitem 14003,5; getitem 656,10; getitem 12009,2; }else if(Class == Job_High_Wizard || Class == Job_Professor || Class == Job_Wizard || Class == Job_Sage){ getitem 14003,5; getitem 656,10; getitem 717,75; getitem 716,75; getitem 715,75; }else if(Class == Job_High_Priest || Class == Job_Priest){ getitem 14003,5; getitem 645,10; getitem 717,75; }else if(Class == Job_Champion || Class == Job_Monk){ getitem 14003,5; getitem 656,10; }else if(Class == Job_Whitesmith || Class == Job_Blacksmith){ getitem 14003,5; getitem 657,10; getitem 601,1600; }else if(Class == Job_Creator || Class == Job_Alchemist){ getitem 14003,5; getitem 657,10; getitem 7136,5; getitem 7135,5; getitem 547,150; } } end; I don't really add that npc to my post. This part means if the party members is not on .Map$ they wont receive any supplies.
  3. prontera,187,209,3 script Broadcaster#1::BC 894,{ if (agitcheck() || agitcheck2()){ mes .header$; mes "War of Emperium is ongoing!"; close; } mes .header$; mes "Hi, I'm the Broadcaster"; mes "I can Broadcast a message for you"; next; mes .header$; mes "It costs ^ff0000"+.broadcastfee+"^000000 zeny."; next; mes .header$; mes "Would you like to Broadcast?"; next; switch (select("Yes","Nevermind")){ case 1: if(gettimetick(2) - #Broadcast < (60 * 3)) { // 3mins delay set .@i, (priest+(10 * 1)) - gettimetick(2); if (.@i > 3600) set .@j$, (.@i/3600)+" hour"+(((.@i/3600) == 1)?"":"s"); else if (.@i > 60) set .@j$, (.@i/60)+" minute"+(((.@i/60) == 1)?"":"s"); else set .@j$, (.@i)+" second"+((.@i == 1)?"":"s"); mes .header$; mes "You have to wait "+.@j$+" before taking another broadcast."; close; } mes .header$; mes "Please input your message."; next; input .@broadcast$; if(Zeny < 1000000) goto nozeny; set Zeny,zeny - .broadcastfee; announce ""+strcharinfo(0)+": "+.@broadcast$+"",0,0x5AFF00; set #Broadcast, gettimetick(2); close; case 2: mes .header$; mes "Suit yourself"; close; } nozeny: mes .header$; mes "Im sorry but you don't have enough zeny"; mes "Come back again you have ^ff0000"+.broadcastfee+"^000000 zeny"; close; OnInit: set .header$,"[^0000ffBroadcaster^000000]"; set .broadcastfee, 1000000; end; } splendide,194,182,3 duplicate(BC) Broadcaster#2 894 I just cleaned your script and do some re-edit. Try this one.
  4. // Supplies and Item Shop 06guild_r,78,76,4,25001 sshop Headgear's#1::number1 112,5288:1,5401:1,5471:1,5362:1,5361:1,5462:1,5225:1,5420:1,5313:1,5375:1,5389:1,5325:1,5463:1,5372:1,5379:1,5137:1,5377:1,5800:1,18511:1,5376:1,5314:1,5155:1,18510:1,18508:1,18509:1,18506:1,5423:1,5224:1 06guild_r,67,76,4 shop Cards#1::number2 113,4035:-1,4092:-1,4004:-1,4043:-1,4031:-1,4058:-1,4133:-1,4381:-1,4079:-1,4064:-1 06guild_r,71,76,4 shop Weapons#1::number3 114,1208:-1,1108:-1,1117:-1,1408:-1,1464:-1,1302:-1,1352:-1,1514:-1,1602:-1,1705:-1,1802:-1,1902:-1,1953:-1,1550:-1,1251:-1 06guild_r,74,76,4 shop Armors#1::number4 115,2310:-1,2102:-1,2504:-1,2404:-1,2621:-1,2624:-1 06guild_r,132,76,4,25001 sshop Headgear's#2::number5 112,5288:1,5401:1,5471:1,5305:1,5362:1,5361:1,5462:1,5225:1,5420:1,5313:1,5375:1,5389:1,5325:1,5463:1,5372:1,5379:1,5137:1,5377:1,5800:1,18511:1,5376:1,5314:1,5155:1,18510:1,18508:1,18509:1,18506:1,5423:1,5224:1 06guild_r,121,76,4 shop Cards#2::number6 113,4035:-1,4092:-1,4004:-1,4043:-1,4031:-1,4058:-1,4133:-1,4381:-1,4079:-1,4064:-1 06guild_r,125,76,4 shop Weapons#2::number7 114,1208:-1,1108:-1,1117:-1,1408:-1,1464:-1,1302:-1,1352:-1,1514:-1,1602:-1,1705:-1,1802:-1,1902:-1,1953:-1,1550:-1,1251:-1 06guild_r,128,76,4 shop Armors#2::number8 115,2310:-1,2102:-1,2504:-1,2404:-1,2621:-1,2624:-1 - script disable -1,{ OnInit: disablenpc "number1"; disablenpc "number2"; disablenpc "number3"; disablenpc "number4"; disablenpc "number5"; disablenpc "number6"; disablenpc "number7"; disablenpc "number8"; disablenpc "PVPB"; end; OnDisable: disablenpc "number1"; disablenpc "number2"; disablenpc "number3"; disablenpc "number4"; disablenpc "number5"; disablenpc "number6"; disablenpc "number7"; disablenpc "number8"; end; OnEnable: enablenpc "number1"; enablenpc "number2"; enablenpc "number3"; enablenpc "number4"; enablenpc "number5"; enablenpc "number6"; enablenpc "number7"; enablenpc "number8"; end; } - script mainevent -1,{ OnInit: setwall "06guild_r",74,78,4,2,0,"TeamAWall"; setwall "06guild_r",128,78,4,2,0,"TeamBWall"; setarray .delitem[0],5288,5401,5471,515,5362,5361,5462,5225,5420,5313,5375,5389,5325,5463,5372,5379, 5137,5377,5800,18511,5376,5314,5155,18510,18508,18509,18506,5423,5224,4035,4092, 4004,4043,4031,4058,4133,4381,4079,4064,2310,2102,2504,2404,2621,2624,1208,1108, 1117,1408,1464,1302,1352,1514,1602,1705,1802,1902,1953,1550,1251,25001,14003,645, 657,656,678,12009,1751,715,716,717,7136,7135; setarray .delitems[0],14003,645,657,656,678,601,12009,1751,715,716,717,7136,7135; setarray .BMap$[0],"guild_vs1","guild_vs2","guild_vs3","guild_vs4","guild_vs5"; setarray .Xa[0],7,7,16,7,19; setarray .Ya[0],49,49,50,49,49; setarray .Xb[0],92,92,83,92,80; setarray .Yb[0],49,49,50,49,49; set .MaxMembers,1; set .Zeny,1000000; set $teama$,"Null"; set $teamb$,"Null"; set .Map$,"06guild_r"; set .gmlvl, 1; // Commands bindatcmd "gvgteam","mainevent::OnDoTeam",50,99; bindatcmd "gvgnpcitem","mainevent::OnDoNpcItem",99,99; bindatcmd "gvgsupply","mainevent::OnDoSupply",99,99; bindatcmd "gvgstart","mainevent::OnDoStart",99,99; bindatcmd "gvgtimer","mainevent::OnDoTimer",99,99; bindatcmd "gvgdismiss","mainevent::OnDoDismiss",99,99; bindatcmd "gvgreset","mainevent::OnDoReset",99,99; end; //-------------------------------------------------------------------------------------// //-------------------------------------------------------------------------------------// //-------------------------------------------------------------------------------------// OnDoReset: set $teama$,"Null"; set $teamb$,"Null"; dispbottom "Team's has been reset"; end; //-------------------------------------------------------------------------------------// //-------------------------------------------------------------------------------------// //-------------------------------------------------------------------------------------// OnDoTeam: if ( compare( .@atcmd_parameters$, "A" )) { if( $teama$ != "Null" ){ dispbottom "Party "+$teama$+" are still registered."; end; } input .@teama$; query_sql ("SELECT `party_id`,`name` FROM `party` WHERE `name` = '"+.@teama$+"'",.@pid,$teama$); if (!.@pid){ dispbottom "Invalid party name."; end; }else{ getpartymember .@pid, 1; getpartymember .@pid, 2; } if ($@partymembercount != .MaxMembers ){ dispbottom "Party members is not equal to "+.MaxMembers+" members."; end; }else{ set .@team$, $teama$; set .@x,73; set .@y,69; } } else if ( compare( .@atcmd_parameters$, "B" )) { if( $teamb$ != "Null" ){ dispbottom "Party "+$teamb$+" are still registered."; end; } input .@teamb$; query_sql ("SELECT `party_id`,`name` FROM `party` WHERE `name` = '"+.@teamb$+"'",.@pid,$teamb$); if (!.@pid){ dispbottom "Invalid party name."; end; }else{ getpartymember .@pid, 1; getpartymember .@pid, 2; } if ($@partymembercount != .MaxMembers ){ dispbottom "Party members is not equal to "+.MaxMembers+" members."; end; }else{ set .@team$, $teamb$; set .@x,127; set .@y,69; } } else { end; } dispbottom "Team ["+.@team$+"] has been warped."; for( set .@i, 0; .@i < .MaxMembers; set .@i, .@i + 1 ){ if(isloggedin($@partymemberaid[.@i],$@partymembercid[.@i])){ attachrid $@partymemberaid[.@i]; if(strcharinfo(3) == .Map$) {end;} if(Class == Job_Whitesmith || Class == Job_Creator){ atcommand "@clearcart"; } unequip EQI_HEAD_TOP; unequip EQI_ARMOR; unequip EQI_HAND_L; unequip EQI_HAND_R; unequip EQI_GARMENT; unequip EQI_SHOES; unequip EQI_ACC_L; unequip EQI_ACC_R; unequip EQI_HEAD_MID; unequip EQI_HEAD_LOW; atcommand "@storeall"; set Zeny, Zeny + .Zeny; getitem 25001,3; warp .Map$,.@x,.@y; savepoint .Map$,.@x,.@y; } } end; //-------------------------------------------------------------------------------------// //-------------------------------------------------------------------------------------// //-------------------------------------------------------------------------------------// OnDoNpcItem: donpcevent "disable::OnEnable"; mapannounce ""+.Map$+"","Admin: You have 3 minutes to set-up your items.",0; sleep2 120000; mapannounce ""+.Map$+"","Admin: You have 1 minute left to set-up your items.",0; sleep2 60000; mapannounce ""+.Map$+"","Admin: Time's up.",0; donpcevent "disable::OnDisable"; goto OnDoSupply; end; //-------------------------------------------------------------------------------------// //-------------------------------------------------------------------------------------// //-------------------------------------------------------------------------------------// OnDoSupply: donpcevent "mainevent::OnSupply1"; donpcevent "mainevent::OnSupply2"; set .count_online1,0; set .count_online2,0; donpcevent "mainevent::OnDoStart"; end; OnSupply1: query_sql ("SELECT `party_id` FROM `party` WHERE `name` = '"+$teama$+"'",.@pid); getpartymember .@pid, 2; for( set .@i, 0; .@i < .MaxMembers; set .@i, .@i + 1 ){ attachrid $@partymemberaid[.@i]; if(strcharinfo(3) != .Map$) {end;} if (getgmlevel() >= .gmlvl){end;} if(Class == Job_Whitesmith || Class == Job_Creator){atcommand "@clearcart";} getinventorylist; for(set .@k,0; .@k<getarraysize(.delitems); set .@k,.@k+1){ if(countitem( .delitems[.@k]) > 0){ delitem .delitems[.@k],countitem(.delitems[.@k]); } } if (Class == Job_Lord_Knight || Class == Job_Paladin || Class == Job_Knight || Class == Job_Crusader){ getitem 14003,5; getitem 657,10; }else if(Class == Job_Assassin_Cross || Class == Job_Assassin){ getitem 14003,5; getitem 656,10; getitem 678,3; }else if(Class == Job_Stalker || Class == Job_Rogue){ getitem 14003,5; getitem 657,10; }else if(Class == Job_Sniper || Class == Job_Clown || Class == Job_Gypsy || Class == Job_Hunter || Class == Job_Bard || Class == Job_Dancer){ getitem 14003,5; getitem 656,10; getitem 12009,2; }else if(Class == Job_High_Wizard || Class == Job_Professor || Class == Job_Wizard || Class == Job_Sage){ getitem 14003,5; getitem 656,10; getitem 717,75; getitem 716,75; getitem 715,75; }else if(Class == Job_High_Priest || Class == Job_Priest){ getitem 14003,5; getitem 645,10; getitem 717,75; }else if(Class == Job_Champion || Class == Job_Monk){ getitem 14003,5; getitem 656,10; }else if(Class == Job_Whitesmith || Class == Job_Blacksmith){ getitem 14003,5; getitem 657,10; getitem 601,1600; }else if(Class == Job_Creator || Class == Job_Alchemist){ getitem 14003,5; getitem 657,10; getitem 7136,5; getitem 7135,5; getitem 547,150; } } end; OnSupply2: query_sql ("SELECT `party_id` FROM `party` WHERE `name` = '"+$teamb$+"'",.@pid); getpartymember .@pid, 2; for( set .@i, 0; .@i < .MaxMembers; set .@i, .@i + 1 ){ attachrid $@partymemberaid[.@i]; if(strcharinfo(3) != .Map$) {end;} if (getgmlevel() >= .gmlvl){end;} if(Class == Job_Whitesmith || Class == Job_Creator){atcommand "@clearcart";} getinventorylist; for(set .@k,0; .@k<getarraysize(.delitems); set .@k,.@k+1){ if(countitem( .delitems[.@k]) > 0){ delitem .delitems[.@k],countitem(.delitems[.@k]); } } if (Class == Job_Lord_Knight || Class == Job_Paladin || Class == Job_Knight || Class == Job_Crusader){ getitem 14003,5; getitem 657,10; }else if(Class == Job_Assassin_Cross || Class == Job_Assassin){ getitem 14003,5; getitem 656,10; getitem 678,3; }else if(Class == Job_Stalker || Class == Job_Rogue){ getitem 14003,5; getitem 657,10; }else if(Class == Job_Sniper || Class == Job_Clown || Class == Job_Gypsy || Class == Job_Hunter || Class == Job_Bard || Class == Job_Dancer){ getitem 14003,5; getitem 656,10; getitem 12009,2; }else if(Class == Job_High_Wizard || Class == Job_Professor || Class == Job_Wizard || Class == Job_Sage){ getitem 14003,5; getitem 656,10; getitem 717,75; getitem 716,75; getitem 715,75; }else if(Class == Job_High_Priest || Class == Job_Priest){ getitem 14003,5; getitem 645,10; getitem 717,75; }else if(Class == Job_Champion || Class == Job_Monk){ getitem 14003,5; getitem 656,10; }else if(Class == Job_Whitesmith || Class == Job_Blacksmith){ getitem 14003,5; getitem 657,10; getitem 601,1600; }else if(Class == Job_Creator || Class == Job_Alchemist){ getitem 14003,5; getitem 657,10; getitem 7136,5; getitem 7135,5; getitem 547,150; } } end; //-------------------------------------------------------------------------------------// //-------------------------------------------------------------------------------------// //-------------------------------------------------------------------------------------// OnDoStart: mapannounce ""+.Map$+"","Admin: You have 1 minute to set-up your supplies.",0; announce "Admin: Betting for your favorite team is now open at prontera.",0; enablenpc "PVPB"; initnpctimer; end; OnTimer60000: mapannounce ""+.Map$+"","Admin: Time's up.",0; end; OnTimer63000: mapannounce ""+.Map$+"","Admin: You will warped now to the battle arena.",0; stopnpctimer; disablenpc "PVPB"; goto S_warp; end; S_warp: set .@bmap, rand(getarraysize(.BMap$)); set $TMap$, .BMap$[.@bmap]; set .@Xmapa, .Xa[.@bmap]; set .@Ymapa, .Ya[.@bmap]; set .@Xmapb, .Xb[.@bmap]; set .@Ymapb, .Yb[.@bmap]; warpchar $TMap$,50,49,1; areawarp .Map$,66,60,79,77,$TMap$,.@Xmapa,.@Ymapa; // Team A areawarp .Map$,120,60,133,77,$TMap$,.@Xmapb,.@Ymapb; // Team B sleep 5000; mapannounce ""+$TMap$+"","Before we start you have 10 seconds to buffs",0; sleep 10000; mapannounce ""+$TMap$+"","Get ready at the count of 5 we will start the battle!!....",0; sleep 3000; mapannounce ""+$TMap$+"","5",0; sleep 1000; mapannounce ""+$TMap$+"","4",0; sleep 1000; mapannounce ""+$TMap$+"","3",0; sleep 1000; mapannounce ""+$TMap$+"","2",0; sleep 1000; mapannounce ""+$TMap$+"","1",0; sleep 1000; mapannounce ""+$TMap$+"","GO!",0; end; //-------------------------------------------------------------------------------------// //-------------------------------------------------------------------------------------// //-------------------------------------------------------------------------------------// OnDoTimer: if ( compare( .@atcmd_parameters$, "on" )) { mapannounce ""+$TMap$+"","5 minutes to eliminate all your opponent.",0; initnpctimer; end; OnTimer120000: mapannounce ""+$TMap$+"","3 minutes left to eliminate all your opponent.",0; end; OnTimer180000: mapannounce ""+$TMap$+"","2 minutes left to eliminate all your opponent.",0; end; OnTimer240000: mapannounce ""+$TMap$+"","1 minute left to eliminate all your opponent.",0; end; OnTimer300000: mapannounce ""+$TMap$+"","Time is up.",0; stopnpctimer; goto OnDoCheck; }else if ( compare( .@atcmd_parameters$, "off" )) { stopnpctimer; goto OnDoCheck; } message strcharinfo(0),"Usage @gvgtimer <on/off>"; message strcharinfo(0),"@gvgtimer failed."; end; //-------------------------------------------------------------------------------------// //-------------------------------------------------------------------------------------// //-------------------------------------------------------------------------------------// OnDoCheck: query_sql ("SELECT `party_id` FROM `party` WHERE `name` = '"+$teama$+"'",.@pid5); getpartymember .@pid5, 1; getpartymember .@pid5, 2; for ( set .@i, 0; .@i < .MaxMembers; set .@i, .@i +1 ){ if ( isloggedin( $@partymemberaid[.@i], $@partymembercid[.@i] ) ){ attachrid $@partymemberaid[.@i]; if(strcharinfo(3) == $TMap$) {set .count_online1, .count_online1 +1;} } } query_sql ("SELECT `party_id` FROM `party` WHERE `name` = '"+$teamb$+"'",.@pid6); getpartymember .@pid6, 1; getpartymember .@pid6, 2; for ( set .@i, 0; .@i < .MaxMembers; set .@i, .@i +1 ){ if ( isloggedin( $@partymemberaid[.@i], $@partymembercid[.@i] ) ){ attachrid $@partymemberaid[.@i]; if(strcharinfo(3) == $TMap$) {set .count_online2, .count_online2 +1;} } } if(.count_online1 == .count_online2){ announce ""+getpartyname(.@pid1)+" Vs "+getpartyname(.@pid2)+" : The battle is draw!",0; set $winner$, $teamab$; }else if(.count_online1 > .count_online2){ announce ""+getpartyname(.@pid1)+" Vs "+getpartyname(.@pid2)+" : Winner "+getpartyname(.@pid1)+".",0; set $winner$, $teama$; }else if(.count_online1 < .count_online2){ announce ""+getpartyname(.@pid1)+" Vs "+getpartyname(.@pid2)+" : Winner "+getpartyname(.@pid2)+".",0; set $winner$, $teamb$; } set .count_online1,0; set .count_online2,0; atcommand "@doommap"; donpcevent "Party Vs Party Betting::OnBet"; end; //-------------------------------------------------------------------------------------// //-------------------------------------------------------------------------------------// //-------------------------------------------------------------------------------------// OnDoDismiss: query_sql ("SELECT `party_id` FROM `party` WHERE `name` = '"+$teama$+"'",.@pid7); getpartymember .@pid7, 1; getpartymember .@pid7, 2; for( set .@i, 0; .@i < .MaxMembers; set .@i, .@i + 1 ){ if ( isloggedin( $@partymemberaid[.@i], $@partymembercid[.@i] ) ){ attachrid $@partymemberaid[.@i]; if(strcharinfo(3) != .Map$) {end;} unequip EQI_HEAD_TOP; unequip EQI_ARMOR; unequip EQI_HAND_L; unequip EQI_HAND_R; unequip EQI_GARMENT; unequip EQI_SHOES; unequip EQI_ACC_L; unequip EQI_ACC_R; unequip EQI_HEAD_MID; unequip EQI_HEAD_LOW; if(Class == Job_Whitesmith || Class == Job_Creator){atcommand "@clearcart";} getinventorylist; for(set .@p,0; .@p<getarraysize(.delitem); set .@p,.@p+1){ if(countitem( .delitem[.@p]) > 0){ delitem .delitem[.@p],countitem(.delitem[.@p]); } } getinventorylist; for(set .@k,0; .@k<getarraysize(.delitems); set .@k,.@k+1){ if(countitem( .delitems[.@k]) > 0){ delitem .delitems[.@k],countitem(.delitems[.@k]); } } savepoint "prontera", 116, 73; warp "prontera", 116, 73; } } query_sql ("SELECT `party_id` FROM `party` WHERE `name` = '"+$teamb$+"'",.@pid8); getpartymember .@pid8, 1; getpartymember .@pid8, 2; for( set .@i, 0; .@i < .MaxMembers; set .@i, .@i + 1 ){ if ( isloggedin( $@partymemberaid[.@i], $@partymembercid[.@i] ) ){ attachrid $@partymemberaid[.@i]; if(strcharinfo(3) != .Map$) {end;} unequip EQI_HEAD_TOP; unequip EQI_ARMOR; unequip EQI_HAND_L; unequip EQI_HAND_R; unequip EQI_GARMENT; unequip EQI_SHOES; unequip EQI_ACC_L; unequip EQI_ACC_R; unequip EQI_HEAD_MID; unequip EQI_HEAD_LOW; if(Class == Job_Whitesmith || Class == Job_Creator){atcommand "@clearcart";} getinventorylist; for(set .@p,0; .@p<getarraysize(.delitem); set .@p,.@p+1){ if(countitem( .delitem[.@p]) > 0){ delitem .delitem[.@p],countitem(.delitem[.@p]); } } getinventorylist; for(set .@k,0; .@k<getarraysize(.delitems); set .@k,.@k+1){ if(countitem( .delitems[.@k]) > 0){ delitem .delitems[.@k],countitem(.delitems[.@k]); } } savepoint "prontera", 116, 73; warp "prontera", 116, 73; } } end; } At this part when I have 1 party member and I change this .MaxMembers to 5. My party will be warped but also other party will be warp to in order to complete the 5 member needed. At this part I just change script and doesn't work now. Both party dont receive supply. Can you please check if my codes is correct. I am not sure if this part has no minor errors. Can you please also double check the timer if I am correct. At this part it should be removing the items from the characters to avoid exploit but it doesn't work now same as the "gvgsupply". I hope someone will be interested to my script and help me.. Willing to share this idea when its 100% completed.
  5. I need to make a sniper trial event that when you use Double Strafe to the monster. it will count as your points but if you use normal attack or other skill it will not be counted. I dont know the script command to detect the skill used in the monster please help me.
  6. /// Presents a list of weapon items that can be refined [Taken from jAthena] (ZC_NOTIFY_WEAPONITEMLIST). /// 0221 <packet len>.W { <index>.W <name id>.W <refine>.B <card1>.W <card2>.W <card3>.W <card4>.W }* void clif_item_refine_list(struct map_session_data *sd) { int i,c; int fd; uint16 skill_lv; int wlv; int refine_item[5]; nullpo_retv(sd); skill_lv = pc_checkskill(sd,WS_WEAPONREFINE); fd=sd->fd; refine_item[0] = -1; refine_item[1] = pc_search_inventory(sd,1010); refine_item[2] = pc_search_inventory(sd,1011); refine_item[3] = refine_item[4] = pc_search_inventory(sd,984); WFIFOHEAD(fd, MAX_INVENTORY * 13 + 4); WFIFOW(fd,0)=0x221; for(i=c=0;i<MAX_INVENTORY;i++){ if(sd->status.inventory[i].nameid > 0 && sd->status.inventory[i].refine < skill_lv && sd->status.inventory[i].identify && (wlv=itemdb_wlv(sd->status.inventory[i].nameid)) >=1 && refine_item[wlv]!=-1 && !(sd->status.inventory[i].equip&EQP_ARMS)){ WFIFOW(fd,c*13+ 4)=i+2; WFIFOW(fd,c*13+ 6)=sd->status.inventory[i].nameid; WFIFOB(fd,c*13+ 8)=sd->status.inventory[i].refine; clif_addcards(WFIFOP(fd,c*13+9), &sd->status.inventory[i]); c++; } } WFIFOW(fd,2)=c*13+4; WFIFOSET(fd,WFIFOW(fd,2)); if (c > 0) { sd->menuskill_id = WS_WEAPONREFINE; sd->menuskill_val = skill_lv; } } Hello I found this in src/map/clif.c and my suggestion is I want to add an announcement when a whitesmith refined a weapon to +7 or higher. The example message will be "Citizens of Midgard,Lady Luck shines upon [super Whitesmith]!! He/She successfully refined [ Blade [4] ] to +7.". "He/She" on this part of the announcement message . If the char is a male the message will be "He successfully refined [ Blade [4] ] to +7" If the char is a female the message will be "She successfully refined [ Blade [4] ] to +7"
  7. private function verify() { $qString = 'cmd=_notify-validate&'.$this->ipnVarsToQueryString(); $request = "POST /cgi-bin/webscr HTTP/1.1\r\n"; $request .= "Content-Type: application/x-www-form-urlencoded\r\n"; $request .= 'Content-Length: '.strlen($qString)."\r\n"; $request .= 'Host: '.$this->ppServer."\r\n"; $request .= "Connection: close\r\n\r\n"; $request .= $qString; $this->logPayPal('Query string: %s', $qString); $this->logPayPal('Establishing connection to PayPal server at %s:80...', $this->ppServer); $fp = @fsockopen($this->ppServer, 80, $errno, $errstr, 20); if (!$fp) { $this->logPayPal("Failed to connect to PayPal server: [%d] %s", $errno, $errstr); return false; } else { $this->logPayPal('Connected. Sending request back to PayPal...'); // Send POST request just as PayPal sent it. $this->logPayPal('Sent %d bytes of transaction data. Request size: %d bytes.', strlen($qString), fputs($fp, $request)); $this->logPayPal('Reading back response from PayPal...'); // Read until EOF, last line contains VERIFIED or INVALID. $is_verified = false; while (!feof($fp)) { if ($line = trim(fgets($fp)) == 'VERIFIED'){$is_verified = true;}; } // Close connection. fclose($fp); // Check verification status of the notify request. if ($is_verified == true) { $this->logPayPal('Notification verified. (recv: VERIFIED)'); $this->txnIsValid = true; return true; } else { $this->logPayPal('Notification failed to verify. (recv: %s)', strtoupper($line)); return false; } } } Anyone can debug if this part is correct? There's a scenario that when my players donate they not receive the credtis but I can receive their money.. Please help.. And maybe the main problem is this part $qString = 'cmd=_notify-validate&'.$this->ipnVarsToQueryString(); $request = "POST /cgi-bin/webscr HTTP/1.1\r\n"; $request .= "Content-Type: application/x-www-form-urlencoded\r\n"; $request .= 'Content-Length: '.strlen($qString)."\r\n"; $request .= 'Host: '.$this->ppServer."\r\n"; $request .= "Connection: close\r\n\r\n"; $request .= $qString; Can you help me change this part if this is not existing anymore in paypal.com
  8. I want to open this topic again... I guess this part is been changed again by paypal. Please help $qString = 'cmd=_notify-validate&'.$this->ipnVarsToQueryString(); $request = "POST /cgi-bin/webscr HTTP/1.1\r\n"; $request .= "Content-Type: application/x-www-form-urlencoded\r\n"; $request .= 'Content-Length: '.strlen($qString)."\r\n"; $request .= 'Host: '.$this->ppServer."\r\n"; $request .= "Connection: close\r\n\r\n"; $request .= $qString;
  9. File Name: Guild Package System + Freebies System + Reward System Package files File Submitter: gmprestige File Submitted: 16 Dec 2013 File Category: Utilities Content Author: Noriel Calingasan //= 100% Working on eAthena,rAthena and Hercules. //= @gpcheck - a command to check your guild package status. //= Highly recommended to harmony user and any server rates. //= Query_sql base script. //------------------------------------------------------------------------------------------------- // Note 1: If .itemtype is set to 2 your .FreebiesAmount value will be always 1. // Note 2: Don't set to 2 if your svn don't support rentitem2 script command. // Note 3: Item Bound System working on rAthena and Hercules // Note 4: Works only if the .itemtype is set to 2. 60 = 1 minute / 3600 = 1 hour / 86400 = 1 day / 604800 = 1 week // Note 5: Item refinement must don't exceed the limit or else item refinement will stay on the // server max item refinement. //------------------------------------------------------------------------------------------------- //------------------------------------------------------------------------------------------------- //- Guild Package Item List. setarray .Gitem[0], 13810, 13536, 13537, 13535, 13534, 13534, 7060, 668, 5058, 5033, 5084, 5065, 5078; // Item Number setarray .GAmount[0], 100, 50, 50, 50, 100, 100, 300, 500, 1, 1, 1, 1, 1; // Amount (Note 1) setarray .GItemRefine[0], 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0; // Input the refinement of each item. ( Recommended only to equipment type items. ) (Note 5) setarray .GRentTime[0], 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0; // Input the expiration time of each item. ( Recommended only to equipment type items. ) (Note 4)//------------------------------------------------------------------------------------------------- //- Additional Item List for x3 amount of members base is (.MaxMembers/.Mdivider). setarray .Aitem[0], 5170, 5016, 5108, 5025, 5038, 985, 985, 985, 984, 984, 984; // Item Number setarray .AAmount[0], 2, 2, 2, 1, 1, 50, 50, 50, 50, 50, 50; // Amount setarray .AItemRefine[0], 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0; // Input the refinement of each item. ( Recommended only to equipment type items. ) (Note 5) setarray .ARentTime[0], 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0; // Input the expiration time of each item. ( Recommended only to equipment type items. ) (Note 4)//------------------------------------------------------------------------------------------------- set .n$, "^FF0000[ Rune-Midgard [ GM ] ]^000000"; // Input the NPC name. set .check,1; // 0 - IP Address, 1 - Harmony Mac Address set .itemtype,0; // 0 - Disable, 1 - Item bound, 2 - Rental (Note 2) set .boundtype,1; // 1 - Account Bound, 2 - Guild Bound, 3 - Party Bound, 4 - Character Bound (Note 3) set .MaxMembers,25; // The maximum guild members needed must be divisible by .Mdivider. set .Mdivider,5; // Max guild members divider (Don't touch this) set .ReqLvl,90; // Guild members required level set .mac$,0; // Default MAC Address ( Don't touch this ) //------------------------------------------------------------------------------------------------- Skype: [email protected] Contact me anytime Click here to download this file
  10. - script auto_kicker -1,{ OnPCLoadMapEvent: if ( getmapflag( strcharinfo(3), battleground ) ) goto L_kick; end; L_kick: .@nb = query_sql( "select `login`.account_id from `char` right join login on login.account_id = `char`.account_id where `char`.online = 1 and login.last_mac = ( select last_mac from login where account_id = "+ getcharid(3) +" )", .@aid ); if ( .@nb >= 2 ) { for ( .@i = 0; .@i < .@nb; .@i++ ) { attachrid .@aid[.@i]; if(CheckVending()) { end; } addtimer 1, strnpcinfo(0)+"::Onkick"; } } end; Onkick: mes "Dual Client is disabled in battlegrounds."; sleep2 1000; atcommand "@kick "+ strcharinfo(0); end; } First I want to know if this is correct if not please help me change it.
  11. Can you please share your I codes because I don't know what to do.
  12. I guess the real problem is the flux because it's the only one who is responsible for the players credits.
  13. I have a problem with guild storage. Some of my players says that their guild storage is 0/600. I just check my sql database of `guild_storage` but it's empty. All the items that they stored are not listed on this table. Please help me I'm using ramod. CREATE TABLE IF NOT EXISTS `guild_storage` ( `id` int(10) unsigned NOT NULL auto_increment, `guild_id` int(11) unsigned NOT NULL default '0', `nameid` int(11) unsigned NOT NULL default '0', `amount` int(11) unsigned NOT NULL default '0', `equip` int(11) unsigned NOT NULL default '0', `identify` smallint(6) unsigned NOT NULL default '0', `refine` tinyint(3) unsigned NOT NULL default '0', `attribute` tinyint(4) unsigned NOT NULL default '0', `card0` smallint(11) NOT NULL default '0', `card1` smallint(11) NOT NULL default '0', `card2` smallint(11) NOT NULL default '0', `card3` smallint(11) NOT NULL default '0', `expire_time` int(11) unsigned NOT NULL default '0', `bound` tinyint(3) unsigned NOT NULL default '0', `unique_id` bigint(20) unsigned NOT NULL default '0', PRIMARY KEY (`id`), KEY `guild_id` (`guild_id`) ) ENGINE=MyISAM;
  14. The problem now is it don't continue on this part no warping happens. set $teama$,0; set $teamb$,0; areawarp .Map$,66,60,79,77,"veil", 120, 110; // Team A areawarp .Map$,120,60,133,77,"veil", 120, 110; // Team B OnDoDismiss: deletearray .@acc[0],getarraysize(.@acc); query_sql("SELECT `account_id` FROM `char` WHERE `online` = '1'", .@acc); for(set .@i,0; .@i<getarraysize(.@acc); set .@i,.@i+1){ attachrid .@acc[.@i]; if(strcharinfo(3) != .Map$) {end;} unequip EQI_HEAD_TOP; unequip EQI_ARMOR; unequip EQI_HAND_L; unequip EQI_HAND_R; unequip EQI_GARMENT; unequip EQI_SHOES; unequip EQI_ACC_L; unequip EQI_ACC_R; unequip EQI_HEAD_MID; unequip EQI_HEAD_LOW; while( .@item1 < .delitem_size ){ .@i = countitem( .delitem[.@item1] ); if( .@i ) delitem .delitem[.@item1],.@i; .@item1++; } savepoint "veil", 120, 110; } set $teama$,0; set $teamb$,0; areawarp .Map$,66,60,79,77,"veil", 120, 110; // Team A areawarp .Map$,120,60,133,77,"veil", 120, 110; // Team B end;
  15. no I just want to delete this list setarray .delitem[0],5288,5401,5471,515,5362,5361,5462,5225,5420,5313,5375,5389,5325,5463,5372,5379, 5137,5377,5800,18511,5376,5314,5155,18510,18508,18509,18506,5423,5224,4035,4092, 4004,4043,4031,4058,4133,4381,4079,4064,2310,2102,2504,2404,2621,2624,1208,1108, 1117,1408,1464,1302,1352,1514,1602,1705,1802,1902,1953,1550,1251,25001,14003,645, 657,656,678,12009,1751,715,716,717,7136,7135; setarray .delitems[0],14003,645,657,656,678,12009,1751,715,716,717,7136,7135;
  16. got it. getinventorylist; for(set .@k,0; .@k<getarraysize(.delitems); set .@k,.@k+1){ if(countitem(.delitems[.@k])>0){ delitem .delitems[.@k],@inventorylist_amount[.@k]; } } is this one correct now?
  17. for(set .@i,0; .@i < getarraysize(@inventorylist_id); set .@i,.@i+1){ for(set .@k,0; .@k<getarraysize(.delitems); set .@k,.@k+1){ if(@inventorylist_id[.@i] == .delitems[.@k]){ delitem .delitems[.@k],@inventorylist_amount[.@k]; } } } I have a problem with this it says. [Error]: script:delitem: failed to delete 3 items (AID=2000000 item_id=14003). [Debug]: Source (NPC): mainevent (invisible/not on a map) Please help me.
  18. Hello I am having a problem with this one.. When im using the @gvgstart command nothing happens. it should be warping those char inside the area. Please help asap. OnDoStart: query_sql("SELECT account_id FROM `char` WHERE last_map = '"+.Map$+"' AND online = '1'", .@acc); for(set .@i,0; .@i<getarraysize(.@acc); set .@i,.@i+1){ attachrid .@acc[.@i]; if (getgmlevel() >= .gmlvl){end;} for(set .@k,0; .@k<getarraysize(.delitems); set .@k,.@k+1){ delitem .delitems[.@k],@inventorylist_amount[.@k]; } if (Class == Job_Lord_Knight){ getitem 14003,5; getitem 657,10; }else if(Class == Job_Paladin){ getitem 14003,5; getitem 657,10; }else if(Class == Job_Assassin_Cross){ getitem 14003,5; getitem 656,10; getitem 678,3; }else if(Class == Job_Stalker){ getitem 14003,5; getitem 657,10; }else if(Class != Job_Sniper){ getitem 14003,5; getitem 656,10; getitem 12009,2; }else if(Class != Job_Clown){ getitem 14003,5; getitem 645,10; getitem 12009,2; }else if(Class != Job_Gypsy){ getitem 14003,5; getitem 645,10; getitem 12009,2; }else if(Class != Job_High_Wizard){ getitem 14003,5; getitem 656,10; getitem 717,75; getitem 716,75; getitem 715,75; }else if(Class != Job_Professor){ getitem 14003,5; getitem 656,10; getitem 717,75; getitem 716,75; getitem 715,75; }else if(Class != Job_High_Priest){ getitem 14003,5; getitem 645,10; getitem 717,75; }else if(Class != Job_Champion){ getitem 14003,5; getitem 656,10; //}else if(Class == Job_Whitesmith){ //getitem 14003,5; getitem 657,10; getitem 601,800; }else if(Class == Job_Creator){ getitem 14003,5; getitem 657,10; getitem 7136,5; getitem 7135,5; } } initnpctimer; mapannounce ""+.Map$+"","Admin: You have 2 minutes to set-up your supplies.",0; end; OnTimer60000: mapannounce ""+.Map$+"","Admin: You have 1 minutes left to set-up your supplies.",0; end; OnTimer120000: mapannounce ""+.Map$+"","Admin: Time's up.",0; end; OnTimer123000: mapannounce ""+.Map$+"","Admin: You will warped now to the battle arena.",0; stopnpctimer; end; set .@bmap, rand(getarraysize(.BMap$)); set .@bmap$, .BMap$[.@bmap]; set .@Xmapa, .Xa[.@bmap]; set .@Ymapa, .Xb[.@bmap]; set .@Xmapb, .Ya[.@bmap]; set .@Ymapb, .Yb[.@bmap]; warpchar .@bmap$,50,49,1; areawarp .Map$,66,60,79,77,.@bmap$,.@Xmapa,.@Xmapa; // Team A areawarp .Map$,120,60,133,77,.@bmap$,.@Xmapb,.@Ymapb; // Team B sleep2 5000; mapannounce ".@bmap$","Before we start you have 10 seconds to buffs",0; sleep2 10000; mapannounce ".@bmap$","Get ready at the count of 5 we will start the battle!!....",0; sleep2 3000; mapannounce ".@bmap$","5",0; sleep2 1000; mapannounce ".@bmap$","4",0; sleep2 1000; mapannounce ".@bmap$","3",0; sleep2 1000; mapannounce ".@bmap$","2",0; sleep2 1000; mapannounce ".@bmap$","1",0; sleep2 1000; mapannounce ".@bmap$","GO!",0; end; end; OnInit: disablenpc "number1"; disablenpc "number2"; disablenpc "number3"; disablenpc "number4"; disablenpc "number5"; disablenpc "number6"; disablenpc "number7"; disablenpc "number8"; setwall "06guild_r",74,78,4,2,0,"TeamAWall"; setwall "06guild_r",128,78,4,2,0,"TeamBWall"; set .MaxMembers,1; set .Zeny,1000000; set .Map$,"06guild_r"; set .gmlvl, 1; setarray .delitem[0],5288,5401,5471,515,5362,5361,5462,5225,5420,5313,5375,5389,5325,5463,5372,5379, 5137,5377,5800,18511,5376,5314,5155,18510,18508,18509,18506,5423,5224,4035,4092, 4004,4043,4031,4058,4133,4381,4079,4064,2310,2102,2504,2404,2621,2624,1208,1108, 1117,1408,1464,1302,1352,1514,1602,1705,1802,1902,1953,1550,1251,25001; setarray .delitems[0],14003,645,657,656,678,12009,1751,715,716,717,7136,7135; setarray .BMap$[0],"guild_vs1","guild_vs2","guild_vs3","guild_vs4","guild_vs5"; setarray .Xa[0],7,7,16,7,19; setarray .Ya[0],49,49,50,49,49; setarray .Xb[0],92,92,83,92,80; setarray .Yb[0],49,49,50,49,49; setarray .AItem[0],2310,2102,2504,2404; setarray .ACard[0],4031,4058,4133,4381; // Commands bindatcmd "team","mainevent::OnDoTeam",99,99; bindatcmd "npcitem","mainevent::OnDoNpcItem",99,99; bindatcmd "gvgstart","mainevent::OnDoStart",99,99; bindatcmd "dismiss","mainevent::OnDoDismiss",99,99; end;
  19. I need a refiner that can refine all items in your inventory into it's safe limit. Example: I have a knife[4] x 10 and I just click that npc. The npc will refine my Knife[4] x 10 to its safe limit +7. Please help
×
×
  • Create New...