mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-06-08 21:44:35 +02:00
Added exp and leveling functions, redid equip ability functions to allow adding abilities that aren't for the player's current class and made functions more clear, added dictionary of BattleCommand ids indexed by a tuple containing classId and level.
This commit is contained in:
parent
56491266cc
commit
33f8709d76
7 changed files with 333 additions and 30 deletions
34
data/scripts/commands/gm/giveexp.lua
Normal file
34
data/scripts/commands/gm/giveexp.lua
Normal file
|
@ -0,0 +1,34 @@
|
|||
require("global");
|
||||
|
||||
properties = {
|
||||
permissions = 0,
|
||||
parameters = "sss",
|
||||
description =
|
||||
[[
|
||||
Adds experience <qty> to player or <targetname>.
|
||||
!giveexp <qty> |
|
||||
!giveexp <qty> <targetname> |
|
||||
]],
|
||||
}
|
||||
|
||||
function onTrigger(player, argc, qty, name, lastName)
|
||||
local sender = "[giveexp] ";
|
||||
|
||||
if name then
|
||||
if lastName then
|
||||
player = GetWorldManager():GetPCInWorld(name.." "..lastName) or nil;
|
||||
else
|
||||
player = GetWorldManager():GetPCInWorld(name) or nil;
|
||||
end;
|
||||
end;
|
||||
|
||||
if player then
|
||||
currency = 1000001;
|
||||
qty = tonumber(qty) or 1;
|
||||
location = INVENTORY_CURRENCY;
|
||||
|
||||
player:AddExp(qty, player.charaWork.parameterSave.state_mainSkill[0], 5);
|
||||
else
|
||||
print(sender.."unable to add experience, ensure player name is valid.");
|
||||
end;
|
||||
end;
|
Loading…
Add table
Add a link
Reference in a new issue