Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function serverCmdUpgradeObject(%client,%optionX,%optionY)
- {
- %obj = %client.interactingWith;
- %techLevel = $ServerTech[%optionX,%optionY];
- %newOb = $option[%optionX,%optionY,%techLevel];
- %newDatablock = getword(%newOb,0);
- %cost = %newDatablock.cost;
- if ($energyLevel>=%cost)
- {
- replaceObject(%obj,%newOb,%objType);
- commandToClient(%client,'toggleInteractPrompt', 0);
- commandtoClient(%client,'setInteractCommand',"");
- %client.interactingWith = -1;
- $energyLevel -= %cost;
- }
- %client.prompted = false;
- %client.interactingWith = -1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement