Skip to content

Commit

Permalink
Spawn widgets for random dungeons.
Browse files Browse the repository at this point in the history
  • Loading branch information
Zelknolf committed May 23, 2015
1 parent a778d0f commit bb84522
Show file tree
Hide file tree
Showing 20 changed files with 48 additions and 0 deletions.
10 changes: 10 additions & 0 deletions i_rnddungmonst_ac.NSS
@@ -0,0 +1,10 @@
#include "acr_quest_i"
#include "acr_db_persist_i"

void main()
{
object oPC = GetItemActivator();
object oWidget = GetItemActivated();
string dungeonMonst = GetLocalString(oWidget, "DUNGEON_MONSTER");
AssignSpawnTableToDungeon("DM"+IntToString(ACR_GetPlayerID(oPC)), dungeonMonst);
}
12 changes: 12 additions & 0 deletions i_rnddungspawn_ac.NSS
@@ -0,0 +1,12 @@
#include "acr_quest_i"
#include "acr_db_persist_i"

void main()
{
object oPC = GetItemActivator();
object oWidget = GetItemActivated();
int dungeonSize = GetLocalInt(oWidget, "DUNGEON_SIZE");
AssignCommand(oPC, CreateRandomDungeon("DM"+IntToString(ACR_GetPlayerID(oPC)), "sunken", dungeonSize));
object oEntrance = CreateObject(OBJECT_TYPE_PLACEABLE, "rnddungentr_01", GetLocation(oPC));
SetLocalString(oEntrance, "DUNGEON_NAME", "DM"+IntToString(ACR_GetPlayerID(oPC)));
}
10 changes: 10 additions & 0 deletions i_rnddungtrap_ac.NSS
@@ -0,0 +1,10 @@
#include "acr_quest_i"
#include "acr_db_persist_i"

void main()
{
object oPC = GetItemActivator();
object oWidget = GetItemActivated();
string dungeonMonster = GetLocalString(oWidget, "DUNGEON_TRAP");
AssignSpawnTableToDungeon("DM"+IntToString(ACR_GetPlayerID(oPC)), dungeonMonster);
}
16 changes: 16 additions & 0 deletions rnddungenter.NSS
@@ -0,0 +1,16 @@
#include "acr_quest_i"

void main()
{
object oPC = GetLastUsedBy();
string dung = GetLocalString(OBJECT_SELF, "DUNGEON_NAME");
if(dung == "")
{
SendMessageToPC(oPC, "Could not find an associated dungeon. This transition is thus broken.");
return;
}
else
{
SendCreatureToDungeon(oPC, dung);
}
}
Binary file added rnddungentr_01.UTP
Binary file not shown.
Binary file added rnddungmonst1.UTI
Binary file not shown.
Binary file added rnddungmonst2.UTI
Binary file not shown.
Binary file added rnddungmonst3.UTI
Binary file not shown.
Binary file added rnddungspawn1.UTI
Binary file not shown.
Binary file added rnddungspawn10.UTI
Binary file not shown.
Binary file added rnddungspawn2.UTI
Binary file not shown.
Binary file added rnddungspawn3.UTI
Binary file not shown.
Binary file added rnddungspawn4.UTI
Binary file not shown.
Binary file added rnddungspawn5.UTI
Binary file not shown.
Binary file added rnddungspawn6.UTI
Binary file not shown.
Binary file added rnddungspawn7.UTI
Binary file not shown.
Binary file added rnddungspawn8.UTI
Binary file not shown.
Binary file added rnddungspawn9.UTI
Binary file not shown.
Binary file added rnddungtrap1.UTI
Binary file not shown.
Binary file added rnddungtrap10.UTI
Binary file not shown.

0 comments on commit bb84522

Please sign in to comment.