Ancordia_PRC8/_module/nss/bjbetting.nss

17 lines
542 B
Plaintext
Raw Normal View History

2023-09-21 19:51:32 -04:00
/**
* Moved the code that handles the bet to an include file
* so we don't duplicate this code in all the betting
* conversations
*
* Copyright (C) 2002 Jim Woodgate - woody@realtime.net
*/
void handleBet(object oPlayer, int amount) {
TakeGoldFromCreature(amount, oPlayer, TRUE);
int currentPlayer = GetLocalInt(OBJECT_SELF, "BJCURRENTPLYR");
SetLocalInt(OBJECT_SELF, "BJBET"+IntToString(currentPlayer), amount);
SetLocalInt(OBJECT_SELF, "BJCURRENTPLYR", currentPlayer+1);
SignalEvent(OBJECT_SELF, EventUserDefined(213));
}