Jump to content

sader1992

Content Moderator
  • Posts

    1678
  • Joined

  • Last visited

  • Days Won

    72

Everything posted by sader1992

  1. what the warp you use ? i suggest you try like this prontera,156,22,0 script prt_fild08_warp 45,1,1,{ 'map$ = instance_mapname("prt_fild08"); instance_warpall 'map$,170,375; }
  2. if you did include one of the files so we can debug however i think it's maybe something like the map name and the npc name they are generated for the instance *instance_npcname("<npc name>"{,<instance id>}) *instance_mapname("<map name>"{,<instance id>}) example: donpcevent instance_npcname("#PronteraNPC") + "::OnStart"; end; prontera,0,0,0 script #PronteraNPC CLEAR_NPC,{ OnStart: 'map$ = instance_mapname("prontera"); 'ondead$ = instance_npcname("#PronteraNPC")+"::OnMobDead"; monster 'map$,0,0,"Poring",1002,1,'ondead$; end; OnMobDead: 'map$ = instance_mapname("prontera"); 'ondead$ = instance_npcname("#PronteraNPC")+"::OnMobDead"; monster 'map$,0,0,"Poring",1002,1,'ondead$; end; }
  3. Visual Studio Code // Place your settings in this file to overwrite the default settings { "files.encoding": "utf8", "files.autoGuessEncoding": true }
  4. don't write the id for the map in the map_index just put the map name vend_zone
  5. under setarray .rewarditem[0], // rewards for the winning team: <item>,<amount>,... 501, 10; add setarray .rewarditemloss[0], // rewards for the lossing team: <item>,<amount>,... 501, 10; at line 47 edit this callsub L_Reward, 1; to this callsub L_Reward, 1 , 2; at the line 51 edit this callsub L_Reward, 2; to this callsub L_Reward, 2 , 1; add this at line 66 before return; for ( .@i = 0; .@i < getd(".team"+ getarg(1) +"count"); .@i++ ) getitem .rewarditemloss[0], .rewarditemloss[1], getd(".team"+ getarg(1) +"aid["+ .@i +"]" ); the full code edited //===== rAthena Script ======================================= //= Battleground: PVP //===== By: ================================================== //= AnnieRuru //===== Current Version: ===================================== //= 1.0 //===== Compatible With: ===================================== //= rAthena Project //===== Description: ========================================= //= A simple battleground script: //= Kill players from the other team. //===== Additional Comments: ================================= //= 1.0 First version, edited. [Euphy] //============================================================ - script bg_pvp#control -1,{ OnInit: .minplayer2start = 2; // minimum players to start (ex. if 3vs3, set to 3) .eventlasting = 20*60; // event duration before auto-reset (20 minutes * seconds) setarray .rewarditem[0], // rewards for the winning team: <item>,<amount>,... 501, 10; setarray .rewarditemloss[0], // rewards for the lossing team: <item>,<amount>,... 501, 10; end; OnStart: if ( getwaitingroomstate( 0, .rednpcname$ ) < .minplayer2start || getwaitingroomstate( 0, .bluenpcname$ ) < .minplayer2start ) end; // create Battleground and teams .red = waitingroom2bg( "guild_vs3", 13,50, strnpcinfo(0)+"::OnRedQuit", strnpcinfo(0)+"::OnRedDead", .rednpcname$ ); copyarray .team1aid, $@arenamembers, $@arenamembersnum; .team1count = .minplayer2start; .blue = waitingroom2bg( "guild_vs3", 86,50, strnpcinfo(0)+"::OnBlueQuit", strnpcinfo(0)+"::OnBlueDead", .bluenpcname$ ); copyarray .team2aid, $@arenamembers, $@arenamembersnum; .team2count = .minplayer2start; delwaitingroom .rednpcname$; delwaitingroom .bluenpcname$; bg_warp .red, "guild_vs3", 13,50; bg_warp .blue, "guild_vs3", 86,50; .score[1] = .score[2] = .minplayer2start; bg_updatescore "guild_vs3", .score[1], .score[2]; // match duration sleep .eventlasting * 1000; // end match, destroy Battleground, reset NPCs if ( .score[1] > .score[2] ) { mapannounce "guild_vs3", "- Red Team is victorious! -", bc_map; callsub L_Reward, 1, 2; } else if ( .score[1] < .score[2] ) { mapannounce "guild_vs3", "- Blue Team is victorious! -", bc_map; callsub L_Reward, 2, 1; } else mapannounce "guild_vs3", "- The match has ended in a draw! -", bc_map; bg_warp .red, "prontera",152,178; bg_warp .blue, "prontera",154,178; bg_destroy .red; bg_destroy .blue; donpcevent .rednpcname$ +"::OnStart"; donpcevent .bluenpcname$ +"::OnStart"; end; L_Reward: for ( .@i = 0; .@i < getd(".team"+ getarg(0) +"count"); .@i++ ) getitem .rewarditem[0], .rewarditem[1], getd(".team"+ getarg(0) +"aid["+ .@i +"]" ); for ( .@i = 0; .@i < getd(".team"+ getarg(1) +"count"); .@i++ ) getitem .rewarditemloss[0], .rewarditemloss[1], getd(".team"+ getarg(1) +"aid["+ .@i +"]" ); return; // "OnDeath" event OnRedDead: callsub L_Dead, 1; OnBlueDead: callsub L_Dead, 2; L_Dead: .score[ getarg(0) ]--; bg_updatescore "guild_vs3", .score[1], .score[2]; while ( getd( ".team"+ getarg(0) +"aid["+ .@i +"]" ) != getcharid(3) && .@i < getd(".team"+ getarg(0) +"count") ) .@i++; deletearray getd( ".team"+ getarg(0) +"aid["+ .@i +"]" ), 1; setd ".team"+ getarg(0) +"count", getd(".team"+ getarg(0) +"count") -1; bg_leave; if ( !.score[ getarg(0) ] ) awake strnpcinfo(0); sleep2 1250; percentheal 100,100; end; // "OnQuit" event OnRedQuit: callsub L_Quit, 1; OnBlueQuit: callsub L_Quit, 2; L_Quit: .score[ getarg(0) ]--; bg_updatescore "guild_vs3", .score[1], .score[2]; percentheal 100, 100; while ( getd( ".team"+ getarg(0) +"aid["+ .@i +"]" ) != getcharid(3) && .@i < getd(".team"+ getarg(0) +"count") ) .@i++; deletearray getd( ".team"+ getarg(0) +"aid["+ .@i +"]" ), 1; setd ".team"+ getarg(0) +"count", getd(".team"+ getarg(0) +"count") -1; if ( !.score[ getarg(0) ] ) awake strnpcinfo(0); end; } prontera,152,178,5 script Red Team#bg_pvp 733,{ end; OnInit: sleep 1; set getvariableofnpc( .rednpcname$, "bg_pvp#control" ), strnpcinfo(0); OnStart: waitingroom "Red Team", getvariableofnpc( .minplayer2start, "bg_pvp#control" ) +1, "bg_pvp#control::OnStart", getvariableofnpc( .minplayer2start, "bg_pvp#control" ); end; } prontera,154,178,5 script Blue Team#bg_pvp 734,{ end; OnInit: sleep 1; set getvariableofnpc( .bluenpcname$, "bg_pvp#control" ), strnpcinfo(0); OnStart: waitingroom "Blue Team", getvariableofnpc( .minplayer2start, "bg_pvp#control" ) +1, "bg_pvp#control::OnStart", getvariableofnpc( .minplayer2start, "bg_pvp#control" ); end; } guild_vs3 mapflag battleground 2 guild_vs3 mapflag nosave SavePoint guild_vs3 mapflag nowarp guild_vs3 mapflag nowarpto guild_vs3 mapflag noteleport guild_vs3 mapflag nomemo guild_vs3 mapflag nopenalty guild_vs3 mapflag nobranch guild_vs3 mapflag noicewall guild_vs3 mapflag hidemobhpbar (not tested)
  6. setarray .@Styles[1], getbattleflag("max_cloth_color"), getbattleflag("max_hair_style"), getbattleflag("max_hair_color"); ^ this the array for the numbers do like that if(Class == Job_Summoner){ setarray .@Styles[1], 10,//max_cloth_color 6,//max_hair_style 10;//max_hair_color }else{ setarray .@Styles[1], getbattleflag("max_cloth_color"), getbattleflag("max_hair_style"), getbattleflag("max_hair_color"); }
  7. 1st ItemID 2nd unidentifiedDisplayName 3rd unidentifiedResourceName 4th identifiedDisplayName 5th identifiedResourceName 6th slotCount 7th ClassNum 8th costume
  8. need more info what you used in nemo what happen exactly any error in the terminal ?
  9. after case 2: remove_orbs = 1; use break; so it will be case 2: remove_orbs = 1; break; and this for the empty slots s_select_remove: .@card0 = getequipcardid(.s_all_loc[s_all_selected],0); .@card1 = getequipcardid(.s_all_loc[s_all_selected],1); .@card2 = getequipcardid(.s_all_loc[s_all_selected],2); .@card3 = getequipcardid(.s_all_loc[s_all_selected],3); next; mes "^A020F0[Encantadora]^000000"; mes "Isso removerá todos as Cartas e Pedra de Encantamento dentro do item!"; if (.s_zeny_remove > 0) { mes "Isso vai te custar " + .s_zeny_remove + " Zeny."; } mes "Você tem certeza?"; switch(select("Não:Sim")){ case 1 : end; case 2: if (Zeny < .s_zeny_remove) { mes "Desculpe, mas você não tem zeny suficiente."; close; } if(.@card0 == 0).@card0$ = " - [ ^D6C4E8" + "No Equip" + "^000000 ]:"; else .@card0$ = getitemname(.@card0); if(.@card1 == 0).@card1$ = " - [ ^D6C4E8" + "No Equip" + "^000000 ]:"; else .@card1$ = getitemname(.@card1); if(.@card2 == 0).@card2$ = " - [ ^D6C4E8" + "No Equip" + "^000000 ]:"; else .@card2$ = getitemname(.@card2); if(.@card3 == 0).@card3$ = " - [ ^D6C4E8" + "No Equip" + "^000000 ]:"; else .@card3$ = getitemname(.@card3); switch(select(.@card0$,.@card1$,.@card2$,.@card3$)){ case 1: .@card0 = 0; break; case 2: .@card1 = 0; break; case 3: .@card2 = 0; break; case 4: .@card3 = 0; break; } specialeffect2 EF_REPAIRWEAPON; set .@item, getequipid(.s_all_loc[s_all_selected]); delitem .@item,1; getitem2 .@item, 1, 1, s_item_refine, 0, .@card0, .@card1, .@card2, .@card3; set Zeny, Zeny-.s_zeny_remove; } close; end;
  10. - script mall_command -1,{ OnMall: if(getmapflag(strcharinfo(3),mf_town)){ warp "quiz_02",0,0; }else{ message strcharinfo(0),"you have to be in town to use this command"; } end; OnInit: bindatcmd("mall",strnpcinfo(3)+"::OnMall",0,99); }
  11. for the item required you can't use random orb with it or else the ppl will retry with the orb in there bag it would be the same as select orb i will clear that when i rewrite it for the orb's removal just edit from the line 252 this s_select_remove: .@card0 = getequipcardid(.s_all_loc[s_all_selected],0); .@card1 = getequipcardid(.s_all_loc[s_all_selected],1); .@card2 = getequipcardid(.s_all_loc[s_all_selected],2); .@card3 = getequipcardid(.s_all_loc[s_all_selected],3); next; mes "^A020F0[Encantadora]^000000"; mes "Isso removerá todos as Cartas e Pedra de Encantamento dentro do item!"; if (.s_zeny_remove > 0) { mes "Isso vai te custar " + .s_zeny_remove + " Zeny."; } mes "Você tem certeza?"; switch(select("Não:Sim")){ if (Zeny < .s_zeny_remove) { mes "Desculpe, mas você não tem zeny suficiente."; close; } case 2: specialeffect2 EF_REPAIRWEAPON; set .@item, getequipid(.s_all_loc[s_all_selected]); delitem .@item,1; getitem2 .@item, 1, 1, s_item_refine, 0, 0, 0, 0, 0; set Zeny, Zeny-.s_zeny_remove; } close; end; to s_select_remove: .@card0 = getequipcardid(.s_all_loc[s_all_selected],0); .@card1 = getequipcardid(.s_all_loc[s_all_selected],1); .@card2 = getequipcardid(.s_all_loc[s_all_selected],2); .@card3 = getequipcardid(.s_all_loc[s_all_selected],3); next; mes "^A020F0[Encantadora]^000000"; mes "Isso removerá todos as Cartas e Pedra de Encantamento dentro do item!"; if (.s_zeny_remove > 0) { mes "Isso vai te custar " + .s_zeny_remove + " Zeny."; } mes "Você tem certeza?"; switch(select("Não:Sim")){ case 1 : end; case 2: if (Zeny < .s_zeny_remove) { mes "Desculpe, mas você não tem zeny suficiente."; close; } switch(select(getitemname(.@card0),getitemname(.@card1),getitemname(.@card2),getitemname(.@card3))){ case 1: .@card0 = 0; break; case 2: .@card1 = 0; break; case 3: .@card2 = 0; break; case 4: .@card3 = 0; break; } specialeffect2 EF_REPAIRWEAPON; set .@item, getequipid(.s_all_loc[s_all_selected]); delitem .@item,1; getitem2 .@item, 1, 1, s_item_refine, 0, .@card0, .@card1, .@card2, .@card3; set Zeny, Zeny-.s_zeny_remove; } close; end; and now you can select the enchant you want to remove
  12. i know that this script not optimized cuz i don't have the time to , but it is working without a problem as far as i know can you post yours after you added your items ? and explaining the first question more
  13. comment this line [210] delitem .@item,1; in s_brack: specialeffect2 155; mes "I am sorry"; mes "We did Fail"; specialeffect2 EF_PHARMACY_FAIL; if (rand(100) < .brack_chance){ set .@item, getequipid(.s_all_loc[s_all_selected]); delitem .@item,1; mes "and it broke!!"; specialeffect EF_SUI_EXPLOSION; } close; end;
  14. this not from that npc you need to check what the issue is for your request //read carefully after this if(.s_vinding){ if(checkvending() & .s_vinding){ message strcharinfo(0),"[Hourly Rewards]: No Hourly Rewards for Venders , Relogin to change that ."; if(.s_GePard_ip){ query_logsql("delete from `sader_variables_log` where `variable` = '#Hourly_Rewads_Check' AND `account_id`= '"+getcharid(3)+"'"); } #Hourly_Rewads_Check = 0; #Hourly_Ban = 1; addtimer .s_time, strnpcinfo(3)+"::OnHourlyRewards"; end; } } and before this #Hourly_Rewads_Check += 1; if(.s_GePard_ip == 1){ add this if (checkchatting()){ addtimer 1800000, strnpcinfo(3)+"::OnChatOpen"; } and above or under this OnUnHourlyBan: #Hourly_Ban = 0; end; add this OnChatOpen: message strcharinfo(0),"[Hourly Rewards]: No Hourly Rewards for Chat Rooms that more then 30min opend , Relogin to change that ."; if(.s_GePard_ip){ query_logsql("delete from `sader_variables_log` where `variable` = '#Hourly_Rewads_Check' AND `account_id`= '"+getcharid(3)+"'"); } #Hourly_Rewads_Check = 0; #Hourly_Ban = 1; end;
  15. check your map cash and your game files the map error is not from the client if there is already other maps working
  16. it look for me that the starting map for the humans not working probably in your files you need to recheck that
  17. i already see your clif_packetdb not right i would suggest updating it this may fix the errors you can copy it from here https://github.com/rathena/rathena/blob/4d602135fcf0de0d2a1a340e4730d5f4283e9228/src/map/clif_packetdb.h#L2337 or edit your file don't forget to make a backup for it if there something you need in the old file
  18. if you did get a new rathena the packets are already added in it so you don't really need to edit/add anything else then the #define PACKETVER 20170517 and visual studio wont show any error how old your rathena is ?
  19. YOU MUST NOT edit #ifndef PACKETVAR_RE code
  20. the shop is point shop that use the variable so even if it look like zeny in your server you would need hourly points to buy from it (unless you src edit your server) for me in the screen shot i am using client 2017 however i did test it on the client 2015 and it show the variable but i didn't test it on older clients for showing the amount for the players you can make a simple command script to tell the players how many pointss they have ( i will add it in the next update if i make an update for it) like that add this under OnInit: bindatcmd("MyHourlyPoints",strnpcinfo(3)+"::OnMyHourlyPoints",0,99); bindatcmd("MHP",strnpcinfo(3)+"::OnMyHourlyPoints",0,99); and after some end; (THAT THE LINE START WITH IT WITHOUT <TAB> BEFORE IT) add OnMyHourlyPoints: message strcharinfo(0),"[Hourly Rewards]: You have " + #HourlyRewards + " Hourly Points ."; end; by that by using the command @myhourlypoints or @mhp you will be message say to you how much you have Hourly Points
×
×
  • Create New...