Jump to content

Dark Theme was set as default for all members. Please report any issues here.

Search the Community

Showing results for tags 'script'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Bulletin Centre
    • Community News
    • Repository News
    • Ragnarok News
  • Hercules Development Centre
    • Development Discussion
    • Suggestions
    • Development Centre Archives
  • Support & Releases
    • General Server Support
    • Database
    • Scripting
    • Source
    • Plugin
    • Client-Side
    • Graphic Enhancements
    • Other Support & Releases
  • Hercules Community
    • General Discussion
    • Projects
    • Employment
    • Server Advertisement
    • Arts & Writings
    • Off Topic
  • 3CeAM Centre
    • News and Development
    • Community
  • International Communities
    • Filipino Community
    • Portuguese Community
    • Spanish Community
    • Other Communities

Categories

  • Client Resources
  • Graphic Resources
    • Sprites & Palettes
    • Maps & Textures
    • Other Graphics
  • Server Resources
    • Server Managers / Editors Releases
    • Script Releases
    • Source Modifications
    • Plugins
    • Pre-Compiled Server
  • Web Resources

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Discord


Skype


IRC Nickname


Website URL


Location:


Interests


Github

Found 58 results

  1. Hi guys! Just wondering how can i remove the timer and make it usable all the time? Thanks in advance! // ============================= /* Free for All: http://herc.ws/board/topic/13863-rlast-man-standing-pvp-with-prize/ ---------------------------- by: Legend compatible w/: Hercules ---------------------------- special thanks to: * Annieruru ---------------------------- Description: * Free for all event like last man standing * Can be activated through command "@ffa" * Also can be activated every hour * You can set your own number of winners * Configurable settings (npc name, maps, minimum level to participate, maximum recognized winners, rewards, restricted jobs.) * Significant mapflags were set */ // ============================= prontera,156,157,4 script Request#2 4_CAT_DOWN,{ doevent "Request#2::OnMenu"; end; OnActivate: // activated by the GM if (agitcheck()) || (agitcheck2()){ mes .npc$; mes "WoE is in progress."; close; } if (.checkffa > 0) { mes .npc$; mes "Event is in progress."; close; } OnMinute00: // activated every hour if (agitcheck()) || (agitcheck2()) end; if (.checkffa > 0) end; .checkffa = 1; announce .npc$+": Registration for the event is now open for 3 minutes!",bc_all; initnpctimer; end; OnTimer150000: announce .npc$+": 30 seconds left before the registration will be closed.",bc_all; end; OnTimer180000: .checkffa = 2; if ( .psize <= .maxwin) { announce .npc$+": The Event has been cancelled! Not enough participants.",bc_all; callsub Reset_evt_stats; end; } announce .npc$+": Registration is now closed!",bc_all; end; OnTimer185000: mapannounce .pvpmap$,.npc$+": The Event will occur in a few moments!",bc_blue; end; OnTimer187000: mapannounce .pvpmap$,.npc$+": Get ready in 3!",bc_blue; end; OnTimer188000: mapannounce .pvpmap$,.npc$+": 2!",bc_blue; end; OnTimer189000: mapannounce .pvpmap$,.npc$+": 1!",bc_blue; end; OnTimer190000: stopnpctimer; mapannounce .pvpmap$,.npc$+": Good luck everyone!",bc_blue; setmapflag .pvpmap$, mf_pvp_noguild; removemapflag .pvpmap$, mf_noskill; pvpon .pvpmap$; end; OnMenu: mes .npc$; mes "Good day "+strcharinfo(0)+"!"; mes "How may I help you?"; next; switch(select("Information:Join")){ case 1: mes .npc$; mes "Minimum Base Level: ^FF0000"+.minblvl+"^000000"; mes "Restricted Jobs:"; for( [email protected] = 0; [email protected] < .rjsize; [email protected]++ ) { mes ( [email protected] +1 ) +". ^FF0000"+jobname (.resjob[[email protected]])+"^000000"; } close; case 2: if (!.checkffa) { mes .npc$; mes "Event isn't activated, come back later."; close; } if (.checkffa == 2) { mes .npc$; mes "Event is in progress, come back later."; close; } if (BaseLevel < .minblvl) { mes .npc$; mes "You need to"; mes "have ^FF0000"+.minblvl+"^000000 Base level or more than"; mes "before you can participate."; close; } for( [email protected] = 0; [email protected] < .rjsize; [email protected]++ ) { if (Class == .resjob[[email protected]] ){ mes .npc$; mes "Your job is restricted to join this event."; close; } } sc_end SC_ALL; percentheal 100,100; warp .pvpmap$,0,0; .regaid[.psize] = getcharid(3); .psize++; end; } OnPCDieEvent: OnPCLogoutEvent: if (strcharinfo(3) != .pvpmap$) end; while (.regaid != getcharid(3) && [email protected] < .psize) [email protected]++; deletearray .regaid[[email protected]],1; .psize--; if (.psize > .maxwin) end; if (.checkffa > 0) { announce .npc$+": The Event is now over! We already have our winners!",bc_all; for ([email protected] = 0; [email protected] < .psize; [email protected]){ getitem .ritem,.rcount,.regaid[[email protected]]; } } callsub Reset_evt_stats; end; Reset_evt_stats: removemapflag .pvpmap$, mf_pvp_noguild; setmapflag .pvpmap$, mf_noskill; pvpoff .pvpmap$; .checkffa = 0; deletearray .regaid; .psize = 0; mapwarp .pvpmap$,.extmap$,.extx,.exty,0; end; OnInit: bindatcmd "ffa",strnpcinfo(3)+"::OnActivate",99,99; // CONFIGURATION .npc$ = "[ Free for All ]"; // NPC name .pvpmap$ = "pvp_n_1-5"; // Set your FFA Map .minblvl = 99; // Set minimum base level who can enter .maxwin = 2; // Set the maximum winners .ritem = 7227; // Set the item id of the reward .rcount = 5; // Set reward amount .extmap$ = "prontera"; // Set exit map .extx = 150; // Exit map "x" coordinate .exty = 150; // Exit map "y" coordinate setarray .resjob[0], 0,4001; // This list serves as the restricted jobs .rjsize = getarraysize (.resjob); // DO NOT TOUCH THIS // MAPFLAGS setmapflag .pvpmap$, mf_noskill; pvpoff .pvpmap$; //--- setmapflag .pvpmap$, mf_nowarpto; setmapflag .pvpmap$, mf_nocommand; setmapflag .pvpmap$, mf_nowarp; setmapflag .pvpmap$, mf_nosave; setmapflag .pvpmap$, mf_noteleport; setmapflag .pvpmap$, mf_nomemo; setmapflag .pvpmap$, mf_novending; setmapflag .pvpmap$, mf_nobranch; end; }
  2. Hi guys. just wondering how can i enable this npc all the time? so i won't have to manually enable it and players can use it anytime. thanks in advance! // -----------------------------// // ------- Free For All --------// // -------- By : Butch ---------// // A simple Free for all script // // -----------------------------// guild_vs5,48,51,6 script FFA Master 999,{ if(getmapusers("guild_vs5") != 1) { mes "[^FF0000FFA Master^000000]"; mes "Current players - ^FF0000"+ getmapusers("guild_vs5") +"^000000."; close; } else if(getmapusers("guild_vs5") == 1) { dispbottom "You are a winner of Event Free for all. Congratz!"; donpcevent "Free For All::OnStopEvent"; announce "Free for all winner : "+ strcharinfo(0) +"", bc_all, "0xFFCE00"; getitem 25002,1; // Reward warp "prontera", 156,149; end; } } // ------ FFA Warper -------// prontera,147,149,6 script Free For All 999,{ if (.start != 1) { mes "[^FF0000Agent Mil^000000]"; mes "Free for all is not available at the moment"; close; } mes "[^FF0000Agent Mil^000000]"; mes "What do you want?"; switch(select("Free for all")) { case 1: if( getcharid(1) ) { mes "Please leave your party."; close; } if( getcharid(2) ) { mes "Please leave your guild."; close; } else switch(rand(3)) { case 0: [email protected] = 18; [email protected] = 50; break; case 1: [email protected] = 50; [email protected] = 77; break; case 2: [email protected] = 81; [email protected] = 49; break; case 3: [email protected] = 49; [email protected] = 22; break; } warp "guild_vs5", [email protected],[email protected]; break; } close; OnStartEvent: OnClock1245: OnClock1645: OnClock2045: OnClock0045: OnClock0445: OnClock0845: .start = 1; disablenpc "FFA Master"; announce "Free for all will start in 5 minutes.", bc_all, "0x00b89d"; sleep 120000; announce "Free for all will start in 3 minutes.", bc_all, "0x00b89d"; sleep 120000; announce "Free for all will start in 1 minute.", bc_all, "0x00b89d"; sleep 60000; announce "Free for all has started!", bc_all, "0x00b89d"; .start = 2; enablenpc "FFA Master"; sleep 2000; if ( !getmapusers("guild_vs5") ) goto OnStopEvent; mapannounce "guild_vs5", "FFA starts in 5", bc_map; sleep 1000; mapannounce "guild_vs5", "FFA starts in 4", bc_map; sleep 1000; mapannounce "guild_vs5", "FFA starts in 3", bc_map; sleep 1000; mapannounce "guild_vs5", "FFA starts in 2", bc_map; sleep 1000; mapannounce "guild_vs5", "FFA starts in 1", bc_map; sleep 1000; mapannounce "guild_vs5", "GO! Kill all!", bc_map; setmapflag "guild_vs5", mf_gvg; removemapflag "guild_vs5", mf_noskill; end; OnStopEvent: .start = 0; disablenpc "FFA Master"; removemapflag "guild_vs5", mf_gvg; setmapflag "guild_vs5", mf_noskill; end; OnInit: bindatcmd("startevent",strnpcinfo(1)+"::OnStartEvent",60,99); waitingroom "[Free For All]",0; end; } guild_vs5 mapflag partylock guild_vs5 mapflag guildlock guild_vs5 mapflag notrade guild_vs5 mapflag nodrop
  3. Hello! Can i ask a little help with this Party vs. Party Script please? i wanted to add an announce on it. After the match, i wanted the npc to announce that the match has ended, congratulate the winner then the npc is open for match registration again. Thanks in advance and godbless! - script init -1,{ OnInit: //== CONFIG START ==// set [email protected]$,"#"; // Set the symbol of your char command ex. # set [email protected]$,"^009966War Organizer^000000"; // Set NPC name set [email protected]_mem,7; // Set minimum members per party, if a party has 6 members below including the leader, leader can't register his/her party set [email protected]_map$,"guild_vs3"; // Set where you want the players to battle set [email protected]_arena_mapX,15; // Set the starting X position of Team 1 set [email protected]_arena_mapY,49; // Set the starting Y position of Team 1 set [email protected]_arena_mapX,85; // Set the starting X position of Team 2 set [email protected]_arena_mapY,49; // Set the starting Y position of Team 2 set [email protected]_map$,"quiz_02"; // Set where you want the players to be warped after the player was killed. set [email protected]_mapX,350; set [email protected]_mapY,379; //== Set Winning Party Rewards ==// set [email protected]_winitem_qnty,0; // Important, set to how many reward items you set below for the winning party setarray [email protected]_itemid[0],0; // Set the item id of the reward item setarray [email protected]_itemname$[0],"Red Potion", // Set the name of the reward item "Orange Potion", "Yellow Potion", "White Potion", "Blue Potion"; setarray [email protected]_itemnum[0],0; // Set the quantity of the reward //== Set Losing Party Rewards ==// set [email protected]_loseitem_qnty,0; // Important, set to how many reward items you set below for losing party setarray [email protected]_itemid[0],0; // Set the item id of the reward item setarray [email protected]_itemname$[0],"Red Potion", // Set the name of the reward item "Orange Potion"; setarray [email protected]_itemnum[0],0; // Set the quantity of the reward //== Set Draw Rewards ==// set [email protected]_drawitem_qnty,0; // Important, set to how many reward items you set below for draw result setarray [email protected]_itemid[0],0; // Set the item id of the reward item setarray [email protected]_itemname$[0],"Yellow Potion", // Set the name of the reward item "White Potion"; setarray [email protected]_itemnum[0],0; // Set the quantity of the reward //== CONFIG END ==// // Do not change configs below, this will reset in case the server unexpectedly shuts down set [email protected]_Start,0; set [email protected]_team,0; set [email protected]_team1,0; set [email protected]_team2,0; set $team1_mem,0; set $team2_mem,0; // RWC 3 enablenpc "WALL#41"; enablenpc "WALL#42"; enablenpc "WALL#43"; enablenpc "WALL#44"; enablenpc "WALL#45"; enablenpc "WALL#46"; enablenpc "WALL#47"; enablenpc "WALL#48"; enablenpc "WALL#49"; enablenpc "WALL#50"; enablenpc "WALL#51"; enablenpc "WALL#52"; enablenpc "WALL#53"; enablenpc "WALL#54"; enablenpc "WALL#55"; enablenpc "WALL#56"; enablenpc "WALL#57"; enablenpc "WALL#58"; enablenpc "WALL#59"; enablenpc "WALL#60"; enablenpc "WALL#61"; enablenpc "WALL#62"; enablenpc "WALL#63"; enablenpc "WALL#64"; // Now let's check if the event is on going or not (checks current server's time) // if the event is on going, Enable NPC and sends a message to the player upon logging in for(set [email protected],0; [email protected]<=22; set [email protected],[email protected]+2) { set [email protected],[email protected]+1; if(gettime(3)>[email protected] && gettime(3)<[email protected]) { set [email protected]_start,1; enablenpc "PartyReg"; } set [email protected],[email protected]+1; } end; } // Party Registration NPC quiz_02,350,389,3 script Party Registration::PartyReg 89,{ mes "["[email protected]$+"]"; if(([email protected]_Start && getcharid(1)[email protected]_team1) || ([email protected]_Start && getcharid(1)[email protected]_team2) ) { mes "Hmm... Too bad for you, you didn't make it to win for your party. Cheer them up instead."; close; } if([email protected]_Start || [email protected]_team>=2) { mes "Battle is currently on"; mes "going. Party registration is"; mes "close during this time."; next; if(select("> Check current battle info.:> Leave") == 2){ mes "["[email protected]$+"]"; mes "Come back to me and register your party after the battle between "+getpartyname([email protected]_team1)+" and "+getpartyname([email protected]_team2)+" has ended."; close; } mes "["[email protected]$+"]"; if([email protected]_Start) { mes "The Battle already ended."; close; } set @standing_mem1,[email protected]_mem-$team2_mem; set @standing_mem2,[email protected]_mem-$team1_mem; mes "Battle Information"; mes "---"; mes "- " + getpartyname([email protected]_team1) + " Party : "; mes "Standing Members Left : " + @standing_mem1; mes "---"; mes "- " + getpartyname([email protected]_team2) + " Party : "; mes "Standing Members Left : " + @standing_mem2; next; mes "["[email protected]$+"]"; if($team1_mem>$team2_mem) { mes "Current leading party is "+getpartyname([email protected]_team1); close; } else if($team1_mem<$team2_mem) { mes "Current leading party is "+getpartyname([email protected]_team2); close; } else { mes "Both Party has the same number of members that are still alive."; close; } } if(getcharid(1)==0) goto L_ContinueMain; if(getcharid(1)[email protected]_team1 || getcharid(1)[email protected]_team2) { mes getpartyleader(getcharid(1)) + ", your party leader already registered your party, please wait for the other team to register."; close; } L_ContinueMain: mes "Welcome "+strcharinfo(0)+"!"; mes "I am the War Arena Organizer"; next; switch(select("> Register")) { case 1: callsub R_Party; } R_Party: mes "["[email protected]$+"]"; if ( callfunc("party_has_duplicate_job") ) { mes "It seems that someone in the party has the same class than another member. Please check again the requirements..."; close; } if ( [email protected] != 7 ) { mes "You have to be 7 on the team."; close; } if(getcharid(1)==0) { mes "I see that you have no party yet. Please form your party first before registering."; close; } mes "Party Name : "+strcharinfo(1); if(getpartyleader(getcharid(1),2)==getcharid(0)) { mes "Party Leader : You"; } else { mes "Party Leader : "+getpartyleader(getcharid(1)); } mes "-"; getpartymember(getcharid(1)); set @partymembercount,[email protected]; copyarray @partymembername$[0],[email protected]$[0],@partymembercount; set @countmem,0; L_DisplayMem: if(@countmem == @partymembercount) goto L_Continue; set @countmem,@countmem+1; goto L_DisplayMem; L_Continue: mes "Party Members ("+(@countmem)+"/"[email protected]_mem+")"; set @count,0; L_DisplayMember: if(@count == @partymembercount) goto L_Continue2; mes (@count + 1) + ". ^0000FF" + @partymembername$[@count] + "^000000"; set @count,@count+1; goto L_DisplayMember; L_Continue2: if([email protected]_Start || [email protected]_team>=2) { next; mes "Sorry but party registration is now close. Please re-register after the current battle progress has ended."; close; } if(getpartyleader(getcharid(1),2)!=getcharid(0)) { next; mes strcharinfo(0)+", If you have time, please find your Party Leader "+getpartyleader(getcharid(1))+" and let him/her register your party"; close; } if(@countmem>[email protected]_mem) { next; mes "This event requires you to form a party with only "[email protected]_mem+" members including you. I'm sorry to say but you need to expel ^FF0000"+(@[email protected]_mem)+"^000000 more member(s)."; close; } if(@countmem<[email protected]_mem) { next; mes "This event requires you to form a party with "[email protected]_mem+" members including you. You still need to recruit ^FF0000"+([email protected][email protected])+"^000000 more member(s)."; close; } set [email protected]_team,[email protected]_team+1; if([email protected]_team==1) { set [email protected]_team1,getcharid(1); setarray [email protected]_name1$[0],@partymembername$[0],@partymembername$[1],@partymembername$[2],@partymembername$[3],@partymembername$[4]; announce "Team "+getpartyname([email protected]_team1)+" registered on Team "[email protected]_team+".",bc_all; goto L_Continue3; } if([email protected]_team==2) { set [email protected]_team2,getcharid(1); announce "Team "+getpartyname([email protected]_team2)+" registered on Team "[email protected]_team+".",bc_all; setarray [email protected]_name2$[0],@partymembername$[0],@partymembername$[1],@partymembername$[2],@partymembername$[3],@partymembername$[4]; goto L_Continue3; } L_Continue3: close2; if([email protected]_team==2) donpcevent "PvP_Func::OnStart"; end; OnPCDieEvent: getmapxy @map$,@x,@y,0; if([email protected]_Start && @[email protected]_map$ && getcharid(1)[email protected]_team1) { set $team2_mem,$team2_mem+1; warp [email protected]_map$,[email protected]_mapX,[email protected]_mapY; if([email protected]_mem) { setcell [email protected]_map$,80,55,80,44,cell_walkable,1; setcell [email protected]_map$,19,55,19,44,cell_walkable,1; donpcevent "PvP_Func::OnTeam2Win2"; } end; } if([email protected]_Start && @[email protected]_map$ && getcharid(1)[email protected]_team2) { set $team1_mem,$team1_mem+1; warp [email protected]_map$,[email protected]_mapX,[email protected]_mapY; if([email protected]_mem) { setcell [email protected]_map$,80,55,80,44,cell_walkable,1; setcell [email protected]_map$,19,55,19,44,cell_walkable,1; donpcevent "PvP_Func::OnTeam1Win2"; } end; } OnPCLogoutEvent: getmapxy @map$,@x,@y,0; if([email protected]_Start && @[email protected]_map$ && getcharid(1)[email protected]_team1) { warp [email protected]_map$,[email protected]_mapX,[email protected]_mapY; set $team2_mem,$team2_mem+1; mapannounce [email protected]_map$,"User "+strcharinfo(0)+" of "+getpartyname([email protected]_team1)+" Team logged out of the game.",bc_all; if([email protected]_mem) { setcell [email protected]_map$,80,55,80,44,cell_walkable,1; setcell [email protected]_map$,19,55,19,44,cell_walkable,1; donpcevent "PvP_Func::OnTeam2Win2"; } end; } if([email protected]_Start && @[email protected]_map$ && getcharid(1)[email protected]_team2) { warp [email protected]_map$,[email protected]_mapX,[email protected]_mapY; set $team1_mem,$team1_mem+1; mapannounce [email protected]_map$,"User "+strcharinfo(0)+" of "+getpartyname([email protected]_team2)+" Team logged out of the game.",bc_all; if($team1_mem==$[email protected]_mem) { setcell [email protected]_map$,80,55,80,44,cell_walkable,1; setcell [email protected]_map$,19,55,19,44,cell_walkable,1; donpcevent "PvP_Func::OnTeam1Win2"; } end; } OnPCLoadMapEvent: getmapxy @map$,@x,@y,0; if([email protected]_Start && @[email protected]_map$ && getcharid(1)[email protected]_team1) { warp [email protected]_map$,[email protected]_mapX,[email protected]_mapY; set $team2_mem,$team2_mem+1; mapannounce [email protected]_map$,""+strcharinfo(0)+" of "+getpartyname([email protected]_team1)+" party warped out of the battle arena.",bc_blue; if([email protected]_mem) { setcell [email protected]_map$,80,55,80,44,cell_walkable,1; setcell [email protected]_map$,19,55,19,44,cell_walkable,1; donpcevent "PvP_Func::OnTeam2Win2"; } end; } if([email protected]_Start && @[email protected]_map$ && getcharid(1)[email protected]_team2) { warp [email protected]_map$,[email protected]_mapX,[email protected]_mapY; set $team1_mem,$team1_mem+1; mapannounce [email protected]_map$,""+strcharinfo(0)+" of "+getpartyname([email protected]_team2)+" party warped out of the battle arena.",bc_blue; if([email protected]_mem) { setcell [email protected]_map$,80,55,80,44,cell_walkable,1; setcell [email protected]_map$,19,55,19,44,cell_walkable,1; donpcevent "PvP_Func::OnTeam1Win2"; } end; } } // Script where all functions are stored - script PvP_Func -1,{ OnStart: initnpctimer; set [email protected]_Start,1; setcell [email protected]_map$,80,55,80,44,cell_walkable,0; setcell [email protected]_map$,19,55,19,44,cell_walkable,0; announce "The Battle between "+getpartyname([email protected]_team1)+" and "+getpartyname([email protected]_team2)+" Party has engaged. Registered Party along with its members will be automatically warped to the arena after 10 seconds.",bc_all; gvgoff [email protected]_map$; setnpctimer 0; startnpctimer; end; OnTimer5000: warpparty [email protected]_map$,[email protected]_arena_mapX,[email protected]_arena_mapY,[email protected]_team1; warpparty [email protected]_map$,[email protected]_arena_mapX,[email protected]_arena_mapY,[email protected]_team2; end; OnTimer30000: mapannounce [email protected]_map$,"Players, you only have 30 seconds left to prepare for the Battle.",bc_all; end; OnTimer50000: mapannounce [email protected]_map$,"The Battle will begin in 5 seconds.",bc_all; end; OnTimer51000: mapannounce [email protected]_map$,"The Battle will begin in 4 seconds.",bc_all; end; OnTimer52000: mapannounce [email protected]_map$,"The Battle will begin in 3 seconds.",bc_all; end; OnTimer53000: mapannounce [email protected]_map$,"The Battle will begin in 2 seconds.",bc_all; end; OnTimer54000: mapannounce [email protected]_map$,"The Battle will begin in 1 second.",bc_all; end; OnTimer55000: gvgon [email protected]_map$; setcell [email protected]_map$,80,55,80,44,cell_walkable,1; setcell [email protected]_map$,19,55,19,44,cell_walkable,1; disablenpc "WALL#41"; disablenpc "WALL#42"; disablenpc "WALL#43"; disablenpc "WALL#44"; disablenpc "WALL#45"; disablenpc "WALL#46"; disablenpc "WALL#47"; disablenpc "WALL#48"; disablenpc "WALL#49"; disablenpc "WALL#50"; disablenpc "WALL#51"; disablenpc "WALL#52"; disablenpc "WALL#53"; disablenpc "WALL#54"; disablenpc "WALL#55"; disablenpc "WALL#56"; disablenpc "WALL#57"; disablenpc "WALL#58"; disablenpc "WALL#59"; disablenpc "WALL#60"; disablenpc "WALL#61"; disablenpc "WALL#62"; disablenpc "WALL#63"; disablenpc "WALL#64"; announce "The team "+getpartyname([email protected]_team1)+" vs "+getpartyname([email protected]_team2)+" battle has begun!",bc_all; mapannounce [email protected]_map$,"You only have 5 minutes to eliminate all opponent's party members. Be quick!!!",bc_all; end; // After 5 Minutes, system will check the party who has the most number of member and will declare that party as a winner. // All variables will be resetted. OnTimer420000: if($team2_mem<$team1_mem) { donpcevent "PvP_Func::OnTeam1Win"; } else if ($team2_mem<$team1_mem) { donpcevent "PvP_Func::OnTeam2Win"; } else if ($team2_mem==$team1_mem || $team1_mem==$team2_mem) { donpcevent "PvP_Func::OnDraw"; } else { donpcevent "PvP_Func::OnNoWin"; } end; // This label will be called after the event has ended without registered parties OnNoWin: announce "The Battle has ended.",bc_all; gvgoff [email protected]_map$; set [email protected]_team,0; set [email protected]_Start,0; set $team1_mem,0; set $team2_mem,0; set [email protected]_team1,0; set [email protected]_team2,0; setcell "guild_vs3",19,55,19,44,cell_walkable,0; setcell "guild_vs3",80,55,80,44,cell_walkable,0; enablenpc "WALL#41"; enablenpc "WALL#42"; enablenpc "WALL#43"; enablenpc "WALL#44"; enablenpc "WALL#45"; enablenpc "WALL#46"; enablenpc "WALL#47"; enablenpc "WALL#48"; enablenpc "WALL#49"; enablenpc "WALL#50"; enablenpc "WALL#51"; enablenpc "WALL#52"; enablenpc "WALL#53"; enablenpc "WALL#54"; enablenpc "WALL#55"; enablenpc "WALL#56"; enablenpc "WALL#57"; enablenpc "WALL#58"; enablenpc "WALL#59"; enablenpc "WALL#60"; enablenpc "WALL#61"; enablenpc "WALL#62"; enablenpc "WALL#63"; enablenpc "WALL#64"; stopnpctimer; sleep2 10000; areawarp [email protected]_map$,12,87,87,12,[email protected]_map$,[email protected]_mapX,[email protected]_mapY; end; OnEndNoWin: announce "The Battle has ended.",bc_all; gvgoff [email protected]_map$; set [email protected]_team,0; set [email protected]_Start,0; set $team1_mem,0; set $team2_mem,0; set [email protected]_team1,0; set [email protected]_team2,0; set [email protected]_start,0; setcell "guild_vs3",19,55,19,44,cell_walkable,0; setcell "guild_vs3",80,55,80,44,cell_walkable,0; enablenpc "WALL#41"; enablenpc "WALL#42"; enablenpc "WALL#43"; enablenpc "WALL#44"; enablenpc "WALL#45"; enablenpc "WALL#46"; enablenpc "WALL#47"; enablenpc "WALL#48"; enablenpc "WALL#49"; enablenpc "WALL#50"; enablenpc "WALL#51"; enablenpc "WALL#52"; enablenpc "WALL#53"; enablenpc "WALL#54"; enablenpc "WALL#55"; enablenpc "WALL#56"; enablenpc "WALL#57"; enablenpc "WALL#58"; enablenpc "WALL#59"; enablenpc "WALL#60"; enablenpc "WALL#61"; enablenpc "WALL#62"; enablenpc "WALL#63"; enablenpc "WALL#64"; stopnpctimer; sleep2 10000; areawarp [email protected]_map$,12,87,87,12,[email protected]_map$,[email protected]_mapX,[email protected]_mapY; end; OnDraw: announce "Team "+getpartyname([email protected]_team1)+" and Team "+getpartyname([email protected]_team2)+" has the same number of members standing in the arena, the battle result is a draw.",bc_all; for(set [email protected],0; [email protected]<[email protected]_mem; set [email protected],[email protected]+1) { for(set [email protected],0; [email protected]<[email protected]_drawitem_qnty; set [email protected],[email protected]+1) { charcommand ""[email protected]$+"item "[email protected]_name1$[[email protected]]+" "[email protected]_itemid[[email protected]]+" "[email protected]_itemnum[[email protected]]+""; } } for(set [email protected],0; [email protected]<[email protected]_mem; set [email protected],[email protected]+1) { for(set [email protected],0; [email protected]<[email protected]_drawitem_qnty; set [email protected],[email protected]+1) { charcommand ""[email protected]$+"item "[email protected]_name2$[[email protected]]+" "[email protected]_itemid[[email protected]]+" "[email protected]_itemnum[[email protected]]+""; } } stopnpctimer; gvgoff [email protected]_map$; set [email protected]_team,0; set [email protected]_Start,0; set $team1_mem,0; set $team2_mem,0; set [email protected]_team1,0; set [email protected]_team2,0; setcell "guild_vs3",19,55,19,44,cell_walkable,0; setcell "guild_vs3",80,55,80,44,cell_walkable,0; enablenpc "WALL#41"; enablenpc "WALL#42"; enablenpc "WALL#43"; enablenpc "WALL#44"; enablenpc "WALL#45"; enablenpc "WALL#46"; enablenpc "WALL#47"; enablenpc "WALL#48"; enablenpc "WALL#49"; enablenpc "WALL#50"; enablenpc "WALL#51"; enablenpc "WALL#52"; enablenpc "WALL#53"; enablenpc "WALL#54"; enablenpc "WALL#55"; enablenpc "WALL#56"; enablenpc "WALL#57"; enablenpc "WALL#58"; enablenpc "WALL#59"; enablenpc "WALL#60"; enablenpc "WALL#61"; enablenpc "WALL#62"; enablenpc "WALL#63"; enablenpc "WALL#64"; sleep2 10000; areawarp [email protected]_map$,12,87,87,12,[email protected]_map$,[email protected]_mapX,[email protected]_mapY; end; OnEndDraw: announce "Team "+getpartyname([email protected]_team1)+" and Team "+getpartyname([email protected]_team2)+" has the same number of members standing in the arena, the battle result is a draw.",bc_all; for(set [email protected],0; [email protected]<[email protected]_mem; set [email protected],[email protected]+1) { for(set [email protected],0; [email protected]<[email protected]_drawitem_qnty; set [email protected],[email protected]+1) { charcommand ""[email protected]$+"item "[email protected]_name1$[[email protected]]+" "[email protected]_itemid[[email protected]]+" "[email protected]_itemnum[[email protected]]+""; } } for(set [email protected],0; [email protected]<[email protected]_mem; set [email protected],[email protected]+1) { for(set [email protected],0; [email protected]<[email protected]_drawitem_qnty; set [email protected],[email protected]+1) { charcommand ""[email protected]$+"item "[email protected]_name2$[[email protected]]+" "[email protected]_itemid[[email protected]]+" "[email protected]_itemnum[[email protected]]+""; } } stopnpctimer; gvgoff [email protected]_map$; set [email protected]_team,0; set [email protected]_Start,0; set $team1_mem,0; set $team2_mem,0; set [email protected]_team1,0; set [email protected]_team2,0; set [email protected]_start,0; setcell "guild_vs3",19,55,19,44,cell_walkable,0; setcell "guild_vs3",80,55,80,44,cell_walkable,0; enablenpc "WALL#41"; enablenpc "WALL#42"; enablenpc "WALL#43"; enablenpc "WALL#44"; enablenpc "WALL#45"; enablenpc "WALL#46"; enablenpc "WALL#47"; enablenpc "WALL#48"; enablenpc "WALL#49"; enablenpc "WALL#50"; enablenpc "WALL#51"; enablenpc "WALL#52"; enablenpc "WALL#53"; enablenpc "WALL#54"; enablenpc "WALL#55"; enablenpc "WALL#56"; enablenpc "WALL#57"; enablenpc "WALL#58"; enablenpc "WALL#59"; enablenpc "WALL#60"; enablenpc "WALL#61"; enablenpc "WALL#62"; enablenpc "WALL#63"; enablenpc "WALL#64"; sleep2 10000; areawarp [email protected]_map$,12,87,87,12,[email protected]_map$,[email protected]_mapX,[email protected]_mapY; end; OnTeam1Win: announce "After 5 minutes of battle, "+getpartyname([email protected]_team1)+" party member survives more than "+getpartyname([email protected]_team2)+" party member and won the Battle!",bc_all; for(set [email protected],0; [email protected]<[email protected]_mem; set [email protected],[email protected]+1) { for(set [email protected],0; [email protected]<[email protected]_winitem_qnty; set [email protected],[email protected]+1) { charcommand ""[email protected]$+"item "[email protected]_name1$[[email protected]]+" "[email protected]_itemid[[email protected]]+" "[email protected]_itemnum[[email protected]]+""; } } for(set [email protected],0; [email protected]<[email protected]_mem; set [email protected],[email protected]+1) { for(set [email protected],0; [email protected]<[email protected]_loseitem_qnty; set [email protected],[email protected]+1) { charcommand ""[email protected]$+"item "[email protected]_name2$[[email protected]]+" "[email protected]_itemid[[email protected]]+" "[email protected]_itemnum[[email protected]]+""; } } set [email protected]_team,0; set [email protected]_Start,0; set $team1_mem,0; set $team2_mem,0; set [email protected]_team1,0; set [email protected]_team2,0; gvgoff [email protected]_map$; setcell "guild_vs3",19,55,19,44,cell_walkable,0; setcell "guild_vs3",80,55,80,44,cell_walkable,0; enablenpc "WALL#41"; enablenpc "WALL#42"; enablenpc "WALL#43"; enablenpc "WALL#44"; enablenpc "WALL#45"; enablenpc "WALL#46"; enablenpc "WALL#47"; enablenpc "WALL#48"; enablenpc "WALL#49"; enablenpc "WALL#50"; enablenpc "WALL#51"; enablenpc "WALL#52"; enablenpc "WALL#53"; enablenpc "WALL#54"; enablenpc "WALL#55"; enablenpc "WALL#56"; enablenpc "WALL#57"; enablenpc "WALL#58"; enablenpc "WALL#59"; enablenpc "WALL#60"; enablenpc "WALL#61"; enablenpc "WALL#62"; enablenpc "WALL#63"; enablenpc "WALL#64"; stopnpctimer; sleep2 10000; areawarp [email protected]_map$,12,87,87,12,[email protected]_map$,[email protected]_mapX,[email protected]_mapY; end; OnEndTeam1Win: announce "After 5 minutes of battle, "+getpartyname([email protected]_team1)+" party member survives more than "+getpartyname([email protected]_team2)+" party member and won the Battle!",bc_all; for(set [email protected],0; [email protected]<[email protected]_mem; set [email protected],[email protected]+1) { for(set [email protected],0; [email protected]<[email protected]_winitem_qnty; set [email protected],[email protected]+1) { charcommand ""[email protected]$+"item "[email protected]_name1$[[email protected]]+" "[email protected]_itemid[[email protected]]+" "[email protected]_itemnum[[email protected]]+""; } } for(set [email protected],0; [email protected]<[email protected]_mem; set [email protected],[email protected]+1) { for(set [email protected],0; [email protected]<[email protected]_loseitem_qnty; set [email protected],[email protected]+1) { charcommand ""[email protected]$+"item "[email protected]_name2$[[email protected]]+" "[email protected]_itemid[[email protected]]+" "[email protected]_itemnum[[email protected]]+""; } } set [email protected]_team,0; set [email protected]_Start,0; set $team1_mem,0; set $team2_mem,0; set [email protected]_team1,0; set [email protected]_team2,0; set [email protected]_start,0; gvgoff [email protected]_map$; setcell "guild_vs3",19,55,19,44,cell_walkable,0; setcell "guild_vs3",80,55,80,44,cell_walkable,0; enablenpc "WALL#41"; enablenpc "WALL#42"; enablenpc "WALL#43"; enablenpc "WALL#44"; enablenpc "WALL#45"; enablenpc "WALL#46"; enablenpc "WALL#47"; enablenpc "WALL#48"; enablenpc "WALL#49"; enablenpc "WALL#50"; enablenpc "WALL#51"; enablenpc "WALL#52"; enablenpc "WALL#53"; enablenpc "WALL#54"; enablenpc "WALL#55"; enablenpc "WALL#56"; enablenpc "WALL#57"; enablenpc "WALL#58"; enablenpc "WALL#59"; enablenpc "WALL#60"; enablenpc "WALL#61"; enablenpc "WALL#62"; enablenpc "WALL#63"; enablenpc "WALL#64"; stopnpctimer; sleep2 10000; areawarp [email protected]_map$,12,87,87,12,[email protected]_map$,[email protected]_mapX,[email protected]_mapY; end; OnTeam2Win: announce "After 5 minutes of battle, "+getpartyname([email protected]_team2)+" party member survives more than "+getpartyname([email protected]_team1)+" party member and won the Battle!",bc_all; for(set [email protected],0; [email protected]<[email protected]_mem; set [email protected],[email protected]+1) { for(set [email protected],0; [email protected]<[email protected]_winitem_qnty; set [email protected],[email protected]+1) { charcommand ""[email protected]$+"item "[email protected]_name2$[[email protected]]+" "[email protected]_itemid[[email protected]]+" "[email protected]_itemnum[[email protected]]+""; } } for(set [email protected],0; [email protected]<[email protected]_mem; set [email protected],[email protected]+1) { for(set [email protected],0; [email protected]<[email protected]_loseitem_qnty; set [email protected],[email protected]+1) { charcommand ""[email protected]$+"item "[email protected]_name1$[[email protected]]+" "[email protected]_itemid[[email protected]]+" "[email protected]_itemnum[[email protected]]+""; } } set [email protected]_team,0; set [email protected]_Start,0; set $team1_mem,0; set $team2_mem,0; set [email protected]_team1,0; set [email protected]_team2,0; gvgoff [email protected]_map$; setcell "guild_vs3",19,55,19,44,cell_walkable,0; setcell "guild_vs3",80,55,80,44,cell_walkable,0; enablenpc "WALL#41"; enablenpc "WALL#42"; enablenpc "WALL#43"; enablenpc "WALL#44"; enablenpc "WALL#45"; enablenpc "WALL#46"; enablenpc "WALL#47"; enablenpc "WALL#48"; enablenpc "WALL#49"; enablenpc "WALL#50"; enablenpc "WALL#51"; enablenpc "WALL#52"; enablenpc "WALL#53"; enablenpc "WALL#54"; enablenpc "WALL#55"; enablenpc "WALL#56"; enablenpc "WALL#57"; enablenpc "WALL#58"; enablenpc "WALL#59"; enablenpc "WALL#60"; enablenpc "WALL#61"; enablenpc "WALL#62"; enablenpc "WALL#63"; enablenpc "WALL#64"; stopnpctimer; sleep2 10000; areawarp [email protected]_map$,12,87,87,12,[email protected]_map$,[email protected]_mapX,[email protected]_mapY; end; OnEndTeam2Win: announce "After 5 minutes of battle, "+getpartyname([email protected]_team2)+" party member survives more than "+getpartyname([email protected]_team1)+"'s Party member and won the Battle!",bc_all; for(set [email protected],0; [email protected]<[email protected]_mem; set [email protected],[email protected]+1) { for(set [email protected],0; [email protected]<[email protected]_winitem_qnty; set [email protected],[email protected]+1) { charcommand ""[email protected]$+"item "[email protected]_name2$[[email protected]]+" "[email protected]_itemid[[email protected]]+" "[email protected]_itemnum[[email protected]]+""; } } for(set [email protected],0; [email protected]<[email protected]_mem; set [email protected],[email protected]+1) { for(set [email protected],0; [email protected]<[email protected]_loseitem_qnty; set [email protected],[email protected]+1) { charcommand ""[email protected]$+"item "[email protected]_name1$[[email protected]]+" "[email protected]_itemid[[email protected]]+" "[email protected]_itemnum[[email protected]]+""; } } set [email protected]_team,0; set [email protected]_Start,0; set $team1_mem,0; set $team2_mem,0; set [email protected]_team1,0; set [email protected]_team2,0; set [email protected]_start,0; disablenpc "PartyReg"; gvgoff [email protected]_map$; setcell "guild_vs3",19,55,19,44,cell_walkable,0; setcell "guild_vs3",80,55,80,44,cell_walkable,0; enablenpc "WALL#41"; enablenpc "WALL#42"; enablenpc "WALL#43"; enablenpc "WALL#44"; enablenpc "WALL#45"; enablenpc "WALL#46"; enablenpc "WALL#47"; enablenpc "WALL#48"; enablenpc "WALL#49"; enablenpc "WALL#50"; enablenpc "WALL#51"; enablenpc "WALL#52"; enablenpc "WALL#53"; enablenpc "WALL#54"; enablenpc "WALL#55"; enablenpc "WALL#56"; enablenpc "WALL#57"; enablenpc "WALL#58"; enablenpc "WALL#59"; enablenpc "WALL#60"; enablenpc "WALL#61"; enablenpc "WALL#62"; enablenpc "WALL#63"; enablenpc "WALL#64"; stopnpctimer; sleep2 10000; areawarp [email protected]_map$,12,87,87,12,[email protected]_map$,[email protected]_mapX,[email protected]_mapY; end; OnTeam1Win2: announce "Team "+getpartyname([email protected]_team1)+" smashed all the member of Team "+getpartyname([email protected]_team2)+" and won the Battle!",bc_all; for(set [email protected],0; [email protected]<[email protected]_mem; set [email protected],[email protected]+1) { for(set [email protected],0; [email protected]<[email protected]_winitem_qnty; set [email protected],[email protected]+1) { charcommand ""[email protected]$+"item "[email protected]_name1$[[email protected]]+" "[email protected]_itemid[[email protected]]+" "[email protected]_itemnum[[email protected]]+""; } } for(set [email protected],0; [email protected]<[email protected]_mem; set [email protected],[email protected]+1) { for(set [email protected],0; [email protected]<[email protected]_loseitem_qnty; set [email protected],[email protected]+1) { charcommand ""[email protected]$+"item "[email protected]_name2$[[email protected]]+" "[email protected]_itemid[[email protected]]+" "[email protected]_itemnum[[email protected]]+""; } } set [email protected]_team,0; set [email protected]_Start,0; set $team1_mem,0; set $team2_mem,0; set [email protected]_team1,0; set [email protected]_team2,0; gvgoff [email protected]_map$; setcell "guild_vs3",19,55,19,44,cell_walkable,0; setcell "guild_vs3",80,55,80,44,cell_walkable,0; enablenpc "WALL#41"; enablenpc "WALL#42"; enablenpc "WALL#43"; enablenpc "WALL#44"; enablenpc "WALL#45"; enablenpc "WALL#46"; enablenpc "WALL#47"; enablenpc "WALL#48"; enablenpc "WALL#49"; enablenpc "WALL#50"; enablenpc "WALL#51"; enablenpc "WALL#52"; enablenpc "WALL#53"; enablenpc "WALL#54"; enablenpc "WALL#55"; enablenpc "WALL#56"; enablenpc "WALL#57"; enablenpc "WALL#58"; enablenpc "WALL#59"; enablenpc "WALL#60"; enablenpc "WALL#61"; enablenpc "WALL#62"; enablenpc "WALL#63"; enablenpc "WALL#64"; stopnpctimer; sleep2 10000; areawarp [email protected]_map$,12,87,87,12,[email protected]_map$,[email protected]_mapX,[email protected]_mapY; end; OnTeam2Win2: announce "Team "+getpartyname([email protected]_team2)+" smashed all the member of Team "+getpartyname([email protected]_team1)+"and won the Battle!",bc_all; for(set [email protected],0; [email protected]<[email protected]_mem; set [email protected],[email protected]+1) { for(set [email protected],0; [email protected]<[email protected]_winitem_qnty; set [email protected],[email protected]+1) { charcommand ""[email protected]$+"item "[email protected]_name2$[[email protected]]+" "[email protected]_itemid[[email protected]]+" "[email protected]_itemnum[[email protected]]+""; } } for(set [email protected],0; [email protected]<[email protected]_mem; set [email protected],[email protected]+1) { for(set [email protected],0; [email protected]<[email protected]_loseitem_qnty; set [email protected],[email protected]+1) { charcommand ""[email protected]$+"item "[email protected]_name1$[[email protected]]+" "[email protected]_itemid[[email protected]]+" "[email protected]_itemnum[[email protected]]+""; } } set [email protected]_team,0; set [email protected]_Start,0; set $team1_mem,0; set $team2_mem,0; set [email protected]_team1,0; set [email protected]_team2,0; gvgoff [email protected]_map$; setcell "guild_vs3",19,55,19,44,cell_walkable,0; setcell "guild_vs3",80,55,80,44,cell_walkable,0; enablenpc "WALL#41"; enablenpc "WALL#42"; enablenpc "WALL#43"; enablenpc "WALL#44"; enablenpc "WALL#45"; enablenpc "WALL#46"; enablenpc "WALL#47"; enablenpc "WALL#48"; enablenpc "WALL#49"; enablenpc "WALL#50"; enablenpc "WALL#51"; enablenpc "WALL#52"; enablenpc "WALL#53"; enablenpc "WALL#54"; enablenpc "WALL#55"; enablenpc "WALL#56"; enablenpc "WALL#57"; enablenpc "WALL#58"; enablenpc "WALL#59"; enablenpc "WALL#60"; enablenpc "WALL#61"; enablenpc "WALL#62"; enablenpc "WALL#63"; enablenpc "WALL#64"; stopnpctimer; sleep2 10000; areawarp [email protected]_map$,12,87,87,12,[email protected]_map$,[email protected]_mapX,[email protected]_mapY; end; } function script StartEvent { enablenpc "PartyReg"; set [email protected]_start,1; announce "The Battle has begun.",bc_all; return; } function script EndEvent { if ([email protected]_Start && [email protected]_team<2) { setcell [email protected]_map$,80,55,80,44,cell_walkable,1; setcell [email protected]_map$,19,55,19,44,cell_walkable,1; donpcevent "PvP_Func::OnEndNoWin"; } else if ($team2_mem<$team1_mem) { setcell [email protected]_map$,80,55,80,44,cell_walkable,1; setcell [email protected]_map$,19,55,19,44,cell_walkable,1; donpcevent "PvP_Func::OnEndTeam1Win"; } else if ($team2_mem<$team1_mem) { setcell [email protected]_map$,80,55,80,44,cell_walkable,1; setcell [email protected]_map$,19,55,19,44,cell_walkable,1; donpcevent "PvP_Func::OnEndTeam2Win"; } else if ($team2_mem==$team1_mem || $team1_mem==$team2_mem) { setcell [email protected]_map$,80,55,80,44,cell_walkable,1; setcell [email protected]_map$,19,55,19,44,cell_walkable,1; donpcevent "PvP_Func::OnEndDraw"; } else { setcell [email protected]_map$,80,55,80,44,cell_walkable,1; setcell [email protected]_map$,19,55,19,44,cell_walkable,1; donpcevent "PvP_Func::OnEndNoWin"; } end; } //////////////////////////////////////////////////////////////////////////// ////RWC 3/////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////// guild_vs3,19,55,0 script WALL#41 1905,{ } guild_vs3,19,54,0 duplicate(WALL#41) WALL#42 1905 guild_vs3,19,53,0 duplicate(WALL#41) WALL#43 1905 guild_vs3,19,52,0 duplicate(WALL#41) WALL#44 1905 guild_vs3,19,51,0 duplicate(WALL#41) WALL#45 1905 guild_vs3,19,50,0 duplicate(WALL#41) WALL#46 1905 guild_vs3,19,49,0 duplicate(WALL#41) WALL#47 1905 guild_vs3,19,48,0 duplicate(WALL#41) WALL#48 1905 guild_vs3,19,47,0 duplicate(WALL#41) WALL#49 1905 guild_vs3,19,46,0 duplicate(WALL#41) WALL#50 1905 guild_vs3,19,45,0 duplicate(WALL#41) WALL#51 1905 guild_vs3,19,44,0 duplicate(WALL#41) WALL#52 1905 guild_vs3,80,55,0 duplicate(WALL#41) WALL#53 1905 guild_vs3,80,54,0 duplicate(WALL#41) WALL#54 1905 guild_vs3,80,53,0 duplicate(WALL#41) WALL#55 1905 guild_vs3,80,52,0 duplicate(WALL#41) WALL#56 1905 guild_vs3,80,51,0 duplicate(WALL#41) WALL#57 1905 guild_vs3,80,50,0 duplicate(WALL#41) WALL#58 1905 guild_vs3,80,49,0 duplicate(WALL#41) WALL#59 1905 guild_vs3,80,48,0 duplicate(WALL#41) WALL#60 1905 guild_vs3,80,47,0 duplicate(WALL#41) WALL#61 1905 guild_vs3,80,46,0 duplicate(WALL#41) WALL#62 1905 guild_vs3,80,45,0 duplicate(WALL#41) WALL#63 1905 guild_vs3,80,44,0 duplicate(WALL#41) WALL#64 1905 function script party_has_duplicate_job { set [email protected]_id, getarg( 0, getcharid(1) ); // Need to have a party. if ( [email protected]_id ) { return -1; } // Loading party members variables getpartymember [email protected]_id, 1; getpartymember [email protected]_id, 2; // Keep rid attached. set [email protected], playerattached(); // Check all members for ( set [email protected],0; [email protected]<[email protected]; set [email protected], [email protected]+1 ) { // Online user if ( isloggedin( [email protected][[email protected]], [email protected][[email protected]]) ) { // Attach the member to access "Class" attachrid( [email protected][[email protected]] ); if ( compare( [email protected]_class$ + "|", "|" + Class + "|" ) ) { if ( [email protected] ) attachrid([email protected]); else detachrid; return 1; } set [email protected]_class$, [email protected]_class$ + "|" + Class; } // Offline user (use sql) else { set [email protected]$, [email protected]$ + ( [email protected]_i ? "OR " : "" ) + "`char_id`='" + [email protected][[email protected]] + "' "; set [email protected]_i, [email protected]_i + 1; } } // SQL for offline users if ( getstrlen([email protected]$) ) { // get class from offline members set [email protected], query_sql("SELECT `class` FROM `char` WHERE " + [email protected]$, [email protected] ); // Check the class. for ( set [email protected], 0; [email protected]<[email protected]; set [email protected], [email protected]+1 ) { if ( compare( [email protected]_class$ + "|", "|" + [email protected][[email protected]] + "|" ) ) { if ( [email protected] ) attachrid([email protected]); else detachrid; return 1; } set [email protected]_class$, [email protected]_class$ + "|" + [email protected][[email protected]]; } } // Restore RID. if ( [email protected] ) attachrid([email protected]); else detachrid; return 0; } - script RWC -1,{ // Settings // GM LVL Allowed set .gmlvl,99; OnWhisperGlobal: if(getgmlevel() <= .gmlvl) goto N_Authority; switch(select("Reset:")) { case 1: stopnpctimer; gvgoff [email protected]_map$; set [email protected]_team,0; set [email protected]_Start,0; set $team1_mem,0; set $team2_mem,0; set [email protected]_team1,0; set [email protected]_team2,0; set [email protected]_start,0; dispbottom "Reset OK."; close; N_Authority: dispbottom "You cannot use this commands anymore."; close; } }
  4. Heeey guys I have this party versus party script and i wanted to add an announcement after the match has ended like "The match has ended, party leaders can now register again" something like that? Thank you in advance :> - script init -1,{ OnInit: //== CONFIG START ==// set [email protected]$,"#"; // Set the symbol of your char command ex. # set [email protected]$,"^009966War Organizer^000000"; // Set NPC name set [email protected]_mem,7; // Set minimum members per party, if a party has 6 members below including the leader, leader can't register his/her party set [email protected]_map$,"guild_vs3"; // Set where you want the players to battle set [email protected]_arena_mapX,15; // Set the starting X position of Team 1 set [email protected]_arena_mapY,49; // Set the starting Y position of Team 1 set [email protected]_arena_mapX,85; // Set the starting X position of Team 2 set [email protected]_arena_mapY,49; // Set the starting Y position of Team 2 set [email protected]_map$,"quiz_02"; // Set where you want the players to be warped after the player was killed. set [email protected]_mapX,350; set [email protected]_mapY,379; //== Set Winning Party Rewards ==// set [email protected]_winitem_qnty,0; // Important, set to how many reward items you set below for the winning party setarray [email protected]_itemid[0],0; // Set the item id of the reward item setarray [email protected]_itemname$[0],"Red Potion", // Set the name of the reward item "Orange Potion", "Yellow Potion", "White Potion", "Blue Potion"; setarray [email protected]_itemnum[0],0; // Set the quantity of the reward //== Set Losing Party Rewards ==// set [email protected]_loseitem_qnty,0; // Important, set to how many reward items you set below for losing party setarray [email protected]_itemid[0],0; // Set the item id of the reward item setarray [email protected]_itemname$[0],"Red Potion", // Set the name of the reward item "Orange Potion"; setarray [email protected]_itemnum[0],0; // Set the quantity of the reward //== Set Draw Rewards ==// set [email protected]_drawitem_qnty,0; // Important, set to how many reward items you set below for draw result setarray [email protected]_itemid[0],0; // Set the item id of the reward item setarray [email protected]_itemname$[0],"Yellow Potion", // Set the name of the reward item "White Potion"; setarray [email protected]_itemnum[0],0; // Set the quantity of the reward //== CONFIG END ==// // Do not change configs below, this will reset in case the server unexpectedly shuts down set [email protected]_Start,0; set [email protected]_team,0; set [email protected]_team1,0; set [email protected]_team2,0; set $team1_mem,0; set $team2_mem,0; // RWC 3 enablenpc "WALL#41"; enablenpc "WALL#42"; enablenpc "WALL#43"; enablenpc "WALL#44"; enablenpc "WALL#45"; enablenpc "WALL#46"; enablenpc "WALL#47"; enablenpc "WALL#48"; enablenpc "WALL#49"; enablenpc "WALL#50"; enablenpc "WALL#51"; enablenpc "WALL#52"; enablenpc "WALL#53"; enablenpc "WALL#54"; enablenpc "WALL#55"; enablenpc "WALL#56"; enablenpc "WALL#57"; enablenpc "WALL#58"; enablenpc "WALL#59"; enablenpc "WALL#60"; enablenpc "WALL#61"; enablenpc "WALL#62"; enablenpc "WALL#63"; enablenpc "WALL#64"; // Now let's check if the event is on going or not (checks current server's time) // if the event is on going, Enable NPC and sends a message to the player upon logging in for(set [email protected],0; [email protected]<=22; set [email protected],[email protected]+2) { set [email protected],[email protected]+1; if(gettime(3)>[email protected] && gettime(3)<[email protected]) { set [email protected]_start,1; enablenpc "PartyReg"; } set [email protected],[email protected]+1; } end; } // Party Registration NPC quiz_02,350,389,3 script Party Registration::PartyReg 89,{ mes "["[email protected]$+"]"; if(([email protected]_Start && getcharid(1)[email protected]_team1) || ([email protected]_Start && getcharid(1)[email protected]_team2) ) { mes "Hmm... Too bad for you, you didn't make it to win for your party. Cheer them up instead."; close; } if([email protected]_Start || [email protected]_team>=2) { mes "Battle is currently on"; mes "going. Party registration is"; mes "close during this time."; next; if(select("> Check current battle info.:> Leave") == 2){ mes "["[email protected]$+"]"; mes "Come back to me and register your party after the battle between "+getpartyname([email protected]_team1)+" and "+getpartyname([email protected]_team2)+" has ended."; close; } mes "["[email protected]$+"]"; if([email protected]_Start) { mes "The Battle already ended."; close; } set @standing_mem1,[email protected]_mem-$team2_mem; set @standing_mem2,[email protected]_mem-$team1_mem; mes "Battle Information"; mes "---"; mes "- " + getpartyname([email protected]_team1) + " Party : "; mes "Standing Members Left : " + @standing_mem1; mes "---"; mes "- " + getpartyname([email protected]_team2) + " Party : "; mes "Standing Members Left : " + @standing_mem2; next; mes "["[email protected]$+"]"; if($team1_mem>$team2_mem) { mes "Current leading party is "+getpartyname([email protected]_team1); close; } else if($team1_mem<$team2_mem) { mes "Current leading party is "+getpartyname([email protected]_team2); close; } else { mes "Both Party has the same number of members that are still alive."; close; } } if(getcharid(1)==0) goto L_ContinueMain; if(getcharid(1)[email protected]_team1 || getcharid(1)[email protected]_team2) { mes getpartyleader(getcharid(1)) + ", your party leader already registered your party, please wait for the other team to register."; close; } L_ContinueMain: mes "Welcome "+strcharinfo(0)+"!"; mes "I am the War Arena Organizer"; next; switch(select("> Register")) { case 1: callsub R_Party; } R_Party: mes "["[email protected]$+"]"; if ( callfunc("party_has_duplicate_job") ) { mes "It seems that someone in the party has the same class than another member. Please check again the requirements..."; close; } if ( [email protected] != 7 ) { mes "You have to be 7 on the team."; close; } if(getcharid(1)==0) { mes "I see that you have no party yet. Please form your party first before registering."; close; } mes "Party Name : "+strcharinfo(1); if(getpartyleader(getcharid(1),2)==getcharid(0)) { mes "Party Leader : You"; } else { mes "Party Leader : "+getpartyleader(getcharid(1)); } mes "-"; getpartymember(getcharid(1)); set @partymembercount,[email protected]; copyarray @partymembername$[0],[email protected]$[0],@partymembercount; set @countmem,0; L_DisplayMem: if(@countmem == @partymembercount) goto L_Continue; set @countmem,@countmem+1; goto L_DisplayMem; L_Continue: mes "Party Members ("+(@countmem)+"/"[email protected]_mem+")"; set @count,0; L_DisplayMember: if(@count == @partymembercount) goto L_Continue2; mes (@count + 1) + ". ^0000FF" + @partymembername$[@count] + "^000000"; set @count,@count+1; goto L_DisplayMember; L_Continue2: if([email protected]_Start || [email protected]_team>=2) { next; mes "Sorry but party registration is now close. Please re-register after the current battle progress has ended."; close; } if(getpartyleader(getcharid(1),2)!=getcharid(0)) { next; mes strcharinfo(0)+", If you have time, please find your Party Leader "+getpartyleader(getcharid(1))+" and let him/her register your party"; close; } if(@countmem>[email protected]_mem) { next; mes "This event requires you to form a party with only "[email protected]_mem+" members including you. I'm sorry to say but you need to expel ^FF0000"+(@[email protected]_mem)+"^000000 more member(s)."; close; } if(@countmem<[email protected]_mem) { next; mes "This event requires you to form a party with "[email protected]_mem+" members including you. You still need to recruit ^FF0000"+([email protected][email protected])+"^000000 more member(s)."; close; } set [email protected]_team,[email protected]_team+1; if([email protected]_team==1) { set [email protected]_team1,getcharid(1); setarray [email protected]_name1$[0],@partymembername$[0],@partymembername$[1],@partymembername$[2],@partymembername$[3],@partymembername$[4]; announce "Team "+getpartyname([email protected]_team1)+" registered on Team "[email protected]_team+".",bc_all; goto L_Continue3; } if([email protected]_team==2) { set [email protected]_team2,getcharid(1); announce "Team "+getpartyname([email protected]_team2)+" registered on Team "[email protected]_team+".",bc_all; setarray [email protected]_name2$[0],@partymembername$[0],@partymembername$[1],@partymembername$[2],@partymembername$[3],@partymembername$[4]; goto L_Continue3; } L_Continue3: close2; if([email protected]_team==2) donpcevent "PvP_Func::OnStart"; end; OnPCDieEvent: getmapxy @map$,@x,@y,0; if([email protected]_Start && @[email protected]_map$ && getcharid(1)[email protected]_team1) { set $team2_mem,$team2_mem+1; warp [email protected]_map$,[email protected]_mapX,[email protected]_mapY; if([email protected]_mem) { setcell [email protected]_map$,80,55,80,44,cell_walkable,1; setcell [email protected]_map$,19,55,19,44,cell_walkable,1; donpcevent "PvP_Func::OnTeam2Win2"; } end; } if([email protected]_Start && @[email protected]_map$ && getcharid(1)[email protected]_team2) { set $team1_mem,$team1_mem+1; warp [email protected]_map$,[email protected]_mapX,[email protected]_mapY; if([email protected]_mem) { setcell [email protected]_map$,80,55,80,44,cell_walkable,1; setcell [email protected]_map$,19,55,19,44,cell_walkable,1; donpcevent "PvP_Func::OnTeam1Win2"; } end; } OnPCLogoutEvent: getmapxy @map$,@x,@y,0; if([email protected]_Start && @[email protected]_map$ && getcharid(1)[email protected]_team1) { warp [email protected]_map$,[email protected]_mapX,[email protected]_mapY; set $team2_mem,$team2_mem+1; mapannounce [email protected]_map$,"User "+strcharinfo(0)+" of "+getpartyname([email protected]_team1)+" Team logged out of the game.",bc_all; if([email protected]_mem) { setcell [email protected]_map$,80,55,80,44,cell_walkable,1; setcell [email protected]_map$,19,55,19,44,cell_walkable,1; donpcevent "PvP_Func::OnTeam2Win2"; } end; } if([email protected]_Start && @[email protected]_map$ && getcharid(1)[email protected]_team2) { warp [email protected]_map$,[email protected]_mapX,[email protected]_mapY; set $team1_mem,$team1_mem+1; mapannounce [email protected]_map$,"User "+strcharinfo(0)+" of "+getpartyname([email protected]_team2)+" Team logged out of the game.",bc_all; if([email protected]_mem) { setcell [email protected]_map$,80,55,80,44,cell_walkable,1; setcell [email protected]_map$,19,55,19,44,cell_walkable,1; donpcevent "PvP_Func::OnTeam1Win2"; } end; } OnPCLoadMapEvent: getmapxy @map$,@x,@y,0; if([email protected]_Start && @[email protected]_map$ && getcharid(1)[email protected]_team1) { warp [email protected]_map$,[email protected]_mapX,[email protected]_mapY; set $team2_mem,$team2_mem+1; mapannounce [email protected]_map$,""+strcharinfo(0)+" of "+getpartyname([email protected]_team1)+" party warped out of the battle arena.",bc_blue; if([email protected]_mem) { setcell [email protected]_map$,80,55,80,44,cell_walkable,1; setcell [email protected]_map$,19,55,19,44,cell_walkable,1; donpcevent "PvP_Func::OnTeam2Win2"; } end; } if([email protected]_Start && @[email protected]_map$ && getcharid(1)[email protected]_team2) { warp [email protected]_map$,[email protected]_mapX,[email protected]_mapY; set $team1_mem,$team1_mem+1; mapannounce [email protected]_map$,""+strcharinfo(0)+" of "+getpartyname([email protected]_team2)+" party warped out of the battle arena.",bc_blue; if([email protected]_mem) { setcell [email protected]_map$,80,55,80,44,cell_walkable,1; setcell [email protected]_map$,19,55,19,44,cell_walkable,1; donpcevent "PvP_Func::OnTeam1Win2"; } end; } } // Script where all functions are stored - script PvP_Func -1,{ OnStart: initnpctimer; set [email protected]_Start,1; setcell [email protected]_map$,80,55,80,44,cell_walkable,0; setcell [email protected]_map$,19,55,19,44,cell_walkable,0; announce "The Battle between "+getpartyname([email protected]_team1)+" and "+getpartyname([email protected]_team2)+" Party has engaged. Registered Party along with its members will be automatically warped to the arena after 10 seconds.",bc_all; gvgoff [email protected]_map$; setnpctimer 0; startnpctimer; end; OnTimer5000: warpparty [email protected]_map$,[email protected]_arena_mapX,[email protected]_arena_mapY,[email protected]_team1; warpparty [email protected]_map$,[email protected]_arena_mapX,[email protected]_arena_mapY,[email protected]_team2; end; OnTimer30000: mapannounce [email protected]_map$,"Players, you only have 30 seconds left to prepare for the Battle.",bc_all; end; OnTimer50000: mapannounce [email protected]_map$,"The Battle will begin in 5 seconds.",bc_all; end; OnTimer51000: mapannounce [email protected]_map$,"The Battle will begin in 4 seconds.",bc_all; end; OnTimer52000: mapannounce [email protected]_map$,"The Battle will begin in 3 seconds.",bc_all; end; OnTimer53000: mapannounce [email protected]_map$,"The Battle will begin in 2 seconds.",bc_all; end; OnTimer54000: mapannounce [email protected]_map$,"The Battle will begin in 1 second.",bc_all; end; OnTimer55000: gvgon [email protected]_map$; setcell [email protected]_map$,80,55,80,44,cell_walkable,1; setcell [email protected]_map$,19,55,19,44,cell_walkable,1; disablenpc "WALL#41"; disablenpc "WALL#42"; disablenpc "WALL#43"; disablenpc "WALL#44"; disablenpc "WALL#45"; disablenpc "WALL#46"; disablenpc "WALL#47"; disablenpc "WALL#48"; disablenpc "WALL#49"; disablenpc "WALL#50"; disablenpc "WALL#51"; disablenpc "WALL#52"; disablenpc "WALL#53"; disablenpc "WALL#54"; disablenpc "WALL#55"; disablenpc "WALL#56"; disablenpc "WALL#57"; disablenpc "WALL#58"; disablenpc "WALL#59"; disablenpc "WALL#60"; disablenpc "WALL#61"; disablenpc "WALL#62"; disablenpc "WALL#63"; disablenpc "WALL#64"; announce "The team "+getpartyname([email protected]_team1)+" vs "+getpartyname([email protected]_team2)+" battle has begun!",bc_all; mapannounce [email protected]_map$,"You only have 5 minutes to eliminate all opponent's party members. Be quick!!!",bc_all; end; // After 5 Minutes, system will check the party who has the most number of member and will declare that party as a winner. // All variables will be resetted. OnTimer420000: if($team2_mem<$team1_mem) { donpcevent "PvP_Func::OnTeam1Win"; } else if ($team2_mem<$team1_mem) { donpcevent "PvP_Func::OnTeam2Win"; } else if ($team2_mem==$team1_mem || $team1_mem==$team2_mem) { donpcevent "PvP_Func::OnDraw"; } else { donpcevent "PvP_Func::OnNoWin"; } end; // This label will be called after the event has ended without registered parties OnNoWin: announce "The Battle has ended.",bc_all; gvgoff [email protected]_map$; set [email protected]_team,0; set [email protected]_Start,0; set $team1_mem,0; set $team2_mem,0; set [email protected]_team1,0; set [email protected]_team2,0; setcell "guild_vs3",19,55,19,44,cell_walkable,0; setcell "guild_vs3",80,55,80,44,cell_walkable,0; enablenpc "WALL#41"; enablenpc "WALL#42"; enablenpc "WALL#43"; enablenpc "WALL#44"; enablenpc "WALL#45"; enablenpc "WALL#46"; enablenpc "WALL#47"; enablenpc "WALL#48"; enablenpc "WALL#49"; enablenpc "WALL#50"; enablenpc "WALL#51"; enablenpc "WALL#52"; enablenpc "WALL#53"; enablenpc "WALL#54"; enablenpc "WALL#55"; enablenpc "WALL#56"; enablenpc "WALL#57"; enablenpc "WALL#58"; enablenpc "WALL#59"; enablenpc "WALL#60"; enablenpc "WALL#61"; enablenpc "WALL#62"; enablenpc "WALL#63"; enablenpc "WALL#64"; stopnpctimer; sleep2 10000; areawarp [email protected]_map$,12,87,87,12,[email protected]_map$,[email protected]_mapX,[email protected]_mapY; end; OnEndNoWin: announce "The Battle has ended.",bc_all; gvgoff [email protected]_map$; set [email protected]_team,0; set [email protected]_Start,0; set $team1_mem,0; set $team2_mem,0; set [email protected]_team1,0; set [email protected]_team2,0; set [email protected]_start,0; setcell "guild_vs3",19,55,19,44,cell_walkable,0; setcell "guild_vs3",80,55,80,44,cell_walkable,0; enablenpc "WALL#41"; enablenpc "WALL#42"; enablenpc "WALL#43"; enablenpc "WALL#44"; enablenpc "WALL#45"; enablenpc "WALL#46"; enablenpc "WALL#47"; enablenpc "WALL#48"; enablenpc "WALL#49"; enablenpc "WALL#50"; enablenpc "WALL#51"; enablenpc "WALL#52"; enablenpc "WALL#53"; enablenpc "WALL#54"; enablenpc "WALL#55"; enablenpc "WALL#56"; enablenpc "WALL#57"; enablenpc "WALL#58"; enablenpc "WALL#59"; enablenpc "WALL#60"; enablenpc "WALL#61"; enablenpc "WALL#62"; enablenpc "WALL#63"; enablenpc "WALL#64"; stopnpctimer; sleep2 10000; areawarp [email protected]_map$,12,87,87,12,[email protected]_map$,[email protected]_mapX,[email protected]_mapY; end; OnDraw: announce "Team "+getpartyname([email protected]_team1)+" and Team "+getpartyname([email protected]_team2)+" has the same number of members standing in the arena, the battle result is a draw.",bc_all; for(set [email protected],0; [email protected]<[email protected]_mem; set [email protected],[email protected]+1) { for(set [email protected],0; [email protected]<[email protected]_drawitem_qnty; set [email protected],[email protected]+1) { charcommand ""[email protected]$+"item "[email protected]_name1$[[email protected]]+" "[email protected]_itemid[[email protected]]+" "[email protected]_itemnum[[email protected]]+""; } } for(set [email protected],0; [email protected]<[email protected]_mem; set [email protected],[email protected]+1) { for(set [email protected],0; [email protected]<[email protected]_drawitem_qnty; set [email protected],[email protected]+1) { charcommand ""[email protected]$+"item "[email protected]_name2$[[email protected]]+" "[email protected]_itemid[[email protected]]+" "[email protected]_itemnum[[email protected]]+""; } } stopnpctimer; gvgoff [email protected]_map$; set [email protected]_team,0; set [email protected]_Start,0; set $team1_mem,0; set $team2_mem,0; set [email protected]_team1,0; set [email protected]_team2,0; setcell "guild_vs3",19,55,19,44,cell_walkable,0; setcell "guild_vs3",80,55,80,44,cell_walkable,0; enablenpc "WALL#41"; enablenpc "WALL#42"; enablenpc "WALL#43"; enablenpc "WALL#44"; enablenpc "WALL#45"; enablenpc "WALL#46"; enablenpc "WALL#47"; enablenpc "WALL#48"; enablenpc "WALL#49"; enablenpc "WALL#50"; enablenpc "WALL#51"; enablenpc "WALL#52"; enablenpc "WALL#53"; enablenpc "WALL#54"; enablenpc "WALL#55"; enablenpc "WALL#56"; enablenpc "WALL#57"; enablenpc "WALL#58"; enablenpc "WALL#59"; enablenpc "WALL#60"; enablenpc "WALL#61"; enablenpc "WALL#62"; enablenpc "WALL#63"; enablenpc "WALL#64"; sleep2 10000; areawarp [email protected]_map$,12,87,87,12,[email protected]_map$,[email protected]_mapX,[email protected]_mapY; end; OnEndDraw: announce "Team "+getpartyname([email protected]_team1)+" and Team "+getpartyname([email protected]_team2)+" has the same number of members standing in the arena, the battle result is a draw.",bc_all; for(set [email protected],0; [email protected]<[email protected]_mem; set [email protected],[email protected]+1) { for(set [email protected],0; [email protected]<[email protected]_drawitem_qnty; set [email protected],[email protected]+1) { charcommand ""[email protected]$+"item "[email protected]_name1$[[email protected]]+" "[email protected]_itemid[[email protected]]+" "[email protected]_itemnum[[email protected]]+""; } } for(set [email protected],0; [email protected]<[email protected]_mem; set [email protected],[email protected]+1) { for(set [email protected],0; [email protected]<[email protected]_drawitem_qnty; set [email protected],[email protected]+1) { charcommand ""[email protected]$+"item "[email protected]_name2$[[email protected]]+" "[email protected]_itemid[[email protected]]+" "[email protected]_itemnum[[email protected]]+""; } } stopnpctimer; gvgoff [email protected]_map$; set [email protected]_team,0; set [email protected]_Start,0; set $team1_mem,0; set $team2_mem,0; set [email protected]_team1,0; set [email protected]_team2,0; set [email protected]_start,0; setcell "guild_vs3",19,55,19,44,cell_walkable,0; setcell "guild_vs3",80,55,80,44,cell_walkable,0; enablenpc "WALL#41"; enablenpc "WALL#42"; enablenpc "WALL#43"; enablenpc "WALL#44"; enablenpc "WALL#45"; enablenpc "WALL#46"; enablenpc "WALL#47"; enablenpc "WALL#48"; enablenpc "WALL#49"; enablenpc "WALL#50"; enablenpc "WALL#51"; enablenpc "WALL#52"; enablenpc "WALL#53"; enablenpc "WALL#54"; enablenpc "WALL#55"; enablenpc "WALL#56"; enablenpc "WALL#57"; enablenpc "WALL#58"; enablenpc "WALL#59"; enablenpc "WALL#60"; enablenpc "WALL#61"; enablenpc "WALL#62"; enablenpc "WALL#63"; enablenpc "WALL#64"; sleep2 10000; areawarp [email protected]_map$,12,87,87,12,[email protected]_map$,[email protected]_mapX,[email protected]_mapY; end; OnTeam1Win: announce "After 5 minutes of battle, "+getpartyname([email protected]_team1)+" party member survives more than "+getpartyname([email protected]_team2)+" party member and won the Battle!",bc_all; for(set [email protected],0; [email protected]<[email protected]_mem; set [email protected],[email protected]+1) { for(set [email protected],0; [email protected]<[email protected]_winitem_qnty; set [email protected],[email protected]+1) { charcommand ""[email protected]$+"item "[email protected]_name1$[[email protected]]+" "[email protected]_itemid[[email protected]]+" "[email protected]_itemnum[[email protected]]+""; } } for(set [email protected],0; [email protected]<[email protected]_mem; set [email protected],[email protected]+1) { for(set [email protected],0; [email protected]<[email protected]_loseitem_qnty; set [email protected],[email protected]+1) { charcommand ""[email protected]$+"item "[email protected]_name2$[[email protected]]+" "[email protected]_itemid[[email protected]]+" "[email protected]_itemnum[[email protected]]+""; } } set [email protected]_team,0; set [email protected]_Start,0; set $team1_mem,0; set $team2_mem,0; set [email protected]_team1,0; set [email protected]_team2,0; gvgoff [email protected]_map$; setcell "guild_vs3",19,55,19,44,cell_walkable,0; setcell "guild_vs3",80,55,80,44,cell_walkable,0; enablenpc "WALL#41"; enablenpc "WALL#42"; enablenpc "WALL#43"; enablenpc "WALL#44"; enablenpc "WALL#45"; enablenpc "WALL#46"; enablenpc "WALL#47"; enablenpc "WALL#48"; enablenpc "WALL#49"; enablenpc "WALL#50"; enablenpc "WALL#51"; enablenpc "WALL#52"; enablenpc "WALL#53"; enablenpc "WALL#54"; enablenpc "WALL#55"; enablenpc "WALL#56"; enablenpc "WALL#57"; enablenpc "WALL#58"; enablenpc "WALL#59"; enablenpc "WALL#60"; enablenpc "WALL#61"; enablenpc "WALL#62"; enablenpc "WALL#63"; enablenpc "WALL#64"; stopnpctimer; sleep2 10000; areawarp [email protected]_map$,12,87,87,12,[email protected]_map$,[email protected]_mapX,[email protected]_mapY; end; OnEndTeam1Win: announce "After 5 minutes of battle, "+getpartyname([email protected]_team1)+" party member survives more than "+getpartyname([email protected]_team2)+" party member and won the Battle!",bc_all; for(set [email protected],0; [email protected]<[email protected]_mem; set [email protected],[email protected]+1) { for(set [email protected],0; [email protected]<[email protected]_winitem_qnty; set [email protected],[email protected]+1) { charcommand ""[email protected]$+"item "[email protected]_name1$[[email protected]]+" "[email protected]_itemid[[email protected]]+" "[email protected]_itemnum[[email protected]]+""; } } for(set [email protected],0; [email protected]<[email protected]_mem; set [email protected],[email protected]+1) { for(set [email protected],0; [email protected]<[email protected]_loseitem_qnty; set [email protected],[email protected]+1) { charcommand ""[email protected]$+"item "[email protected]_name2$[[email protected]]+" "[email protected]_itemid[[email protected]]+" "[email protected]_itemnum[[email protected]]+""; } } set [email protected]_team,0; set [email protected]_Start,0; set $team1_mem,0; set $team2_mem,0; set [email protected]_team1,0; set [email protected]_team2,0; set [email protected]_start,0; gvgoff [email protected]_map$; setcell "guild_vs3",19,55,19,44,cell_walkable,0; setcell "guild_vs3",80,55,80,44,cell_walkable,0; enablenpc "WALL#41"; enablenpc "WALL#42"; enablenpc "WALL#43"; enablenpc "WALL#44"; enablenpc "WALL#45"; enablenpc "WALL#46"; enablenpc "WALL#47"; enablenpc "WALL#48"; enablenpc "WALL#49"; enablenpc "WALL#50"; enablenpc "WALL#51"; enablenpc "WALL#52"; enablenpc "WALL#53"; enablenpc "WALL#54"; enablenpc "WALL#55"; enablenpc "WALL#56"; enablenpc "WALL#57"; enablenpc "WALL#58"; enablenpc "WALL#59"; enablenpc "WALL#60"; enablenpc "WALL#61"; enablenpc "WALL#62"; enablenpc "WALL#63"; enablenpc "WALL#64"; stopnpctimer; sleep2 10000; areawarp [email protected]_map$,12,87,87,12,[email protected]_map$,[email protected]_mapX,[email protected]_mapY; end; OnTeam2Win: announce "After 5 minutes of battle, "+getpartyname([email protected]_team2)+" party member survives more than "+getpartyname([email protected]_team1)+" party member and won the Battle!",bc_all; for(set [email protected],0; [email protected]<[email protected]_mem; set [email protected],[email protected]+1) { for(set [email protected],0; [email protected]<[email protected]_winitem_qnty; set [email protected],[email protected]+1) { charcommand ""[email protected]$+"item "[email protected]_name2$[[email protected]]+" "[email protected]_itemid[[email protected]]+" "[email protected]_itemnum[[email protected]]+""; } } for(set [email protected],0; [email protected]<[email protected]_mem; set [email protected],[email protected]+1) { for(set [email protected],0; [email protected]<[email protected]_loseitem_qnty; set [email protected],[email protected]+1) { charcommand ""[email protected]$+"item "[email protected]_name1$[[email protected]]+" "[email protected]_itemid[[email protected]]+" "[email protected]_itemnum[[email protected]]+""; } } set [email protected]_team,0; set [email protected]_Start,0; set $team1_mem,0; set $team2_mem,0; set [email protected]_team1,0; set [email protected]_team2,0; gvgoff [email protected]_map$; setcell "guild_vs3",19,55,19,44,cell_walkable,0; setcell "guild_vs3",80,55,80,44,cell_walkable,0; enablenpc "WALL#41"; enablenpc "WALL#42"; enablenpc "WALL#43"; enablenpc "WALL#44"; enablenpc "WALL#45"; enablenpc "WALL#46"; enablenpc "WALL#47"; enablenpc "WALL#48"; enablenpc "WALL#49"; enablenpc "WALL#50"; enablenpc "WALL#51"; enablenpc "WALL#52"; enablenpc "WALL#53"; enablenpc "WALL#54"; enablenpc "WALL#55"; enablenpc "WALL#56"; enablenpc "WALL#57"; enablenpc "WALL#58"; enablenpc "WALL#59"; enablenpc "WALL#60"; enablenpc "WALL#61"; enablenpc "WALL#62"; enablenpc "WALL#63"; enablenpc "WALL#64"; stopnpctimer; sleep2 10000; areawarp [email protected]_map$,12,87,87,12,[email protected]_map$,[email protected]_mapX,[email protected]_mapY; end; OnEndTeam2Win: announce "After 5 minutes of battle, "+getpartyname([email protected]_team2)+" party member survives more than "+getpartyname([email protected]_team1)+"'s Party member and won the Battle!",bc_all; for(set [email protected],0; [email protected]<[email protected]_mem; set [email protected],[email protected]+1) { for(set [email protected],0; [email protected]<[email protected]_winitem_qnty; set [email protected],[email protected]+1) { charcommand ""[email protected]$+"item "[email protected]_name2$[[email protected]]+" "[email protected]_itemid[[email protected]]+" "[email protected]_itemnum[[email protected]]+""; } } for(set [email protected],0; [email protected]<[email protected]_mem; set [email protected],[email protected]+1) { for(set [email protected],0; [email protected]<[email protected]_loseitem_qnty; set [email protected],[email protected]+1) { charcommand ""[email protected]$+"item "[email protected]_name1$[[email protected]]+" "[email protected]_itemid[[email protected]]+" "[email protected]_itemnum[[email protected]]+""; } } set [email protected]_team,0; set [email protected]_Start,0; set $team1_mem,0; set $team2_mem,0; set [email protected]_team1,0; set [email protected]_team2,0; set [email protected]_start,0; disablenpc "PartyReg"; gvgoff [email protected]_map$; setcell "guild_vs3",19,55,19,44,cell_walkable,0; setcell "guild_vs3",80,55,80,44,cell_walkable,0; enablenpc "WALL#41"; enablenpc "WALL#42"; enablenpc "WALL#43"; enablenpc "WALL#44"; enablenpc "WALL#45"; enablenpc "WALL#46"; enablenpc "WALL#47"; enablenpc "WALL#48"; enablenpc "WALL#49"; enablenpc "WALL#50"; enablenpc "WALL#51"; enablenpc "WALL#52"; enablenpc "WALL#53"; enablenpc "WALL#54"; enablenpc "WALL#55"; enablenpc "WALL#56"; enablenpc "WALL#57"; enablenpc "WALL#58"; enablenpc "WALL#59"; enablenpc "WALL#60"; enablenpc "WALL#61"; enablenpc "WALL#62"; enablenpc "WALL#63"; enablenpc "WALL#64"; stopnpctimer; sleep2 10000; areawarp [email protected]_map$,12,87,87,12,[email protected]_map$,[email protected]_mapX,[email protected]_mapY; end; OnTeam1Win2: announce "Team "+getpartyname([email protected]_team1)+" smashed all the member of Team "+getpartyname([email protected]_team2)+" and won the Battle!",bc_all; for(set [email protected],0; [email protected]<[email protected]_mem; set [email protected],[email protected]+1) { for(set [email protected],0; [email protected]<[email protected]_winitem_qnty; set [email protected],[email protected]+1) { charcommand ""[email protected]$+"item "[email protected]_name1$[[email protected]]+" "[email protected]_itemid[[email protected]]+" "[email protected]_itemnum[[email protected]]+""; } } for(set [email protected],0; [email protected]<[email protected]_mem; set [email protected],[email protected]+1) { for(set [email protected],0; [email protected]<[email protected]_loseitem_qnty; set [email protected],[email protected]+1) { charcommand ""[email protected]$+"item "[email protected]_name2$[[email protected]]+" "[email protected]_itemid[[email protected]]+" "[email protected]_itemnum[[email protected]]+""; } } set [email protected]_team,0; set [email protected]_Start,0; set $team1_mem,0; set $team2_mem,0; set [email protected]_team1,0; set [email protected]_team2,0; gvgoff [email protected]_map$; setcell "guild_vs3",19,55,19,44,cell_walkable,0; setcell "guild_vs3",80,55,80,44,cell_walkable,0; enablenpc "WALL#41"; enablenpc "WALL#42"; enablenpc "WALL#43"; enablenpc "WALL#44"; enablenpc "WALL#45"; enablenpc "WALL#46"; enablenpc "WALL#47"; enablenpc "WALL#48"; enablenpc "WALL#49"; enablenpc "WALL#50"; enablenpc "WALL#51"; enablenpc "WALL#52"; enablenpc "WALL#53"; enablenpc "WALL#54"; enablenpc "WALL#55"; enablenpc "WALL#56"; enablenpc "WALL#57"; enablenpc "WALL#58"; enablenpc "WALL#59"; enablenpc "WALL#60"; enablenpc "WALL#61"; enablenpc "WALL#62"; enablenpc "WALL#63"; enablenpc "WALL#64"; stopnpctimer; sleep2 10000; areawarp [email protected]_map$,12,87,87,12,[email protected]_map$,[email protected]_mapX,[email protected]_mapY; end; OnTeam2Win2: announce "Team "+getpartyname([email protected]_team2)+" smashed all the member of Team "+getpartyname([email protected]_team1)+"and won the Battle!",bc_all; for(set [email protected],0; [email protected]<[email protected]_mem; set [email protected],[email protected]+1) { for(set [email protected],0; [email protected]<[email protected]_winitem_qnty; set [email protected],[email protected]+1) { charcommand ""[email protected]$+"item "[email protected]_name2$[[email protected]]+" "[email protected]_itemid[[email protected]]+" "[email protected]_itemnum[[email protected]]+""; } } for(set [email protected],0; [email protected]<[email protected]_mem; set [email protected],[email protected]+1) { for(set [email protected],0; [email protected]<[email protected]_loseitem_qnty; set [email protected],[email protected]+1) { charcommand ""[email protected]$+"item "[email protected]_name1$[[email protected]]+" "[email protected]_itemid[[email protected]]+" "[email protected]_itemnum[[email protected]]+""; } } set [email protected]_team,0; set [email protected]_Start,0; set $team1_mem,0; set $team2_mem,0; set [email protected]_team1,0; set [email protected]_team2,0; gvgoff [email protected]_map$; setcell "guild_vs3",19,55,19,44,cell_walkable,0; setcell "guild_vs3",80,55,80,44,cell_walkable,0; enablenpc "WALL#41"; enablenpc "WALL#42"; enablenpc "WALL#43"; enablenpc "WALL#44"; enablenpc "WALL#45"; enablenpc "WALL#46"; enablenpc "WALL#47"; enablenpc "WALL#48"; enablenpc "WALL#49"; enablenpc "WALL#50"; enablenpc "WALL#51"; enablenpc "WALL#52"; enablenpc "WALL#53"; enablenpc "WALL#54"; enablenpc "WALL#55"; enablenpc "WALL#56"; enablenpc "WALL#57"; enablenpc "WALL#58"; enablenpc "WALL#59"; enablenpc "WALL#60"; enablenpc "WALL#61"; enablenpc "WALL#62"; enablenpc "WALL#63"; enablenpc "WALL#64"; stopnpctimer; sleep2 10000; areawarp [email protected]_map$,12,87,87,12,[email protected]_map$,[email protected]_mapX,[email protected]_mapY; end; } function script StartEvent { enablenpc "PartyReg"; set [email protected]_start,1; announce "The Battle has begun.",bc_all; return; } function script EndEvent { if ([email protected]_Start && [email protected]_team<2) { setcell [email protected]_map$,80,55,80,44,cell_walkable,1; setcell [email protected]_map$,19,55,19,44,cell_walkable,1; donpcevent "PvP_Func::OnEndNoWin"; } else if ($team2_mem<$team1_mem) { setcell [email protected]_map$,80,55,80,44,cell_walkable,1; setcell [email protected]_map$,19,55,19,44,cell_walkable,1; donpcevent "PvP_Func::OnEndTeam1Win"; } else if ($team2_mem<$team1_mem) { setcell [email protected]_map$,80,55,80,44,cell_walkable,1; setcell [email protected]_map$,19,55,19,44,cell_walkable,1; donpcevent "PvP_Func::OnEndTeam2Win"; } else if ($team2_mem==$team1_mem || $team1_mem==$team2_mem) { setcell [email protected]_map$,80,55,80,44,cell_walkable,1; setcell [email protected]_map$,19,55,19,44,cell_walkable,1; donpcevent "PvP_Func::OnEndDraw"; } else { setcell [email protected]_map$,80,55,80,44,cell_walkable,1; setcell [email protected]_map$,19,55,19,44,cell_walkable,1; donpcevent "PvP_Func::OnEndNoWin"; } end; } //////////////////////////////////////////////////////////////////////////// ////RWC 3/////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////// guild_vs3,19,55,0 script WALL#41 1905,{ } guild_vs3,19,54,0 duplicate(WALL#41) WALL#42 1905 guild_vs3,19,53,0 duplicate(WALL#41) WALL#43 1905 guild_vs3,19,52,0 duplicate(WALL#41) WALL#44 1905 guild_vs3,19,51,0 duplicate(WALL#41) WALL#45 1905 guild_vs3,19,50,0 duplicate(WALL#41) WALL#46 1905 guild_vs3,19,49,0 duplicate(WALL#41) WALL#47 1905 guild_vs3,19,48,0 duplicate(WALL#41) WALL#48 1905 guild_vs3,19,47,0 duplicate(WALL#41) WALL#49 1905 guild_vs3,19,46,0 duplicate(WALL#41) WALL#50 1905 guild_vs3,19,45,0 duplicate(WALL#41) WALL#51 1905 guild_vs3,19,44,0 duplicate(WALL#41) WALL#52 1905 guild_vs3,80,55,0 duplicate(WALL#41) WALL#53 1905 guild_vs3,80,54,0 duplicate(WALL#41) WALL#54 1905 guild_vs3,80,53,0 duplicate(WALL#41) WALL#55 1905 guild_vs3,80,52,0 duplicate(WALL#41) WALL#56 1905 guild_vs3,80,51,0 duplicate(WALL#41) WALL#57 1905 guild_vs3,80,50,0 duplicate(WALL#41) WALL#58 1905 guild_vs3,80,49,0 duplicate(WALL#41) WALL#59 1905 guild_vs3,80,48,0 duplicate(WALL#41) WALL#60 1905 guild_vs3,80,47,0 duplicate(WALL#41) WALL#61 1905 guild_vs3,80,46,0 duplicate(WALL#41) WALL#62 1905 guild_vs3,80,45,0 duplicate(WALL#41) WALL#63 1905 guild_vs3,80,44,0 duplicate(WALL#41) WALL#64 1905 function script party_has_duplicate_job { set [email protected]_id, getarg( 0, getcharid(1) ); // Need to have a party. if ( [email protected]_id ) { return -1; } // Loading party members variables getpartymember [email protected]_id, 1; getpartymember [email protected]_id, 2; // Keep rid attached. set [email protected], playerattached(); // Check all members for ( set [email protected],0; [email protected]<[email protected]; set [email protected], [email protected]+1 ) { // Online user if ( isloggedin( [email protected][[email protected]], [email protected][[email protected]]) ) { // Attach the member to access "Class" attachrid( [email protected][[email protected]] ); if ( compare( [email protected]_class$ + "|", "|" + Class + "|" ) ) { if ( [email protected] ) attachrid([email protected]); else detachrid; return 1; } set [email protected]_class$, [email protected]_class$ + "|" + Class; } // Offline user (use sql) else { set [email protected]$, [email protected]$ + ( [email protected]_i ? "OR " : "" ) + "`char_id`='" + [email protected][[email protected]] + "' "; set [email protected]_i, [email protected]_i + 1; } } // SQL for offline users if ( getstrlen([email protected]$) ) { // get class from offline members set [email protected], query_sql("SELECT `class` FROM `char` WHERE " + [email protected]$, [email protected] ); // Check the class. for ( set [email protected], 0; [email protected]<[email protected]; set [email protected], [email protected]+1 ) { if ( compare( [email protected]_class$ + "|", "|" + [email protected][[email protected]] + "|" ) ) { if ( [email protected] ) attachrid([email protected]); else detachrid; return 1; } set [email protected]_class$, [email protected]_class$ + "|" + [email protected][[email protected]]; } } // Restore RID. if ( [email protected] ) attachrid([email protected]); else detachrid; return 0; } - script RWC -1,{ // Settings // GM LVL Allowed set .gmlvl,99; OnWhisperGlobal: if(getgmlevel() <= .gmlvl) goto N_Authority; switch(select("Reset:")) { case 1: stopnpctimer; gvgoff [email protected]_map$; set [email protected]_team,0; set [email protected]_Start,0; set $team1_mem,0; set $team2_mem,0; set [email protected]_team1,0; set [email protected]_team2,0; set [email protected]_start,0; dispbottom "Reset OK."; close; N_Authority: dispbottom "You cannot use this commands anymore."; close; } }
  5. I am currently working on creating a NPC which allows you to craft Eye Patches in exchange of 1 Rusty Bandages and 1 White Potion. Easy enough right? But there is more, I am using the shop and "OnSellItem:" to craft as many Eye Patches based on the items in the sell box. So in essence, if I have 10 Rusty Bandages and 10 White Potions, I would get 10 Eye Patches. Whereas if I have 9 Rusty Bandages and 10 White Potions, I would get 9 Eye Patches etc. I am however stuck on how to check if an item and it's quantity matches the Eye Patch requirement from the sell box. I am quite a beginner in scripting, so it be very helpful EDIT Fixed it myself.
  6. ~ Original: by Xantara ~ Updated by Akanari [Guild/Party/Char]Bind ~ Merged by Mhalicot Update: ~ Added Guild/Party/Char/Account Bind ~ Include Akanari's NPC ~ Request by: quesoph ~ Pull Req: 2b074de9cd5d4f3ebd115c4db799c2453346a7ce ~ Item default. ~ If Bounded
  7. need help with this one please. the npc wont show up. i already changed the<spaces> with <tabs> but still the same. need help pls. prontera,159,183,4 script Quest Room Warper 856,{ mes "[ Quest Room Warper ]"; mes "Hi!.. Would you like to enter the Quest Room?"; switch(select("Yes:Cancel")) { case 1: warp "jupe_ele_r",49,92; close; } case 2: mes "[ Quest Room Warper ]"; mes "Owh...."; mes "Nevermind..since it is your decision."; mes "It is all up to you."; mes "Come back to me if you changed your mind."; else { mes "Okay Bye.."; close; }
  8. I’ve been involved in Ragnarok Online for a quite a while. I’ve gained experience in the scripting and making various customizations script. [/size] I'm Semi-Available for Script Requests during Weekend ... Information : I am willing to offer my complete services to paying customers. I have no restrictions on the extent of services, however my services do fall under the following categories only: Any NPC Scripts NPC Quests / Exchanger Utilities NPC Custom Event Custom Battleground Custom Instance ( Hercules ) etc Different projects will require different specifications. When requesting a custom service, it’s recommended that those interested should provide a fully detailed explanation of the project. The length of time it will take to complete a service is dependant on the complexity of the project and the response time to queries. However, I can focus a lot of my time on working on the services so most the projects should be completed within a matter of days. Work Samples :[/size] Sample of my works can also found within this forum. Example : All Paid & Free Scripts && E-Script Collection && Youtube Channel Pricing : The prices of the projects requested depend entirely upon the size of the project and the complexity. For a basic outline of potential prices (used as a starting base) see the below list: Basic NPCs ( Free ~ $3.00+ ) SQL related NPC ( $3.00 ~ $8.00+ ) Custom Battleground ( $8.00 ~ $15.00+ ) Custom Instance ( $8.00 ~ $20.00+ ) etc, * You may as well offer me a price that you can afford with. As mentioned, the prices are completely variant as different projects will have different requirements. For the time being, I only accept PayPal payments and Local Bank Transfer. Primarily because my account has a premier business status which means I’m a trusted PayPal user, and my funds are protected. Extra: Support and help for the service I provided for as long as is deemed necessary. No payment requirement up-front (before work is started), however payment is required after transfer of the files/modifications. Both .diff/.patch files and full source/script files where applicable for merging GIT and for directly pasting edits. Agreement : By contacting me for a services, you’re agreeing to accept the following terms and conditions. I do not give refunds without valid reasons! But, I might offer free services as return. If any NPCs doesn’t work for any reason. I will provide full free support for that NPCs. The resale or sharing of my works are not permitted under any circumstance without my permission. Prices are negotiable unless stated otherwise. I may not work on any other request from you, if you haven't or failed to clear all the payment for previous works. All terms and conditions may be subject to change. I reserved all right for my works which include resell, republish and etc. Contact : Facebook : Emistry Haoyan / Emistry Helpdesk Email : [email protected] Forum : rAthena / Hercules / OkayRO Skype : emistry_haoyan If you would like a consultation about the above service, please PM me regarding that as well. Thank you in advance. ♥
  9. Example: I want the variable L_CanTalk to be placed on the character Test Character. by using a script. E.g. an NPC GMs can use to set the variable to a character of their choice. Is this possible?
  10. Olá pessoal, Estou querendo diminuir meu numero de "Npcs de Shop" em meu mercado para algo mais simples e organizado. Já vi em alguns servidores, npcs de shop desse forma porém não tenho nenhum script para usar como base. NPC menu: prontera.gat,164,193,3 script Chico, O vendedor 880,{ set @npc$,"[^FF0000 Chico, O vendedor ^000000]"; mes @npc$; mes "Olá, ^FF0000"+strcharinfo(0)+"^000000!";} mes "Bem Vindo ao Mercado Negro!"; next; mes @npc$; mes "O que deseja comprar?"; menu "=> Armas",armas, "=> Armaduras",armaduras, "=> Nada, obrigado.",m_exit; armas: next; mes @npc$; mes "Ok, Boas compras."; //??????? close; armaduras: next; mes @npc$; mes "Ok, Boas compras."; //??????? close; m_exit: next; mes @npc$; mes "Ok, Volte sempre."; close; } NPC shop: prt_in,178,105,3 shop Weapons_1 4_F_07,6258:-1 prt_in,178,103,3 shop Armor_1 4_F_07,6258:-1 Agradeço a ajuda.
  11. regarding this http://herc.ws/board/topic/10701-link-item-system/?p=63280 when we take a look on console using script e.g. - script catch FAKE_NPC,{ OnAtcommand: debugmes [email protected]_parameters$[0]; end; OnInit: bindatcmd "catch",strnpcinfo(3)+"::OnAtcommand"; end; } let's start to type @catch<space> following shit+left click on beret so and chat command shown : @catch <beret> and the result on console like: [Debug]: script debug : 2000000 110022388 : <ITEM>0004811lq'00'00'00'00</ITEM> let's try on +20 beret @catch <+20 beret> and the result on console like: [Debug]: script debug : 2000000 110022388 : <ITEM>0004811lq%0k'00'00'00'00</ITEM> how does it work? yes that's base converted from 10 to 64 i have not enought knowledge on C so i tried to encode it using vb like this Public Function ConvertBase10$(ByVal d#) Dim S$, t#, i%, l%, bl%, bs$ bs= "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" bl = Len(bs) Do While Val(d) <> 0 t = d i = 0 Do While t >= bl i = i + 1 t = t / bl Loop If i <> l - 1 And l <> 0 Then S = S & String(l - i - 1, Left(bs, 1)) t = Int(t) S = S + Mid(bs, t + 1, 1) d = d - t * (bl ^ i) l = i Loop ConvertBase10 = S End Function what's that mean? <ITEM>0004811lq%0k'00'00'00'00</ITEM> vv Equipment Location -> ConvertBase10(256) = 48 <ITEM>0004811lq%0k'00'00'00'00</ITEM> vvv Equipment ID -> ConvertBase10(5712) = 1lq <ITEM>0004811lq%0k'00'00'00'00</ITEM> vv Refine Level -> ConvertBase10(20) = 0k <ITEM>0004811lq%0k'00'00'00'00</ITEM> vv Card on Slot 1 <ITEM>0004811lq%0k'00'00'00'00</ITEM> vv Card on Slot 2 <ITEM>0004811lq%0k'00'00'00'00</ITEM> vv Card on Slot 3 <ITEM>0004811lq%0k'00'00'00'00</ITEM> vv Card on Slot 4 <ITEM>0004811lq%0k'00'00'00'00</ITEM> v dunno about '1' after equipment location. but i think it's alwasy be 1. we not need to decode, because we just need to send string thar initialized by client to result as item link. i also tried using : dispbotom "You got 1x <ITEM>0004811lq%0k'00'00'00'00</ITEM>"; result is shown "You got <+20 Beret>" clickable in client. also work on announce "S got 1x <ITEM>0004811lq%0k'00'00'00'00</ITEM>" bc_all; we can also try copy this <ITEM>0004811lq%0k'00'00'00'00</ITEM> and paste on client Of course we can make a script and use callfunc but if there any buildin script like this *getitemlinkedmsg <item_id>,<refine>,<card1>,<card2>,<card3>,<card4>; it would be helpfull.
  12. Bom, temos um meno no npc de presença que faz a troca de pontos por itens, no entanto, é definido a quantidade de itens pelo próprio menu, por exemplo, troca 1 ponto de presença por 100 ygg, gostaria de saber como faço pra adicionar um menu nesse npc pro player escolher quantos pontos ele deseja trocar, ficando assim: 1 ponto = 100 ygg Digite a quantidade de pontos que você deseja trocar: Se o jogador não tiver obviamente que vai retornar uma opção inválida, se alguém puder ajudar ficarei grato, segue abaixo o npc: Obs: O npc não é meu, não foi eu quem fiz, nem tenho nenhum crédito sobre o npc, apenas editei. @edit Pode fechar o tópico, dúvida sanada !
  13. Hi, I am struggling to get my script to force an emotion from an NPC from another script. Bit of info: - Both NPCs are on the same map. - Player cannot see both NPCs at the same time on their screen (too far apart). - NPC 1 (who you are talking to) warps you in front of NPC 2, who talks a bit then responds with emotions. What is wrong with this? Thank you in advance for any help. prontera,100,100,5 script NPC1 53,{ mes "[NPC1]"; mes "I am now warping you to NPC2"; next; warp "prontera",150,150,0; mes "[NPC1]; mes "This is NPC2. Say hello to the player, NPC2."; set [email protected], e_paper; next; donpcevent "NPC2::OnEmote"; //Conversation 'mes' continues from here //At the bottom of NPC1's script (but still inside it) OnEmote: emotion [email protected]; end; }
  14. //== Usable Items ========================================== { Id: 600 AegisName: "Cash_Coin" Name: "Cash Coin" Type: 2 Buy: 60 Weight: 1 BuyingStore: true Script: <" ......................... ; "> }, I'm newbie, I need script Cash_coin, when used random add 1-10 cash points!! (sorry for my English)
  15. Fish Fish Fishing Well, Lately i went back on Scripting and testing ideas around ragnarok, and decided to develop a series of professions, but as i'ma well known lazy ass so i'll be releasing the "raw" script as soon as possible as it is probably full of bugs and memory problems. Starting with Fishing! here is a sneak peak of the progress so far. ;D -I'm also using .tga shadows, and custom damage font. Right now it works as follow: - First runs a loop with percentage of breaking it so the fish bites de bait. - Then a "mini-game" starts, where you need to choose the right random placed option, an bait animation ocours, and that minigame start over, guider by a random number rand(2,4) in the video. -Fish/Item Catched! Loot Animation, start over. TODO: -Random placement on water cells (also control on how much you can "fish" from one node, till it unspawn or warp away) -General Configuration for easy using (If item needed, how many minigames tries, loot selection(i hear that there are good functions scripts that base drop % in arrays.) -And so on. Hope you guys enjoy it. Want to hear some thoughts on other profession! and feed back about that one as Well! (already thinking about a lumberjack minigame where you will need to time the hit)
  16. Hi all. May I know why the monster not spawn ? I also have some warning which is: [Warning]: script_get_val: cannot access player variable 'mf_nogo', defaulting to 0 How to fix ? prontera,164,172,5 script Farm Zone 4_F_JPN2,{function RandomizeItem;while( 1 ){mes "How can i help you ?";switch( select( "Information:Farm Items" )){case 1: mes "This is a Farm Zone."; mes "You are able to Hunt Monster inside this Room."; mes "Every Monster will award you random items."; next; mes "But there is some Condition.."; mes "You can only go in ^FF0000once every "+.RoomCleanMin+" minutes for 1 times.^000000"; mes "And Maximum of ^FF0000"+.MaxPlayers+" Players per "+.RoomCleanMin+" Minutes.^000000"; mes "Maximum Hunting Limit ^FF0000"+.MaxItemLimit+"^000000"; next; mes "There will be a ^FF0000Room Cleaning^000000 from time to time..."; mes "All players will be kicked out, it is your bad luck if you meet this."; mes "Delay will still apply even though you just go in for 1 Seconds.."; next; break;case 2: if( #HuntRoomDelay > gettimetick(2) ){ set .last,#HuntRoomDelay - gettimetick(2); set [email protected], .last % ( 24 * 3600 ) % 3600 / (60); mes "Wait for ^FF0000"[email protected]+" Minutes^000000."; close; }else if( getarraysize( .Hunter ) >= .MaxPlayers ){ mes "Currently the Room is Full. Please try again later."; close; }else{ warp .Map$,0,0; set .Hunter[getarraysize( .Hunter )],strcharinfo(0); set #HuntRoomDelay,gettimetick(2) + ( .DelayMin * 60 ); set #FarmHunt,0; end; } }}OnInit:// Maximum Player can join per X Minutes.set .MaxPlayers,2;// Adding X Minutes of Delay before can go in again.set .DelayMin,1;// Maximum Hunt Limit per round inside the Zone.set .MaxItemLimit,10;// Map that will be used in thos Zone.set .Map$,"guild_vs5";// Clear Map Every X Minutes.set .RoomCleanMin,15;// Mapflag Initialization//setmapflag .Map$,mf_nogo;setmapflag .Map$,mf_nomobloot;setmapflag .Map$,mf_nomvploot;setmapflag .Map$,mf_nowarpto;setmapflag .Map$,mf_nochat;setmapflag .Map$,mf_novending;setmapflag .Map$,mf_nocommand,60;setmapflag .Map$,mf_nogo;setmapflag .Map$,mf_nojobexp;setmapflag .Map$,mf_nobaseexp;while( 1 ){ killmonster .Map$,"All"; mapwarp .Map$,"prontera",155,181; monster .Map$,0,0,"[ Farm Zone ] Resident",-1,80,strnpcinfo(0)+"::OnNormalKill"; monster .Map$,0,0,"[ Farm Zone ] Guardian",-3,5,strnpcinfo(0)+"::OnBossKill"; deletearray .Hunter,getarraysize( .Hunter ); announce "[ Farm Zone ] : Farming Zone has been Cleaned up, another 5 Players may go in now.",bc_blue; sleep ( .RoomCleanMin * 60000 ); mapannounce .Map$,"[ Farm Zone ] : Room Clean Up now...All Users will be warped Out.",0; killmonster .Map$,"All"; sleep 3000; }end;OnNormalKill:RandomizeItem( 0,rand(1,5) );monster .Map$,0,0,"--ja--",-1,1,strnpcinfo(0)+"::OnNormalKill";end;OnBossKill:RandomizeItem( 1,rand(1,3) );monster .Map$,0,0,"--ja--",-3,1,strnpcinfo(0)+"::OnBossKill";end;// Function that used to Generate Random Itemsfunction RandomizeItem {set #FarmHunt,#FarmHunt + getarg(1);// Normal Monster in Zone Drops Listsif( getarg(0) == 0 ) setarray .ItemList[0],13989,14232,13517,7139,12033,12016,14534;// Normal Boss in Zone Drops Listsif( getarg(0) == 1 ) setarray .ItemList[0],14536,12912,12267,12266,14601,13830,13831,13832,13833;for( set [email protected],1; [email protected] <= getarg(1); set [email protected],[email protected] + 1 ){ getitem .ItemList[ rand( getarraysize( .ItemList ) ) ],1; }deletearray .ItemList,getarraysize( .ItemList );dispbottom "[ Farm Zone ] : Farmed "+#FarmHunt+" / "+.MaxItemLimit+" Items";if( #FarmHunt >= .MaxItemLimit ){ message strcharinfo(0),"Limit Reach , you may join again later."; sleep2 2000; warp "prontera",155,181; }return;} }
  17. File Name: getrandmob (script command) File Submitter: Samuel File Submitted: 31 Oct 2013 File Category: Plugins Hi guys! Just converted Akinari's getrandmob script command into a plugin. What does it do? Grabs a random monster from one of the branch databases. Useful for hunter quests, disguise events, and anything else you can think of. Uses database stored in memory, so it's faster and more efficient than running SQL queries and doesn't require you to use SQL dbs for items and mobs. Click here to download this file
  18. Hello, Is there any one that can help me create a script. I would like to have a script that gives me a random reward if i complete a quest or trade for points.
  19. In need of help with having this script to work. I've been trying to create a template for "walking" NPCs to create more difficult quests (using sprites with walking animation, of course). The NPC exists when enabled, it just doesn't do anything. **The default location (rwc03,49,49,4) can be changed, it's an area I use to test NPCs on, especially this one, since it walks and it's a small map. rwc03,49,49,4 script Shy Eclipse ECLIPSE,{ function offset_select; function step_rand; OnInit: while(1){ offset_select; npcspeed 100; npcwalkto [email protected]_x,[email protected]_y; [email protected] = rand(3,5); // randomized idle duration sleep [email protected]*1000; // 1000 millisec = 1 sec } function offset_select{ do{ getmapxy([email protected]$,[email protected],[email protected],1); // gets npc's current location step_rand; [email protected]_x = [email protected]+rand([email protected]_a,[email protected]_; // randomized offset x-coord [email protected]_y = [email protected]+rand([email protected]_a,[email protected]_; // randomized offset y-coord }while( !checkcell([email protected]$,[email protected]_x,[email protected]_y,cell_chkpass) ); // checks if selected coords is accessible } function step_rand{ [email protected]_a = rand(1,10); // randomized offset init range [email protected]_b = rand(1,10); // randomized offset end range do{ // addresses possible rand() range error [email protected]_a = rand(1,10); [email protected]_b = rand(1,10); }while( [email protected]_a >= [email protected]_b ); } mes "[Eclipse]"; mes "!! Squik..!"; emotion e_panic; next; if( select("Pet it.:Scare it away.") == 1 ){ mes "[Eclipse]"; mes "**Squik~**"; emotion e_lv; } else { mes "[Eclipse]"; mes "SQUIK!"; emotion e_omg; } close;}
  20. Can someone post any method how to delete cashpoint using sql or script? By the way, how to check player cashpoint in sql database?
  21. Hello !! thank you for clicking on the link and reading my request.... May i request for an NPC which can actually fetch the credits data from the flux cp and would be a shop which would sell items in exchange of the credits in flux panel db. I m requesting u because i m getting too much of item duper complaints and i guess setting global variables or using the predefined db like cp_credits would actually help in secure way of dealing with items. Hoping for a positive response Regards...
  22. Hi all. I want to req a simple script on item database. When click the item, increase the pet intimacy for 100. So, if player click 10x times of Item, the pet intimacy will increase to 1000 and pet become friendly. Besides that, a disbottom message show, Your pet intimacy is now 100, then the value increase depends on how many times player click the item.
  23. Hello all! I am request the scriptwriters and devs here for a script which can refine, tell you refine success change percentage, gives you option to like upgrade your chance of success by giving some specific item or so. I tried to find out at my places but couldn't Also, it would be really sweet if it can refine on the number you input, let say I gave 10 as refine input and 7 is the safe limit for the particular item, then it would prompt the safe alert and a choice to continue with each refine with a next button. P.S I would be really great if somebody can actually make it and archive this
  24. Hi everyone, I've been away from Ragnarok Online for a very long time, I have recently picked it up and I have started NPC Scripting again. I am working on a daily reward script that uses function and I am getting this error: invisible/not on a map error I have managed to re-produce the error with this test script: // Main Script- script L_Test -1,{ // When script starts OnInit: // Configuration set .npc$,"[ Test NPC ] : "; end; // When player logins into game OnPCLoginEvent: dispbottom(.npc$ + callfunc(L_SayHello, strcharinfo(0))); end; }function script L_SayHello { set .playerName$,getarg(0); return "Hello "+ .playerName$;} This script structure is identical to my real script. So when I start the server and login, I get the following error in map server: [Warning]: Unexpected type for argument 1. Expected string.[Debug]: Data: variable name='L_SayHello' index=0[Debug]: Function: callfunc[Debug]: Source (NPC): L_Test (invisible/not on a map)[Error]: script:callfunc: function not found! [0][Debug]: Source (NPC): L_Test (invisible/not on a map) Any idea what this error is about?
  25. Evento Guerra do Empério NPC de evento, Não-Oficial, criado por mim, com base na História do Ragnarok. Toda vez que a WOE começar, existe uma chance de esse evento começar, e o NPC íris vai ser ativado, quem falar com o NPC enquanto o evento estiver ativo poderá fazer a quest primeiro para poder participar do evento, que é trazer 100 mantos e estar usando um manto sagrado. O Objetivo é matar 100 players (por padrão) na WOE para ganhar o prêmio que é uma Coroa do Deus-Sol. Enquanto o jogador estiver no evento, há uma chance de ele ser bufado e ganhar porção branca.O NPC vai dar prêmio somente para 1 jogador, ou seja, o primeiro a matar 100 players. DOWNLOAD https://xp-dev.com/svn/tecnocronus_scripts/scripts/PT/Woe%20Event.txt CHANGELOG http://trac.xp-dev.com/TC_Scripts/log/scripts/PT/Woe Event.txt
×
×
  • Create New...

Important Information

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