Advertisement
Guest User

Untitled

a guest
Nov 26th, 2015
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. function serverCmdUpgradeObject(%client,%optionX,%optionY)
  2. {
  3. %obj = %client.interactingWith;
  4. %techLevel = $ServerTech[%optionX,%optionY];
  5. %newOb = $option[%optionX,%optionY,%techLevel];
  6. %newDatablock = getword(%newOb,0);
  7. %cost = %newDatablock.cost;
  8. if ($energyLevel>=%cost)
  9. {
  10. replaceObject(%obj,%newOb,%objType);
  11. commandToClient(%client,'toggleInteractPrompt', 0);
  12. commandtoClient(%client,'setInteractCommand',"");
  13. %client.interactingWith = -1;
  14. $energyLevel -= %cost;
  15. }
  16. %client.prompted = false;
  17. %client.interactingWith = -1;
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement