Jump to content

eetuy20

Members
  • Content Count

    8
  • Joined

  • Last visited

  1. Hi all, I am having problem with this script. What I want is that every time a party finished the dungeon they will automatically received the reward and will be teleported to Prontera. But, what is happening is that everyt ime a party finished the dungeon, only the leader of the party received the reward and not the members. here's the script: ////// Author Goddameit// Version 2014/05/14// Web http://goo.gl/0vY9GV////prontera,156,223,4 script Party Dungeon#fb156df 4_LEVITATEMAN,{ if( .NP_GAME_STATUS ) { mes "Sorry, someone is playing."; close; } mes "Hi, do you want to join this game?"; if( select("No","Yes") == 1 ) close; next; if( getcharid(1) == 0 ) { mes "You need to join or create a party."; close; } if( getcharid(0) != getpartyleader(getcharid(1),2) ) { mes "You're not party leader"; close; } if( countitem(.SP_PLAYER_ITEM) == 0 ) { mes "You don't have any "+getitemname(.SP_PLAYER_ITEM); close; } getpartymember getcharid(1),2; getpartymember getcharid(1),1; if( $@partymembercount < .SP_PLAYER_NUM ) { mes "You need at least "+.SP_PLAYER_NUM+" player"; deletearray $@partymembercid[0],$@partymembercount; deletearray $@partymemberaid[0],$@partymembercount; $@partymembercount = 0; close; } .@amount = 0; for( .@i = 0; .@i<$@partymembercount; .@i++ ) { if( !isloggedin($@partymemberaid[.@i],$@partymembercid[.@i]) ) { $@partymemberaid[.@i] = 0; $@partymembercid[.@i] = 0; }else .@amount++; } if( .@amount < .SP_PLAYER_NUM ) { mes "You need at least "+.SP_PLAYER_NUM+" player"; deletearray $@partymembercid[0],$@partymembercount; deletearray $@partymemberaid[0],$@partymembercount; $@partymembercount = 0; close; } if( .NP_GAME_STATUS ) { mes "Sorry, someone is playing."; close; } .@amount = 0; delitem .SP_PLAYER_ITEM,1; .NP_GAME_LPID = getcharid(1); .NP_GAME_LAID = getcharid(3); .NP_GAME_LCID = getcharid(0); .NP_GAME_STATUS = 1; .NP_GAME_TICK = 600; deletearray .p_cid[0],.p_num; deletearray .p_aid[0],.p_num; .p_num = $@partymembercount; copyarray .p_cid[0],$@partymembercid[0],.p_num; copyarray .p_aid[0],$@partymemberaid[0],.p_num; deletearray $@partymembercid[0],$@partymembercount; $@partymembercount = 0; disablenpc "Treasure Chest#ukdfkbp"; initnpctimer; mes "Done"; warpparty "guild_vs5",50,55,getcharid(1); close; end;OnTimer1000: if( !mobcount("guild_vs5",strnpcinfo(0)+"::OnKill") && .NP_GAME_STATUS == 1 ) { sleep2 5000; monster "guild_vs5",50,72,"--ja--",1502,1,strnpcinfo(0)+"::OnKill"; } if( .NP_GAME_TICK > 0 ) { .NP_GAME_TICK--; .@bool = 0; if( !isloggedin(.NP_GAME_LAID,.NP_GAME_LCID) ) .@bool = 1; if( .@bool == 0 ) { getmapxy(.@map$, .@x, .@y, 0, rid2name(.NP_GAME_LAID)); if( .@map$ != "guild_vs5" ) .@bool = 1; } if( .@bool == 1 ) { .NP_GAME_STATUS = -1; mapannounce "guild_vs5","[System]: You're team leader is gone!!",0; sleep2 2000; mapwarp "guild_vs5","prontera",155,180; .NP_GAME_STATUS = 0; }else initnpctimer; } else { .NP_GAME_STATUS = -1; mapannounce "guild_vs5","[System]: Time Out!!",0; sleep2 2000; mapwarp "guild_vs5","prontera",155,180; .NP_GAME_STATUS = 0; donpcevent "Treasure Chest#ukdfkbp::OnCleanVar"; disablenpc "Treasure Chest#ukdfkbp"; } end;OnKill: detachrid; if( .NP_GAME_STATUS == 1 ) { .NP_GAME_STATUS = 2; mapannounce "guild_vs5","[System]: You win!!",0; sleep2 4000; mapannounce "guild_vs5","[System]: Here is your reward!!",0; sleep2 2000; getcharid(1),1; getcharid(1),2; if( $@partymembercount <= .SP_PLAYER_NUM ) { getitem 7959,1,$@partymemberaid[.@i]; } if( $@partymembercount <= .SP_PLAYER_NUM ) { getitem 674,50,$@partymemberaid[.@i]; }// for( .@i = 0; .@i < $@partymembercount; set .@i,.@i + 1 )// getitem 501,100,$@partymemberaid[.@i]; sleep2 4000; mapannounce "guild_vs5","[System]: You will now be teleported to Prontera!!",0; sleep2 2000; killmonsterall "guild_vs5"; mapwarp "guild_vs5","prontera",155,180; donpcevent "Party Dungeon#fb156df::OnCleanVar";// sleep2 2000;// enablenpc "Treasure Chest#ukdfkbp";// donpcevent "Treasure Chest#ukdfkbp::OnCleanVar";// .NP_GAME_TICK = 300;// $@NP_GAME_LPID = .NP_GAME_LPID;// .@j = 0;// for( .@i = 0; .@i<.p_num; .@i++ )// {// if( !isloggedin(.p_aid[.@i],.p_cid[.@i]) )// continue;// getmapxy(.@map$, .@x, .@y, 0, rid2name(.p_aid[.@j]));// if( .@map$ != "guild_vs5" )// continue;// $@p_aid[.@j] = .p_aid[.@i];// $@p_name$[.@j] = rid2name(.p_aid[.@i]);// .@j++;// }// $@p_num = .@j; } end;OnInit: .SP_PLAYER_NUM = 1; .SP_PLAYER_ITEM = 674; disablenpc "Treasure Chest#ukdfkbp"; mapwarp "guild_vs5","prontera",155,180; end;OnCleanVar: donpcevent "Treasure Chest#ukdfkbp::OnCleanVar"; disablenpc "Treasure Chest#ukdfkbp"; deletearray .p_aid[0], .p_num; deletearray .p_cid[0], .p_num; .p_num = 0; .NP_GAME_LPID = 0; .NP_GAME_LAID = 0; .NP_GAME_LCID = 0; .NP_GAME_TICK = 0; end;}guild_vs5,50,55,0 script Treasure Chest#ukdfkbp 1324,{ function __st ; if( getcharid(0) != getpartyleader($@NP_GAME_LPID,2) ) end; .@item = 2; setarray .@item1max[0],674,100; setarray .@item2max[0],7959,10; while( __st() == 0 ) { mes "Done!"; next; mes "------Remaining Prizes------"; for( .@i = 1; .@i<=.@item; .@i++ ) mes ""+getitemname(getd(".@item"+.@i+"max[0]"))+" X "+(getd(".@item"+.@i+"max[1]")-.@useitem[.@i])+""; if( (.@co = prompt(implode($@p_name$,":")+":[Send]")) == 255 ) { mes "Thank you!"; next; close; } if( .@co > $@p_num ) { close2; detachrid; for( .@j = 0; .@j<$@p_num; .@j++ ) { for( .@i = 1; .@i<=.@item; .@i++ ) { getitem getd(".@item"+.@i+"max[0]"),getd(".@player"+.@j+"item["+.@i+"]"),$@p_aid[.@j]; sleep2 1; } } mapwarp "guild_vs5","prontera",155,180; donpcevent "Party Dungeon#fb156df::OnCleanVar"; end; } mes "Alright!"; next; .@co -= 1; if( .@co < 0 ) break; deletearray .@select$[0],.@item; next; mes "--- "+$@p_name$[.@co]+" have these rewards---"; for( .@i = 1; .@i<=.@item; .@i++ ) { .@select$[.@i-1] = ""+getitemname(getd(".@item"+.@i+"max[0]"))+" X "+(getd(".@player"+.@co+"item["+.@i+"]"))+""; .@selectz$[.@i-1] = ""+getitemname(getd(".@item"+.@i+"max[0]"))+""; mes ""+.@select$[.@i-1]; } if( (.@ct = prompt(implode(.@selectz$,":"))) == 255 ) continue; mes "Okay!"; next; mes ""+$@p_name$[.@co]+" now has "+.@select$[.@ct-1]+" How many would you like to give him/her?"; mes ""+.@selectz$+" to..."; input .@amount; if( .@amount < 0 ) .@amount = 0; if( (.@useitem[.@ct]-getd(".@player"+.@co+"item["+.@ct+"]")+.@amount) > getd(".@item"+.@ct+"max[1]") ) .@amount = getd(".@item"+.@ct+"max[1]")-.@useitem[.@ct]; setd ".@player"+.@co+"item["+.@ct+"]", .@amount; deletearray .@useitem[0], .@item; for( .@i = 1; .@i<=.@item; .@i++ ) for( .@j = 0; .@j<$@p_num; .@j++ ) set .@useitem[.@i], .@useitem[.@i] + getd(".@player"+.@j+"item["+.@i+"]"); } mes "You will now be teleported back to Prontera "; next; close; end;OnCleanVar: deletearray $@p_aid[0], $@p_num; deletearray $@p_name$[0], $@p_num; $@p_num = 0; $@NP_GAME_LPID = 0; end; function __st { return getvariableofnpc(.NP_GAME_STATUS,"Party Dungeon#fb156df"); }}
  2. ^ up.. how to make the emperium unable to hit by the owner? coz when I owned the emp, I can still hit the emperium. any help? thanks!
  3. ill try this one, I hope it will work!
  4. hi @zackdreaver its fixed now! I just delete all inside my "msgstringtable.txt" and replace it with all text inside "[2013-08-07Ragexe]msgstringtable.txt" and it worked like a charm! you're a hero! its been a week trying to solve this! /no1 btw, another question maybe you can help me again.. Im trying to put a custom item after following the video tutorial I still can't get it worked. when I use @ii it shows the correct information for the item but when I try to summon the item it shows different item .. what do you think is the issue? thank you!
  5. hi @zackdreaver, im using 2013-08-07Ragexe so i should use this "[2013-08-07Ragexe]msgstringtable.txt" and change it to "msgstringtable.txt" and put it inside Data folder and build a new grf? am I right?
  6. hi @Mhalicot, I used your msgstringtable.txt but still my inventory is Big any other solution sir? thanks!
  7. Hi guys, I am having a problem with my client.. my server is running good and actually I can connect to my server BUT local only.. but when I try to connect to the server through the internet, I can't connect. I already changed my char_ip:, map_ip: and my <address> x.x.x.x </address> to WAN IP. Port 6900, 6121 and 5121 are already forwareded by my router. <--- I already check those ports using canyouseeme.org and they are all open. Now, my problem is everytime I run my game the server says "Failed to connect to server". please guys! I want to host my server here in our house! I hope someone can help me. Thank you so much!
×
×
  • Create New...

Important Information

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