mirror of
https://github.com/SWG-Source/dsrc.git
synced 2026-10-06 22:12:58 -04:00
Added level specific reward mechanism and adjusted some awards to be unique and/or no trade.
This commit is contained in:
Regular → Executable
+25
@@ -487,9 +487,34 @@ public class base_player extends script.base_script
|
||||
expertise.autoAllocateExpertiseByLevel(self, true);
|
||||
}
|
||||
recomputeCommandSeries(self);
|
||||
grantLevelSpecificRewards(self, newCombatLevel);
|
||||
skill.sendlevelUpStatChangeSystemMessages(self, oldCombatLevel, newCombatLevel);
|
||||
return SCRIPT_CONTINUE;
|
||||
}
|
||||
public void grantLevelSpecificRewards(obj_id player, int newCombatLevel) throws InterruptedException{
|
||||
obj_id inv = utils.getInventoryContainer(player);
|
||||
switch(newCombatLevel){
|
||||
case 20:
|
||||
// create the Level 20 reward Flash Speeder (stella)
|
||||
createLevelReward("Flash Speeder deed", "object/tangible/deed/vehicle_deed/speederbike_flash_deed.iff", newCombatLevel, player);
|
||||
break;
|
||||
case 70:
|
||||
createLevelReward("Lava Flea deed", "object/tangible/veteran_reward/mount_lava_flea.iff", newCombatLevel, player);
|
||||
// create the Level 70 reward Lava Flea (stella)
|
||||
break;
|
||||
}
|
||||
}
|
||||
public void createLevelReward(String name, String template, int level, obj_id player) throws InterruptedException{
|
||||
String playerName = getName(player);
|
||||
obj_id reward = createObjectInInventoryAllowOverload(template, player);
|
||||
if(isIdValid(reward)){
|
||||
sendSystemMessage(player, "A " + name + " has been placed in your inventory.", null);
|
||||
CustomerServiceLog("LevelItemRewards", "Player " + playerName + " (" + player + ") has been awarded the " + name + " for reaching Level " + level + ".");
|
||||
}
|
||||
else{
|
||||
CustomerServiceLog("LevelItemRewards", "Unable to create " + name + " reward for Player " + playerName + " (" + player + ")");
|
||||
}
|
||||
}
|
||||
public int updateGCWStanding(obj_id self, dictionary params) throws InterruptedException
|
||||
{
|
||||
int intScore = params.getInt("intScore");
|
||||
|
||||
Reference in New Issue
Block a user