Can help me solve it? Im using script from chris collection. I modified it though to make it use only one arena, Izlude for all pvp except GVG. Weird number
//===== eAthena Script =======================================
//= Arena Master
//===== By ===================================================
//= lllchrislll
//===== Version ==============================================
//= 1.0 - Script Made
// Added Multi Kill & SoundEffects
// Added Bounty & Promotion Feature
// Fully tested & Rewritten most of the code
// - Since it didn't wanted to work like I wanted q-q
// - Couldn't test the Party PvP option though.
// Added a bonus at the bounty feature
// - If an player gains a "$@bty_bon_start" spree, "$@bty_bonus"
// will be given to the player, who kill him/her.
//===== Compatible With ======================================
//= Every eAthena Version [sql]
//===== Description ==========================================
//= PvP / GvG & MvP Arena which also handles an ranking to it.
//= PvP Types:
// - Normal
// - Dispell: You'll be dispelled on Room entry.
// - Deathmatch: You'll be auto resurrect when you die.
// If you type @die, get comaed and similar, you'll be warped to your save point.
// - Party PvP: 2vs2, 3vs3, 4vs4, 5vs5
//= PvP:
// - There are 5 Rooms: Prontera, Alberta, Izlude, Morroc
// PvP Types: Normal - Deathmatch has one of these.
// That means 5*3.
// - Party PvP: There are 4 types and those also has one of room each.
// > So 5*4.
// -----------------------------------------------
// = Total 35 Rooms !!!!
// -----------------------------------------------
//= GvG: 5 Arenas, the default guild_vs1 - guild_vs5.
//= MvP: For the MvP Part I'm using the scripts in npc/custom/MVP_arena/
// Enable both in npc/scripts_custom.conf or uncomment the two "npc:" below this
//npc: npc/custom/MVP_arena/arena_mvp.txt
//npc: npc/custom/MVP_arena/amvp_func.txt
//===== Comments & Credits =============================================
//= Credits:
// - MvP Arena: Darkchild, massdriller, Silent
// Well, it's added to the SVN already, but just in case D:.
//=========== Item Usage Restrictions =======================
// Required File: db/item_noequip.txt
// Entries, insert theres at the bottom of the file.
/*
// Disabled for PvP+GvG - PvP/GvG Arena [lllchrislll]
607,3 // Yggdrasil Berry
608,3 // Yggdrasil Seed
*/
//===== MySQL Entries ========================================
/*
// v1.0
DROP TABLE IF EXISTS `arena_master`;
CREATE TABLE `arena_master` (
`char_id` int(10) unsigned NOT NULL,
`kills` smallint(5) unsigned DEFAULT '0',
`death` smallint(5) unsigned DEFAULT '0',
`hscore` smallint(5) unsigned DEFAULT '0',
`bounty` smallint(5) unsigned DEFAULT '0',
`bounty_pts` smallint(5) unsigned DEFAULT '0',
`killer` smallint(5) unsigned DEFAULT '0',
`domi` smallint(5) unsigned DEFAULT '0',
`mega` smallint(5) unsigned DEFAULT '0',
`unstopp` smallint(5) unsigned DEFAULT '0',
`wicked` smallint(5) unsigned DEFAULT '0',
`monster` smallint(5) unsigned DEFAULT '0',
`godlike` smallint(5) unsigned DEFAULT '0',
`holys` smallint(5) unsigned DEFAULT '0',
`mvp` smallint(5) unsigned DEFAULT '0',
PRIMARY KEY (`char_id`)
) ENGINE=MyISAM;
*/
//=============== ToDo List ==========================
// - Nothing yet
//============================================================
// ================= Arena Master ================== //
yuno,171,186,5 script PvP Master 808,{
set .@n$,"["+strnpcinfo(1)+"]";
function getPartyMapUsers;
mes .@n$;
mes "How can I help you?";
mes "Ranking Status: "+ ( ($@pvptable)?"Online":"Offline");
if(!$@pvptable) mes "Duo the ranking system being offline, no ranking will take place.";
next;
switch(select("- Go to Arenas:- See Rankings:- Need Information:- Nevermind")) {
// Arenas
case 1:
set @sphr,0;
set @bty,0;
set @killct,0;
set @first,1; // First Blood
mes .@n$;
mes "In which arena do you want to fight?";
next;
switch(select("- PvP:- GvG:- MvP:- Nevermind")) {
// PvP
case 1:
mes .@n$;
mes "Now select the room you want to fight in.";
set @map,select("- Izlude");
next;
mes .@n$;
mes "Please choose the PvP Type:";
mes "This arena can hold up to "+$@muser[@map]+" player(s).";
mes "Party PvP is different of course.";
next;
switch(select("- PvP (Dispell) ["+getmapusers($@disppvp$[@map])+"]:- Normal PvP ["+getmapusers($@npvp$[@map])+"]:- PvP Deathmatch["+getmapusers($@dmpvp$[@map])+"]:- Party PvP["+getPartyMapUsers(6)+"]")) {
// PvP Dispell
case 1:
mes .@n$;
if(getmapusers($@disppvp$[@map]) >= $@muser[@map]) {
mes "I'm sorry, but this room is already full.";
close;
}
mes "I'll warp you now to the "+ $@room$[@map]+" PvP Room, also remove all your buffs.";
close2;
sc_end SC_ALL;
warp $@disppvp$[@map],0,0;
end;
//PvP Normal
case 2:
mes .@n$;
if(getmapusers($@npvp$[@map]) >= $@muser[@map]) {
mes "I'm sorry, but this room is already full.";
close;
}
mes "I'll warp you now to the "+ $@room$[@map]+" PvP Room.";
close2;
warp $@npvp$[@map],0,0;
end;
// PvP DM
case 3:
mes .@n$;
if(getmapusers($@dmpvp$[@map]) >= $@muser[@map]) {
mes "I'm sorry, but this room is already full.";
close;
}
mes "I'll warp you now to the "+ $@room$[@map]+" PvP Deathmatch Room.";
close2;
warp $@dmpvp$[@map],0,0;
end;
// Party PvP
case 4:
mes .@n$;
if(!getcharid(1)) {
mes "I'm sorry, but you are not in a party.";
mes "Please come back as soon you have found one.";
close;
}
mes "Please choose the Party vs Party Mode:";
next;
set .@pt,select("- 2vs2 ["+getPartyMapUsers(2,@map)/2+"]:- 3vs3 ["+getPartyMapUsers(3,@map)/3+"]:- 4vs4 ["+getPartyMapUsers(4,@map)/4+"]:- 5vs5 ["+getPartyMapUsers(5,@map)/5+"]") + 1;
mes .@n$;
if(getPartyMapUsers(.@pt,@map) >= (.@pt*.@pt)) {
mes "I'm sorry, but this "+.@pt+"vs"+.@pt+" Arena is already full.";
mes "Please try another.";
close;
}
set @pty_id,getcharid(1);
if(getpartyleader(@pty_id) != strcharinfo(0)) {
mes "I'm sorry, but only your leader can register your party.";
close;
}
getpartymember(@pty_id,1);
set @ptymem,$@partymembercount;
if(@ptymem != .@pt) {
mes "I'm sorry, but you have not the required amount of members in your party.";
mes "Please make sure that you have exact "+.@pt+" members, not more not less.";
close;
}
getpartymember(@pty_id,2);
copyarray @ptymemid[0],$@partymembercid,@ptymem;
copyarray @ptymemaid[0],$@partymemberaid,@ptymem;
set .@pt_ct,0;
for ( set .@pm,0; .@pm < @ptymem; set .@pm,.@pm + 1)
if(isloggedin(@ptymemid[.@pm],@ptymemaid[.@pm]) == 0)
set .@pt_ct,.@pt_ct + 1;
if(.@pt_ct) {
mes "It seems like that members are offline.";
mes "Please kick them and gather new members.";
close;
}
mes "I'll warp your party now.";
mes "Good luck.";
close2;
warpparty getd("$@pt"+.@pt+"pvp$["+@map+"]"),0,0,@pty_id;
end;
}
break;
function getPartyMapUsers {
// getarg(0) == Party PvP Type (2vs2,3vs3, etc...) > 2,3, etc...
// if it's a 6 = Total Map Users of the Party PvP Maps
// getarg(1) == Room
if(getarg(0) == 6) {
set @pt2play,getmapusers($@pt2pvp$[1]) + getmapusers($@pt2pvp$[2]) + getmapusers($@pt2pvp$[3]) + getmapusers($@pt2pvp$[4]) + getmapusers($@pt2pvp$[5]);
set @pt3play,getmapusers($@pt3pvp$[1]) + getmapusers($@pt3pvp$[2]) + getmapusers($@pt3pvp$[3]) + getmapusers($@pt3pvp$[4]) + getmapusers($@pt3pvp$[5]);
set @pt4play,getmapusers($@pt4pvp$[1]) + getmapusers($@pt4pvp$[2]) + getmapusers($@pt4pvp$[3]) + getmapusers($@pt4pvp$[4]) + getmapusers($@pt4pvp$[5]);
set @pt5play,getmapusers($@pt5pvp$[1]) + getmapusers($@pt5pvp$[2]) + getmapusers($@pt5pvp$[3]) + getmapusers($@pt5pvp$[4]) + getmapusers($@pt5pvp$[5]);
return @pt2play + @pt3play + @pt4play + @pt5play;
} else return getmapusers(getd("$@pt"+getarg(0)+"pvp$["+getarg(1)+"]"));
}
// GvG
case 2:
mes .@n$;
if(!getcharid(2)) {
mes "I'm sorry, but you are not in a guild.";
close;
}
mes "Please choose the room you want to join:";
mes "Each arena can hold up to "+$@mgvg+" player(s).";
if($@same_gld) mes "If guilds already are in this room, you have to be a member of it so that you can join.";
next;
set .@rchoi,select("- GvG 1 ["+getmapusers($@gvgr$[0])+"]:- GvG 2 ["+getmapusers($@gvgr$[1])+"]:- GvG 3 ["+getmapusers($@gvgr$[2])+"]:- GvG 4 ["+getmapusers($@gvgr$[3])+"]:- GvG 5 ["+getmapusers($@gvgr$[4])+"]") - 1;
mes .@n$;
if($@same_gld) {
set @gvgc,@menu;
if(getd("$@gvg_"+@gvgc+"_gld_1") == 0) {
mes "I will warp you now.";
close2;
warp $@gvgr$[.@rchoi],$@gvg_gld1_x[.@rchoi],$@gvg_gld1_y[.@rchoi];
setd("$@gvg_"+@gvgc+"_gld_1"),getcharid(2);
setd("$@gvg_"+@gvgc+"_1_ppl"),getd("$@gvg_"+@gvgc+"_1_ppl") + 1;
end;
} else if(getd("$@gvg_"+@gvgc+"_gld_2") == 0) {
mes "I will warp you now.";
close2;
warp $@gvgr$[.@rchoi],$@gvg_gld2_x[.@rchoi],$@gvg_gld2_x[.@rchoi];
setd("$@gvg_"+@gvgc+"_gld_2"),getcharid(2);
setd("$@gvg_"+@gvgc+"_2_ppl"),getd("$@gvg_"+@gvgc+"_2_ppl") + 1;
end;
}
if(getd("$@gvg_"+@gvgc+"_gld_1") == getcharid(2)) {
if(getd("$@gvg_"+@gvgc+"_1_ppl") >= $@mpgld) {
mes "I'm sorry, but your guild's side is already full.";
close;
}
mes "I will warp you now.";
close2;
set @rand,rand(1,2);
warp $@gvgr$[.@rchoi],getd("$@gvg_gld1_x"+@rand+"["+.@rchoi+"]"),getd("$@gvg_gld1_y"+@rand+"["+.@rchoi+"]");
setd("$@gvg_"+@gvgc+"_1_ppl"),getd("$@gvg_"+@gvgc+"_1_ppl") + 1;
end;
} else if(getd("$@gvg_"+@gvgc+"_gld_2") == getcharid(2)) {
if(getd("$@gvg_"+@gvgc+"_2_ppl") >= $@mpgld) {
mes "I'm sorry, but your guild's side is already full.";
close;
}
mes "I will warp you now.";
close2;
set @rand,rand(1,2);
warp $@gvgr$[.@rchoi],getd("$@gvg_gld2_x"+@rand+"["+.@rchoi+"]"),getd("$@gvg_gld2_y"+@rand+"["+.@rchoi+"]");
setd("$@gvg_"+@gvgc+"_2_ppl"),getd("$@gvg_"+@gvgc+"_2_ppl") + 1;
end;
}
} else {
if(getmapusers($@gvgr$[.@rchoi]) >= $@mgvg) {
mes "I'm sorry, but this Arena is already full.";
close;
}
mes "I will warp you now.";
close2;
warp $@gvgr$[.@rchoi],0,0;
end;
}
break;
// MvP
case 3:
mes .@n$;
mes "I will now warp you to the MvP Master.";
mes "There you can choose 4 Arena Types with each 8 seperate rooms.";
close2;
warp "quiz_00",50,24;
end;
// Nevermind
case 4:
goto R_Bye;
break;
}
// Ranking
case 2:
mes .@n$;
if(!$@pvptable) {
mes "I'm sorry, the ranking system is offline and thus I can't show you any ranking.";
close;
}
mes "Which ranking do you wanna see?";
next;
switch(select("- Kills:- Deaths:- High Scores:- Killing Sphree:- Dominating:- Mega Kill:- Unstoppable:- Wicked Sick:- Monster Kill:- GodLike:- Holy Sh1t:- MvP")) {
case 1: set .@listr$,"kills"; break;
case 2: set .@listr$,"death"; break;
case 3: set .@listr$,"hscore"; break;
case 4: set .@listr$,"killer"; break;
case 5: set .@listr$,"domi"; break;
case 6: set .@listr$,"mega"; break;
case 7: set .@listr$,"unstopp"; break;
case 8: set .@listr$,"wicked"; break;
case 9: set .@listr$,"monster"; break;
case 10: set .@listr$,"godlike"; break;
case 11: set .@listr$,"holys"; break;
case 12: set .@listr$,"mvp"; break;
}
set @rank,@menu;
mes .@n$;
mes "Which list do you want to see?";
next;
switch(select("- Top 5:- Top 10:- Top 15:- Top 20:- Top 25:- Top 30:- Nevermind")) {
default:
set .@limit,5*@menu;
break;
case 7:
goto R_Bye;
break;
}
mes .@n$;
mes "Ranking:";
switch(@rank) {
case 1: mes set(.@rankn$,"Top "+.@limit+" Killers"); set .@rankt$,"Kills"; break;
case 2: mes set(.@rankn$,"Top "+.@limit+" Victims"); set .@rankt$,"Deaths"; break;
case 3: mes set(.@rankn$,"Top "+.@limit+" High Scores"); set .@rankt$,"High Score"; break;
case 12: mes set(.@rank$,"Top "+.@limit+" MvP Hunters"); set .@rankt$,"MvP Kills"; break;
default: mes set(.@rankn$,"Top "+.@limit+" \""+$@sphreen$[@rank-3]+"\" Rankers"); set .@rankt$,$@sphreen$[@rank-3]+"s"; break;
}
mes "Correct?";
next;
if(select("- Yes:- No") == 2) goto R_Bye;
mes .@n$;
mes "I will now list the ranking in your Chat Box.";
close2;
dispbottom "======= "+.@rankn$+" ===========";
dispbottom "Player Name: "+.@rankt$;
query_sql "SELECT `char_id` , `"+.@listr$+"` FROM `arena_master` WHERE `"+.@listr$+"` > 0 ORDER BY `"+.@listr$+"` DESC LIMIT "+.@limit,.@ch_id,.@sh_r;
if(!.@sh_r[0]) {
dispbottom "No Player found.";
end;
}
for( set .@r,0; .@r < getarraysize(.@sh_r); set .@r,.@r + 1) {
query_sql "SELECT `name` FROM `char` WHERE `char_id` = '"+.@ch_id[.@r]+"'",.@ch_na$;
dispbottom .@ch_na$+": "+.@sh_r[.@r];
}
deletearray .@ch_id[0],128;
deletearray .@sh_r[0],128;
end;
// Arena Shop
/*case 3:
mes .@n$;
mes "Hello, I can sell your useful items for the daily PvP need and more.";
mes "Depending on the bounty, I will open the respective shop.";
next;
mes .@n$;
switch($@bty_type) {
case 0:
mes "I'm sorry, but the bounty feature is not enabled.";
close;
case 1:
mes "I will now open the Bounty Shop, which uses \"Zeny\" as payment.";
break;
case 2:
mes "I will now open the Bounty Shop, which uses \"Cash Points\" as payment.";
break;
case 3:
mes "I will now open the Bounty Shop, which uses \"Bounty Points\" as payment.";
break;
}
close2;
callshop "Arena_Shop",1;
npcshopattach "Arena_Shop";
end;
OnBuyItem:
for( set @s,0; @s < getarraysize(@bought_nameid); set @s,@s + 1) {
for( set @i,0; @i < getarraysize($@arena_sh); set @i,@i + 1) {
if(@bought_nameid[@s] == $@arena_sh[@i]) {
if(checkweight(@bought_nameid[@s],@bought_quantity[@s]) == 1) {
set @c_item,(@bought_quantity[@s]*$@arena_ar[@i]);
set @total,(@total + @c_item);
break;
} else {
dispbottom "Arena Shop: You have reached your weight limit, lose some weight and come back please.";
end;
}
}
}
}
switch($@bty_type) {
case 1:
if(Zeny >= @total) {
for ( set @b,0; @b < getarraysize(@bought_nameid); set @b,@b + 1)
getitem @bought_nameid[@b],@bought_quantity[@b];
set Zeny,Zeny - @total;
} else dispbottom "You don't have enough Zeny.";
break;
case 2:
if(#CASHPOINTS >= @total) {
for ( set @b,0; @b < getarraysize(@bought_nameid); set @b,@b + 1)
getitem @bought_nameid[@b],@bought_quantity[@b];
set #CASHPOINTS,#CASHPOINTS - @total;
} else dispbottom "You don't have enough Cash Points, currently "+#CASHPOINTS;
break;
case 3:
if(query_sql("SELECT `bounty_pts` FROM `arena_master` WHERE `char_id` = '"+getcharid(0)+"'",@pts) >= @total)
for ( set @b,0; @b < getarraysize(@bought_nameid); set @b,@b + 1) {
getitem @bought_nameid[@b],@bought_quantity[@b];
query_sql "UPDATE `arena_master` SET `bounty_pts` = `bounty_pts` - "+@total+" WHERE `char_id` = '"+getcharid(0)+"'";
} else dispbottom "You don't have enough Bounty Points, currently "+@pts;
break;
}
set @total,0;
deletearray @bought_nameid[0],128;
deletearray @bought_quantity[0],128;
end;
*/
// Information
case 3:
mes .@n$;
mes "What do you want to know about?";
next;
switch(select("- PvP:- GvG:- Sphree:- Ranking:- Bounty Feature:- Nevermind")) {
case 1:
mes "[=== PvP ===]";
mes "Each PvP Type has five rooms, displayed as";
mes "Prontera, Alberta, Izlude, Payon and Morroc.";
mes "Party PvP has 4 types and each type has also five rooms.";
next;
mes "[=== PvP ===]";
mes "PvP Types:";
mes " - Normal";
mes " - Dispell";
mes " - Deathmatch";
mes " - Party PvP:";
mes " - 2vs2";
mes " - 3vs3";
mes " - 4vs4";
mes " - 5vs5";
next;
mes "[=== PvP ===]";
mes "Dispell PvP:";
mes " - You'll be dispelled, when";
mes " you entry an room.";
mes " ";
mes "Deathmatch PvP:";
mes " - You'll be auto-resurrect on";
mes " death, except you type @die,";
mes " get comaed or similar, then";
mes " you'll be warped to your savepoint.";
close;
case 2:
mes "[=== GvG ===]";
if($@same_gld) {
mes "There can be two guilds in one room at the same time with maximum "+$@mpgld+" members per guild.";
mes "Each guild has two spawn postions, Guild 1 has North and West and Guild 2 has East and South,";
mes "which will be chosen randomly on room entry, also only members";
mes "of 'em can enter the same room until no one is left of the respective guild.";
} else mes "Only members of a guild can enter a room and the maximum players, which can enter are "+$@mgvg+".";
close;
case 3:
mes "[=== Sphree ===]";
mes "Sphree - Required Kills.";
mes "First Blood - 1";
for ( set .@s,1; .@s < getarraysize($@sphreen$); set .@s,.@s + 1)
mes $@sphreen$[.@s] +" - "+$@sphr_kills[.@s];
next;
mes "[=== Sphree ===]";
mes "For each sphree you accomplish, except First Blood, you gain an point for the bounty feature, if it has been activated.";
mes "For more ask me about the Bounty Feature.";
next;
mes "[=== Sphree ===]";
mes "Also there is the Multi Kill Sphrees, but you won't recieve points for them.";
mes "The time span you can achieve them is "+ $@multi+" seconds.";
next;
mes "[=== Sphree ===]";
mes "In this time you, if you kill";
mes " - one more player = Double Kill";
mes " - two more players = Triple Kill";
mes " - three or more players = Ultra Kill";
close;
case 4:
mes "[=== Ranking ===]";
mes "Kills, Deaths, Sphree Counts (like Killing Sphree), the highest kill count till you died and lists it in either a Top 5, 10, 15, 20, 25 or a Top 30 List with the wanted information you have chosen, will be displayed.";
next;
mes "[=== Ranking ===]";
mes "Additionally there is an promote feature, which is part of the ranking to save your sphree counts which can be, like mentioned above, listed.";
mes "But the save of them will only apply when you logout.";
close;
case 5:
mes .@n$;
if(!$@bty_type) {
mes "This feature isn't activate.";
close;
}
mes "There are three different bounty rewards, which are the following:";
mes " - Zeny";
mes " - Cash Points";
mes " - Bounty Points";
next;
mes .@n$;
mes "But depending on the setting which has been made by the GM Team, only one will be used.";
mes "Also for each of these an Shop exists and only one shop can be accessed.";
mes "Current Bounty Reward: "+ $@bty_price + " " + ( ($@bty_type == 1)?"Zeny": ( ($@bty_type == 2)?"Cash Points":"Bounty Points") );
next;
mes .@n$;
mes "The bounty depends on your victims sphree.";
mes "Here is a list of them:";
mes "And while I'm on it I will list the required kills for them too.";
mes " ";
mes "Sphree - Requ. Kills - Points";
for ( set .@s,1; .@s < getarraysize($@sphreen$); set .@s,.@s + 1)
mes $@sphreen$[.@s] +" - "+$@sphr_kills[.@s] + " - "+.@s;
next;
case 6:
goto R_Bye;
close;
}
// Nevermind
case 4:
goto R_Bye;
break;
}
R_Bye:
mes .@n$;
mes "Okay, see ya.";
close;
}
// =============== Bounty Feature Shop =========== //
- shop Arena_Shop -1,512:-1
// =============== Main Settings ===============//
- script PvPGvGMain -1,{
end;
OnInit:
// =============== Ranking Check & Debug Messages ================//
if($@debug) announce "====== Arena Master - Debug initiate... ========",bc_self;
if(query_sql("SHOW TABLES LIKE 'arena_master'",.@pvptab[0]) == 0) set $@pvptable,0; else set $@pvptable,1;
announce "Arena Master Ranking System - Status: "+ ( ($@pvptable)?"Online":"Offline"),bc_all;
// ============== Sphree Settings ============//
setarray $@sphreen$[1],"Killing Sphree","Dominating","Mega Kill","Unstoppable","Wicked Sick","Monster Kill","GodLike","Holy Sh1t";
setarray $@msphree$[1],"Double Kill","Triple Kill","Ultra Kill";
setarray $@sphr_kills[1],3,5,7,9,11,13,15,17; // Kills required for each sphree.
set $@multi,15000; // Time Span for chance to gain Multi-Kill in milliseconds.
set $@promo,5; // Kills required till points will be promoted to the current sphree.
if($@debug) announce "PvP Sphree Settings loaded: "+$@sphreen$[0],bc_self;
// ============== Bounty Settings =========//
// Bounty Type: 0 = Off, 1 = Zeny, 2 = Cash Points, 3 = Bounty Points
set $@bty_type,1;
if($@bty_type) {
set $@bty_bonus,5; // Bonus, if you kill an player
set $@bty_bon_start,4; //which has achieved an spree of "$@bty_bon_start"
// Clearing Array on Whisper to prevent double entries
if(.@re_in) {
// Items
for (set .@s,0; .@s < getarraysize($@arena_sh); set .@s,.@s + 1)
npcshopdelitem "Arena_Shop",$@arena_sh[.@s];
// Prices
deletearray $@arena_ar[0],128;
}
// Shop Items: PvP useful stuff D:, like Elements, Boxes and Food
// These will be used for all shops, but the prices depends on the Bounty Type you have set.
setarray $@arena_sh[0],12020,12028,12029,12030,12031,12032,12033,12034,12108,12215,12216,12217,12218,12219,12075,12080,12085,12090,12095,12100,12114,12115,12116,12117,12118,12119,12120,12121,13543,13544,13545,13546,13547,14593;
npcshopdelitem "Arena_Shop",512;
// Prices:
// Two ways of doing so:
// - By formula
// - Array
// You can determine for each currency the way of calculation and prices.
if($@bty_type == 1) {
// =============== Zeny ========== //
set $@bty_price,5000; // Zeny per Sphree
// If you want to use the formula, set ".arena_pay" to 1.
// If you wanna use the array, set ".arena_pay" to 2.
set $@arena_pay,1; // 1 = Formula, 2 = Per Array
// But remember to put the prices for all items.
setarray $@arena_ar[0],100; // Etc
} else if($@bty_type == 2) {
// =============== Cash Points ========== //
set $@bty_price,2; // Cash Points per Sphree
// If you want to use the formula, set ".arena_pay" to 1.
// If you wanna use the array, set ".arena_pay" to 2.
set $@arena_pay,1; // 1 = Formula, 2 = Per Array
// But remember to put the prices for all items.
setarray $@arena_ar[0],100; // Etc
} else if($@bty_type == 3) {
// =============== Bounty Points ========== //
set $@bty_price,5; // Bounty Points per Sphree
// If you want to use the formula, set ".arena_pay" to 1.
// If you wanna use the array, set ".arena_pay" to 2.
set $@arena_pay,1; // 1 = Formula, 2 = Per Array
// But remember to put the prices for all items.
setarray $@arena_ar[0],100; // Etc
}
for ( set .@s,0; .@s < getarraysize($@arena_sh); set .@s,.@s + 1) {
if($@arena_pay == 1) { // By Formula
// =============== Zeny Formula ========== //
// Default: ($@bty_price+(.@s*($@bty_price/10)))/2
// Base Price = $@bty_price, "Multiplier" = + (Index ID* ($@bty_price/10))/2
// Example: 5000 + (4(=Index of 12031)*(5000/10=500) > 7000/2 = 3500 Zeny for 12031
// Note: If the formula results in a decimal number it will be degraded.
if($@bty_type == 1) set .@arena_fo,($@bty_price+(.@s*($@bty_price/10)))/2;
// =============== Cash Points Formula ========== //
// Default: ($@bty_price+.@s)/2
// Base Price = $@bty_price, "Multiplier" = + Index ID/2
// Example: 2 + 4(=Index of 12031) > 6/2 = 3 Cash Points for 12031
// Note: If the formula results in a decimal number it will be degraded.
else if($@bty_type == 2) set .@arena_fo,($@bty_price+.@s)/2;
// =============== Bounty Points Formula ========== //
// Default: ($@bty_price+(.@s*10))/2
// Base Price = $@bty_price, "Multiplier" = + (Index ID* 10)/2
// Example: 5 + (4(=Index of 12031)*10) > 45/2 = 22 Bounty Points for 12031
// Note: If the formula results in a decimal number it will be degraded.
else if($@bty_type == 3) set .@arena_fo,($@bty_price+(.@s*10))/2;
// =============== Adding the price (calculated by the formula) to the array ========== //
setarray $@arena_ar[.@s],.@arena_fo;
}
npcshopadditem "Arena_Shop",$@arena_sh[.@s],$@arena_ar[.@s];
}
}
if($@debug) announce "Bounty Shop - Currency: " + ( ($@bty_type == 1)?"Zeny": ( ($@bty_type == 2)?"Cash Points":"Bounty Points") ) + ", Basic Price: "+ $@bty_price + ", Items: "+getarraysize($@arena_sh)+", Prices: "+getarraysize($@arena_ar),bc_self;
// Bounty Calculation:
// Scroll down till the line with "function getBounty {", should be near Line 813
if($@debug) announce "Bounty Settings loaded: "+$@bty_type,bc_self;
// ============ GvG Settings ============//
set $@mpgld,20; //Max Guild Members per Guild
if($@debug) announce "Max Members per Guild loaded: "+$@mpgld,bc_self;
set $@mgvg,$@mpgld*2; // Total Members per Arena.
if($@debug) announce "Max Members per Arena loaded: "+$@mgvg,bc_self;
set $@same_gld,1; // Same Guild requirement: 1 = On / 0 = Off
if($@debug) announce "Same Guild Requirement loaded: "+$@same_gld,bc_self;
setarray $@gvgr$[0],"guild_vs1","guild_vs2","guild_vs3","guild_vs4","guild_vs5";
if($@debug) announce "Guild Maps loaded: "+$@gvgr$[0],bc_self;
// If you want to add more mapflags, add them before the "10" > mf_gvg_noparty
setarray $@gvg_mf[0],0,1,2,3,4,5,9,11,13,15,22,33,34,35,38,41,44,10;
if($@debug) announce "Guild Mapflags loaded: "+getarraysize($@gvg_mf),bc_self;
if($@same_gld) {
// Guild Map Coordinates - used if $@same_gld is enabled
// Every Guild has two coordinates to spawn from:
// Guild 1: gld1_ > x1+y1 = North, x2+y2 = East
setarray $@gvg_gld1_x1[0],9,9,12,8,18;
setarray $@gvg_gld1_y1[0],50,50,51,49,50;
setarray $@gvg_gld1_x2[0],50,50,50,50,49;
setarray $@gvg_gld1_y2[0],7,7,13,8,23;
// Guild 2: gld2_ > x1+y1 = West, x2+y2 = South
setarray $@gvg_gld2_x1[0],50,50,49,50,49;
setarray $@gvg_gld2_y1[0],91,91,86,91,76;
setarray $@gvg_gld2_x2[0],92,92,86,91,79;
setarray $@gvg_gld2_y2[0],50,50,51,49,49;
if($@debug) announce "Guild 1 Map Coordinates 1 loaded: X - "+getarraysize($@gvg_gld1_x1) +" & Y - "+getarraysize($@gvg_gld1_y1),bc_self;
if($@debug) announce "Guild 1 Map Coordinates 2 loaded: X - "+getarraysize($@gvg_gld1_x2) +" & Y - "+getarraysize($@gvg_gld1_y2),bc_self;
if($@debug) announce "Guild 2 Map Coordinates 1 loaded: X - "+getarraysize($@gvg_gld2_x1) +" & Y - "+getarraysize($@gvg_gld2_y1),bc_self;
if($@debug) announce "Guild 2 Map Coordinates 2 loaded: X - "+getarraysize($@gvg_gld2_x2) +" & Y - "+getarraysize($@gvg_gld2_y2),bc_self;
}
// ======= Auto Mapflag Adding ===============//
for ( set .@m,0; .@m < getarraysize($@gvgr$); set .@m,.@m + 1 ) {
if($@debug) announce "Array Reading of GvG Maps complete",bc_self;
if($@debug) announce "Mapflag set at "+$@gvgr$[.@m] + " initiate...",bc_self;
// Use this if you disallows parties
// for ( set .@mf,0; .@mf < getarraysize($@gvg_mf); set .@mf,.@mf + 1 ) {
// Use this if you allow parties
for ( set .@mf,0; .@mf < (getarraysize($@gvg_mf) - 1); set .@mf,.@mf + 1 ) {
setmapflag $@gvgr$[.@m],$@gvg_mf[.@mf];
if($@debug) announce "Mapflag "+ $@gvg_mf[.@mf] +" set at "+$@gvgr$[.@m] + " complete",bc_self;
}
}
if($@debug) announce "Guild Mapflag loading completed",bc_self;
// ============ PvP Settings ============//
// If you want to add more mapflags, add them before the "7" > mf_pvp_noparty
setarray $@pvp_mf[0],0,1,2,3,4,5,7,11,13,22,33,34,35,38,41,44,7;
if($@debug) announce "PvP Mapflags loaded: "+getarraysize($@pvp_mf),bc_self;
// ============= PvP Room Settings =======//
setarray $@room$[1],"Izlude";
setarray $@muser[1],60;
if($@debug) announce "PvP Town Maps loaded: "+$@room$[1],bc_self;
// Dispell PvP
setarray $@disppvp$[1],"pvp_y_1-2";
if($@debug) announce "PvP Dispell Maps loaded: "+$@disppvp$[1],bc_self;
// ======= Auto Mapflag Adding - Dispell PvP ===============//
for ( set .@m,1; .@m < getarraysize($@disppvp$); set .@m,.@m + 1 ) {
if($@debug) announce "Array Reading of Dispell PvP Maps complete",bc_self;
if($@debug) announce "Mapflag set at "+$@disppvp$[.@m] + " initiate...",bc_self;
// Use this if you disallows parties
// for ( set .@mf,0; .@mf < getarraysize($@pvp_mf); set .@mf,.@mf + 1 ) {
// Use this if you allow parties
for ( set .@mf,0; .@mf < (getarraysize($@pvp_mf) - 1); set .@mf,.@mf + 1 ) {
setmapflag $@disppvp$[.@m],$@pvp_mf[.@mf];
if($@debug) announce "Mapflag "+ $@pvp_mf[.@mf] +" set at "+$@disppvp$[.@m] + " complete",bc_self;
}
}
if($@debug) announce "PvP Dispell Mapflags loaded.",bc_self;
// Normal PvP
setarray $@npvp$[1],"pvp_y_2-2";
if($@debug) announce "PvP Normal Maps loaded: "+$@npvp$[0],bc_self;
// ======= Auto Mapflag Adding - Normal PvP ===============//
for ( set .@m,1; .@m < getarraysize($@npvp$); set .@m,.@m + 1 ) {
if($@debug) announce "Array Reading of Normal PvP Maps complete",bc_self;
if($@debug) announce "Mapflag set at "+$@npvp$[.@m] + " initiate...",bc_self;
// Use this if you disallows parties
// for ( set .@mf,0; .@mf < getarraysize($@pvp_mf); set .@mf,.@mf + 1 ) {
// Use this if you allow parties
for ( set .@mf,0; .@mf < (getarraysize($@pvp_mf) - 1); set .@mf,.@mf + 1 ) {
setmapflag $@npvp$[.@m],$@pvp_mf[.@mf];
if($@debug) announce "Mapflag "+ $@pvp_mf[.@mf] +" set at "+$@npvp$[.@m] + " complete",bc_self;
}
}
if($@debug) announce "PvP Normal Mapflags loaded.",bc_self;
// ================== Deathmatch Settings + Maps ================
setarray $@dmpvp$[1],"pvp_y_3-2";
if($@debug) announce "PvP DM Maps loaded: "+$@dmpvp$[0],bc_self;
// ======= Auto Mapflag Adding - DM PvP ===============//
for ( set .@m,1; .@m < getarraysize($@dmpvp$); set .@m,.@m + 1 ) {
if($@debug) announce "Array Reading of DM PvP Maps complete",bc_self;
if($@debug) announce "Mapflag set at "+$@dmpvp$[.@m] + " initiate...",bc_self;
// Use this if you disallows parties
for ( set .@mf,0; .@mf < getarraysize($@pvp_mf); set .@mf,.@mf + 1 ) {
// Use this if you allow parties
// for ( set .@mf,0; .@mf < (getarraysize($@pvp_mf) - 1); set .@mf,.@mf + 1 ) {
// setmapflag $@dmpvp$[.@m],$@pvp_mf[.@mf];
// if($@debug) announce "Mapflag "+ $@pvp_mf[.@mf] +" set at "+$@dmpvp$[.@m] + " complete",bc_self;
}
}
if($@debug) announce "PvP DM Mapflags loaded.",bc_self;
// ================= Party PvP Settings =================
// ========= 2vs2 Party PvP ==========//
setarray $@pt2pvp$[1],"pvp_y_4-2";
if($@debug) announce "Party PvP 2vs2 Maps loaded: "+$@pt2pvp$[0],bc_self;
// 3vs3 Party PvP
setarray $@pt3pvp$[1],"pvp_y_5-2";
if($@debug) announce "Party PvP 3vs3 Maps loaded: "+$@pt3pvp$[0],bc_self;
// 4vs4 Party PvP
setarray $@pt4pvp$[1],"pvp_y_6-2";
if($@debug) announce "Party PvP 4vs4 Maps loaded: "+$@pt4pvp$[0],bc_self;
// 5vs5 Party PvP
setarray $@pt5pvp$[1],"pvp_y_7-2";
if($@debug) announce "Party PvP 5vs5 Maps loaded: "+$@pt5pvp$[0],bc_self;
// ======= Auto Mapflag Adding ===============//
// ============== Party 2vs2 =================//
if($@debug) announce "Array Reading of Party 2vs2 PvP Maps - configuring",bc_self;
for ( set .@m,1; .@m < getarraysize($@pt2pvp$); set .@m,.@m + 1 ) {
if($@debug) announce "Mapflag set at "+$@pt2pvp$[.@m] + " initiate...",bc_self;
for ( set .@mf,0; .@mf < (getarraysize($@pvp_mf) - 1); set .@mf,.@mf + 1 ) {
setmapflag $@pt2pvp$[.@m],$@pvp_mf[.@mf];
if($@debug) announce "Mapflag "+ $@pvp_mf[.@mf] +" set at "+$@pt2pvp$[.@m] + " complete",bc_self;
}
}
if($@debug) announce "Party 2v2 PvP Mapflags loaded.",bc_self;
sleep2 100;
// ============== Party 3vs3 =================//
if($@debug) announce "Array Reading of Party 3vs3 PvP Maps - configuring",bc_self;
for ( set .@m,1; .@m < getarraysize($@pt3pvp$); set .@m,.@m + 1 ) {
if($@debug) announce "Mapflag set at "+$@pt3pvp$[.@m] + " initiate...",bc_self;
for ( set .@mf,0; .@mf < (getarraysize($@pvp_mf) - 1); set .@mf,.@mf + 1 ) {
setmapflag $@pt3pvp$[.@m],$@pvp_mf[.@mf];
if($@debug) announce "Mapflag "+ $@pvp_mf[.@mf] +" set at "+$@pt3pvp$[.@m] + " complete",bc_self;
}
}
if($@debug) announce "Party 3v3 PvP Mapflags loaded.",bc_self;
sleep2 100;
// ============== Party 4vs4 =================//
if($@debug) announce "Array Reading of Party 4vs4 PvP Maps - configuring",bc_self;
for ( set .@m,1; .@m < getarraysize($@pt4pvp$); set .@m,.@m + 1 ) {
if($@debug) announce "Mapflag set at "+$@pt4pvp$[.@m] + " initiate...",bc_self;
for ( set .@mf,0; .@mf < (getarraysize($@pvp_mf) - 1); set .@mf,.@mf + 1 ) {
setmapflag $@pt4pvp$[.@m],$@pvp_mf[.@mf];
if($@debug) announce "Mapflag "+ $@pvp_mf[.@mf] +" set at "+$@pt4pvp$[.@m] + " complete",bc_self;
}
}
if($@debug) announce "Party 4v4 PvP Mapflags loaded.",bc_self;
sleep2 100;
// ============== Party 5vs5 =================//
if($@debug) announce "Array Reading of Party 5vs5 PvP Maps - configuring",bc_self;
for ( set .@m,1; .@m < getarraysize($@pt5pvp$); set .@m,.@m + 1 ) {
if($@debug) announce "Mapflag set at "+$@pt5pvp$[.@m] + " initiate...",bc_self;
for ( set .@mf,0; .@mf < (getarraysize($@pvp_mf) - 1); set .@mf,.@mf + 1 ) {
setmapflag $@pt5pvp$[.@m],$@pvp_mf[.@mf];
if($@debug) announce "Mapflag "+ $@pvp_mf[.@mf] +" set at "+$@pt5pvp$[.@m] + " complete",bc_self;
}
}
if($@debug) announce "Party 5v5 PvP Mapflags loaded.",bc_self;
sleep2 100;
if($@debug) announce "Party PvP Mapflags loaded.",bc_self;
function writeStats;
if($@debug) announce "Write Stats Function loaded.",bc_self;
function getBounty;
function writeBounty;
if($@debug) announce "Bounty Function loaded.",bc_self;
function doPromote;
if($@debug) announce "Promote Function loaded.",bc_self;
if(.@re_in) goto OnWhisperGlobal;
end;
OnPCKillEvent:
if(compare(strcharinfo(3),"pvp_y_") == 0 && compare(strcharinfo(3),"guild_vs") == 0) end;
if(getmapflag(strcharinfo(3),mf_pvp) == 0 && getmapflag(strcharinfo(3),mf_gvg) == 0) end;
set .@v,killedrid;
mapannounce strcharinfo(3),strcharinfo(0) + " has killed "+rid2name(.@v)+"!!!!!",0;
set @killct,@killct + 1;
switch(@killct) {
case 1:
if(@first) {
mapannounce strcharinfo(3),strcharinfo(0) + " has achieved First Blood!!!!",0;
soundeffectall "firstblood.wav",0,strcharinfo(3);
set @first,0;
}
break;
case 3:
mapannounce strcharinfo(3),strcharinfo(0) + " is now on Killing Spree!!!!",0;
soundeffectall "killingspree.wav",0,strcharinfo(3);
set @sphr,1;
break;
case 5:
mapannounce strcharinfo(3),strcharinfo(0) + " is now on Dominating!!!!",0;
soundeffectall "dominating.wav",0,strcharinfo(3);
set @sphr,2;
break;
case 7:
mapannounce strcharinfo(3),strcharinfo(0) + " is now on Mega Kill!!!!",0;
soundeffectall "megakill.wav",0,strcharinfo(3);
set @sphr,3;
break;
case 9:
mapannounce strcharinfo(3),strcharinfo(0) + " is now on Unstoppable!!!!",0;
soundeffectall "unstoppable.wav",0,strcharinfo(3);
set @sphr,4;
break;
case 11:
mapannounce strcharinfo(3),strcharinfo(0) + " is now on Wicked Sick!!!!",0;
soundeffectall "wickedsick.wav",0,strcharinfo(3);
set @sphr,5;
break;
case 13:
mapannounce strcharinfo(3),strcharinfo(0) + " is now on Monster Kill!!!!",0;
soundeffectall "monsterkill.wav",0,strcharinfo(3);
set @sphr,6;
break;
case 15:
mapannounce strcharinfo(3),strcharinfo(0) + " is now on GodLike!!!!",0;
soundeffectall "godlike.wav",0,strcharinfo(3);
set @sphr,7;
break;
case 17:
mapannounce strcharinfo(3),strcharinfo(0) + " is now on Holy Sh1t!!!!",0;
soundeffectall "holyshit.wav",0,strcharinfo(3);
set @sphr,8;
break;
default:
if(@killct > 17) {
mapannounce strcharinfo(3),strcharinfo(0) + " is now on Holy Sh1t!!!!",0;
soundeffectall "holyshit.wav",0,strcharinfo(3);
}
break;
}
set @prokill,@prokill + 1;
doPromote;
set @mkillct,@mkillct + 1;
deltimer strnpcinfo(0)+"::OnMultiSpan";
addtimer $@multi,strnpcinfo(0)+"::OnMultiSpan";
if(@mkillct >= 2) sleep2 500; // Slowing down multi-kill sound effects
if(@mkillct == 2) {
mapannounce strcharinfo(3),strcharinfo(0) + " has made an Double Kill!!!!",0;
soundeffectall "doublekill.wav",0,strcharinfo(3);
} else if(@mkillct == 3) {
mapannounce strcharinfo(3),strcharinfo(0) + " has made an Triple Kill!!!!",0;
soundeffectall "triplekill.wav",0,strcharinfo(3);
} else if(@mkillct >= 4) {
mapannounce strcharinfo(3),strcharinfo(0) + " has made an Ultra Kill!!!!",0;
soundeffectall "ultrakill.wav",0,strcharinfo(3);
}
if($@bty_type && $@pvptable) {
if(@sphr >= $@bty_bon_start) {
mapannounce strcharinfo(3),"Bounty Hunter: Oh My God!!! Someone stop "+strcharinfo(0)+" please!!! I'll give you a bonus of "+$@bty_bonus+" on "+ ( (Sex)?"his":"her") +" head!!",0;
set @sphr,@sphr + $@bty_bonus;
}
query_sql("SELECT `bounty` FROM `arena_master` WHERE `char_id` = '"+getcharid(0,rid2name(.@v))+"'",@bty);
getBounty(@bty,.@v);
writeBounty(@sphr);
}
if(@killct%5==0) message strcharinfo(0),"Defeated Players: "+@killct;
end;
OnPCDieEvent:
// ===== Should affects you only, if you warped to an player via @warpto/@goto or were @recall-ed
// ==== so you won't recieve a value for @map, which is required for the respawn in DM Maps
if(!@map) {
for( set @m,1; @m < getarraysize($@dmpvp$); set @m,@m + 1)
if(strcharinfo(3) == $@dmpvp$[@m]) {
set @map,@m;
break;
}
}
if($@pvptable) {
writeStats(getcharid(0),@killct,1);
if($@bty_type) writeBounty(@sphr);
}
set @sphr,0;
set @killct,0;
if($@same_gld && @gvgc > 0) {
if(getd("$@gvg_"+@gvgc+"_gld_1") == getcharid(2)) {
setd("$@gvg_"+@gvgc+"_1_ppl"),getd("$@gvg_"+@gvgc+"_1_ppl") - 1;
if(getd("$@gvg_"+@gvgc+"_1_ppl") < 1) setd("$@gvg_"+@gvgc+"_gld_1"),0;
} else if(getd("$@gvg_"+@gvgc+"_gld_2") == getcharid(2)) {
setd("$@gvg_"+@gvgc+"_2_ppl"),getd("$@gvg_"+@gvgc+"_2_ppl") - 1;
if(getd("$@gvg_"+@gvgc+"_2_ppl") < 1) setd("$@gvg_"+@gvgc+"_gld_2"),0;
}
set @gvg_c,0;
}
if(strcharinfo(3) == $@dmpvp$[@map]) {
sleep2 1500;
if(killerrid != getcharid(3)) {
warp strcharinfo(3),0,0;
if(HP == 0) atcommand "@alive";
percentheal 100,100;
} else warp "SavePoint",0,0;
}
end;
OnMultiSpan:
set @mkillct,0;
end;
OnPCLogOutEvent:
if(compare(strcharinfo(3),"pvp_y_") == 0 || compare(strcharinfo(3),"guild_vs") == 0) end;
if(getmapflag(strcharinfo(3),mf_pvp) == 0 || getmapflag(strcharinfo(3),mf_gvg) == 0) end;
if($@pvptable) {
writeStats(getcharid(0),@killct,0);
if(@prodo)
if(query_sql("SELECT `char_id` FROM `arena_master` WHERE `char_id` = '"+getcharid(0)+"'",@charid) != 0) // Should never happen, but to prevent bugs :I
query_sql "UPDATE `arena_master` SET `killer` = `killer` + "+@killer+" , `domi` = `domi` + "+@domi+" , `mega` = `mega` + "+@mega+" , `unstopp` = `unstopp` + "+@unstopp+" , `wicked` = `wicked` + "+@wicked+" , `monster` = `monster` + "+@monster+" , `godlike` = `godlike` + "+@godlike+" , `holys` = `holys` + "+@holys+" WHERE `char_id` = '"+getcharid(0)+"'";
}
if($@same_gld && @gvgc > 0) {
if(getd("$@gvg_"+@gvgc+"_gld_1") == getcharid(2)) setd("$@gvg_"+@gvgc+"_1_ppl"),getd("$@gvg_"+@gvgc+"_1_ppl") - 1;
else if(getd("$@gvg_"+@gvgc+"_gld_2") == getcharid(2)) setd("$@gvg_"+@gvgc+"_2_ppl"),getd("$@gvg_"+@gvgc+"_2_ppl") - 1;
}
end;
OnNPCKillEvent:
if(!$@pvptable) end;
if(compare(strcharinfo(3),"pvp_n_") == 0) end; // Only working in the MvP Arena
if(getmonsterinfo(killedrid,MOB_MODE) & 32) { // 32 = Mini-Boss & MvP Flag (There is no solo-flag for MvP q.q)
if(query_sql("SELECT `char_id` FROM `arena_master` WHERE `char_id` = '"+getcharid(0)+"'",@charid) != 0)
query_sql "UPDATE `arena_master` SET `mvp` = `mvp` + 1 WHERE `char_id` = '"+getcharid(0)+"'";
else query_sql "INSERT INTO `arena_master` ( `char_id` , `mvp`) VALUES ( '"+getcharid(0)+"' , '1' )";
}
end;
function writeStats {
if(!$@pvptable) return; // To be save
set @c,getarg(0); // Char ID
set @k,getarg(1); // Kills
set @d,getarg(2); // Deaths
if(query_sql("SELECT `char_id` FROM `arena_master` WHERE `char_id` = '"+@c+"'",@charid) != 0) {
if(@k > query_sql("SELECT `hscore` FROM `arena_master` WHERE `char_id` = '"+@c+"'",@hscore)) set @hscore,@k;
query_sql "UPDATE `arena_master` SET `kills` = `kills` + "+@k+", `death` = `death` + "+@d+" , `hscore` = '"+@hscore+"' WHERE `char_id` = '"+@c+"'";
} else query_sql "INSERT INTO `arena_master` ( `char_id` , `kills` , `death` , `hscore` ) VALUES ( '"+@c+"' , '"+@k+"' , '"+@d+"' , '"+@hscore+"' )";
return;
}
function doPromote {
set @prodo,1; // Check for OnPCLogOutEvent
switch(@sphr) { // Sphree Index
case 1:
if(@prokill/$@promo == 1) set @killer,@killer + 1;
break;
case 2:
if(@prokill/$@promo == 1) set @domi,@domi + 1;
break;
case 3:
if(@prokill/$@promo == 1) set @mega,@mega + 1;
break;
case 4:
if(@prokill/$@promo == 1) set @unstopp,@unstopp + 1;
break;
case 5:
if(@prokill/$@promo == 1) set @wicked,@wicked + 1;
break;
case 6:
if(@prokill/$@promo == 1) set @monster,@monster + 1;
break;
case 7:
if(@prokill/$@promo == 1) set @godlike,@godlike + 1;
break;
case 8:
if(@prokill/$@promo == 1) set @holys,@holys+ 1;
break;
}
set @prokill,0;
return;
}
function getBounty {
// getarg(0) == Last Sphree of Victim
// getarg(1) == RID of Victim
if(!getarg(0)) return; // No Sphree = No Bounty ;I
// Calculation:
// Exchange the */+ with the symbol you want,
// but note that it can be exploited if you change it too much,
// like 8 (Sphree Index)*$@bty_price (Cash Points,5) = 40 CASHPOINTS
switch($@bty_type) { // Bounty Reward Type
case 1: // Zeny
set Zeny,Zeny + ($@bty_price*getarg(0));
dispbottom "Bounty Hunter: You have recieved "+($@bty_price*getarg(0))+" Zeny for killing "+rid2name(getarg(1))+".";
break;
case 2: // Cash Points
set #CASHPOINTS,#CASHPOINTS + ($@bty_price+getarg(0));
dispbottom "Bounty Hunter: You have recieved "+($@bty_price+getarg(0))+" Cash Points for killing "+rid2name(getarg(1))+".";
dispbottom "You have now "+#CASHPOINTS+" Cash Points.";
break;
case 3: // Bounty Points
query_sql "UPDATE `arena_master` SET `bounty_pts` = `bounty_pts` + "+($@bty_price+getarg(0))+" WHERE `char_id` = '"+getcharid(0)+"'";
dispbottom "Bounty Hunter: You have recieved "+($@bty_price+getarg(0))+" Bounty Points for killing "+rid2name(getarg(1))+".";
break;
}
if(getarg(0) >= $@bty_bon_start)
mapannounce strcharinfo(3),"Bounty Hunter: "+strcharinfo(0)+" has ended "+rid2name(getarg(1))+"'s Spree and was rewarded with "+($@bty_price*getarg(0))+" " + ( ($@bty_type == 1)?"Zeny": ( ($@bty_type == 2)?"Cash Points":"Bounty Points") ),0;
return;
}
function writeBounty {
query_sql "UPDATE `arena_master` SET `bounty` = '"+getarg(0)+"' WHERE `char_id` = '"+getcharid(0)+"'";
return;
}
OnWhisperGlobal:
if(!getgmlevel()) end;
set .@re_in,0;
set $@debug,0;
if(select("- ReLoad:- Nevermind") == 2) close;
if(select("- Debug:- Without Debug") == 1) set $@debug,1;
set .@re_in,1;
goto OnInit;
end;
}
Question
Feistz
Can help me solve it? Im using script from chris collection. I modified it though to make it use only one arena, Izlude for all pvp except GVG. Weird number
pvp.txt
Link to comment
Share on other sites
5 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.