Alangara_PRC8/_module/nss/board_aislasship.nss
Jaysyn904 86feb9ca6f Initial commit
Initial commit.
2024-06-05 21:21:06 -04:00

55 lines
1.4 KiB
Plaintext

/*
* Script generated by LS Script Generator, v.TK.0
*
* For download info, please visit:
* http://nwvault.ign.com/View.php?view=Other.Detail&id=1502
*/
// Put this under "Actions Taken" in the conversation editor.
// Removes the specified gold from all PCs in oPC's party.
// Specifying a negative amount means to take all gold.
void TakeGoldFromAll(int nGold, object oPC);
void TakeGoldFromAll(int nGold, object oPC)
{
object oMember = GetFirstFactionMember(oPC, TRUE);
while ( oMember != OBJECT_INVALID )
{
TakeGoldFromCreature(nGold < 0 ? GetGold(oMember) : nGold, oMember, TRUE);
oMember = GetNextFactionMember(oPC, TRUE);
}
}
void main()
{
object oParty;
object oTarget;
object oSelf = OBJECT_SELF;
// Get the PC who is in this conversation.
object oPC = GetPCSpeaker();
// Take 100 gold (from party) from us.
TakeGoldFromAll(100, oPC);
// Give "seaticket1" to us.
CreateItemOnObject("seaticket1", oPC);
// Find the location to which to teleport.
oTarget = GetWaypointByTag("wp_ship_1");
// Teleport the PC's party.
// Loop through the PC's party.
oParty = GetFirstFactionMember(oPC, FALSE);
while ( oParty != OBJECT_INVALID )
{
AssignCommand(oParty, ClearAllActions());
AssignCommand(oParty, JumpToObject(oTarget));
// Update the loop.
oParty = GetNextFactionMember(oPC, FALSE);
}
}