OnOdinDead:
killmonster "odin_tem03","OdinTempInvasion::OnInvasionOdin";
killmonster "prontera","OdinTempInvasion::OnInvasionOdin";
announce "["+ strcharinfo(0) +"] has slain "+ getmonsterinfo(killedrid, MOB_NAME), bc_all;
// Reward tracking
MVPKills = MVPKills + 3;
dispbottom "---------------------------------------------------";
dispbottom "You killed a total of "+MVPKills+" MVP"+((MVPKills == 1)?"":"s")+".";
#mvp_points += 3;
dispbottom "You've gained three points! Your total is ["+#mvp_points+"] MvP point(s).";
dispbottom "---------------------------------------------------";
// Drop items around boss location
set @item_id, 512; //
set @drop_count, 10;
set @x, 113;
set @y, 71;
set @i, 0;
while (@i < @drop_count) {
set @dx, @x + rand(-3,3);
set @dy, @y + rand(-3,3);
makeitem @item_id, 1, "odin_tem03", @dx, @dy;
set @i, @i + 1;
}
// Drop items around boss
set @item_id, 512;
set @drop_count, 10;
set @x, 113;
set @y, 71;
set @i, 0;
while (@i < @drop_count) {
set @dx, @x + rand(-3,3);
set @dy, @y + rand(-3,3);
makeitem @item_id, 1, "odin_tem03", @dx, @dy;
set @i, @i + 1;
}
// Distribute rewards
set @players, mobcountunitdmg(killedrid, 0);
set @item_reward, 1;
set @highest_dmg, 0;
set @highest_dmg_id, 0;
set @i, 0;
while (@i < @players) {
set @char_id, getunitdmginfo(killedrid, @i, 2);
set @account_id, getunitdmginfo(killedrid, @i, 0);
set @dmg, getunitdmginfo(killedrid, @i, 1);
if (@dmg > @highest_dmg) {
set @highest_dmg, @dmg;
set @highest_dmg_id, @account_id;
}
if (attachrid(@char_id)) {
getitem @item_id, @item_reward;
detachrid;
}
set @i, @i + 1;
}
// Double reward to highest damage dealer
if (attachrid(getcharid(3, @highest_dmg_id))) {
getitem @item_id, @item_reward;
detachrid;
}
// Double reward to last hitter (current player)
getitem @item_id, @item_reward;
end;
}
Why am I getting an error on this script? Can someone help me in fixing the script here?
See attached screenshot for the error.
Question
Ruhn
OnOdinDead: killmonster "odin_tem03","OdinTempInvasion::OnInvasionOdin"; killmonster "prontera","OdinTempInvasion::OnInvasionOdin"; announce "["+ strcharinfo(0) +"] has slain "+ getmonsterinfo(killedrid, MOB_NAME), bc_all; // Reward tracking MVPKills = MVPKills + 3; dispbottom "---------------------------------------------------"; dispbottom "You killed a total of "+MVPKills+" MVP"+((MVPKills == 1)?"":"s")+"."; #mvp_points += 3; dispbottom "You've gained three points! Your total is ["+#mvp_points+"] MvP point(s)."; dispbottom "---------------------------------------------------"; // Drop items around boss location set @item_id, 512; // set @drop_count, 10; set @x, 113; set @y, 71; set @i, 0; while (@i < @drop_count) { set @dx, @x + rand(-3,3); set @dy, @y + rand(-3,3); makeitem @item_id, 1, "odin_tem03", @dx, @dy; set @i, @i + 1; } // Drop items around boss set @item_id, 512; set @drop_count, 10; set @x, 113; set @y, 71; set @i, 0; while (@i < @drop_count) { set @dx, @x + rand(-3,3); set @dy, @y + rand(-3,3); makeitem @item_id, 1, "odin_tem03", @dx, @dy; set @i, @i + 1; } // Distribute rewards set @players, mobcountunitdmg(killedrid, 0); set @item_reward, 1; set @highest_dmg, 0; set @highest_dmg_id, 0; set @i, 0; while (@i < @players) { set @char_id, getunitdmginfo(killedrid, @i, 2); set @account_id, getunitdmginfo(killedrid, @i, 0); set @dmg, getunitdmginfo(killedrid, @i, 1); if (@dmg > @highest_dmg) { set @highest_dmg, @dmg; set @highest_dmg_id, @account_id; } if (attachrid(@char_id)) { getitem @item_id, @item_reward; detachrid; } set @i, @i + 1; } // Double reward to highest damage dealer if (attachrid(getcharid(3, @highest_dmg_id))) { getitem @item_id, @item_reward; detachrid; } // Double reward to last hitter (current player) getitem @item_id, @item_reward; end; }
Why am I getting an error on this script? Can someone help me in fixing the script here?
See attached screenshot for the error.
Link to comment
Share on other sites
2 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.