home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC Gamer 5.14
/
2000-11_-_Disc_5.14.iso
/
Goodies
/
3DGameStudio
/
Adeptus
/
cursor.wdl
< prev
next >
Wrap
Text File
|
2000-02-06
|
4KB
|
168 lines
//@
# INVOKED WDL-Script Project: DEMO ADEPTUS
#
# Auftraggeber : Conitec GmbH
#
#*********************************************************************
# Module : cursor.wdl - Kundenversion
# Version : 2.0 (Made with WDL-STUDIO & Beautyfier)
# Date : 9.9.99
# Responsible : Harald Schmidt
# Description : Conitec RPG -Demo
# *********************************************************************
//@
//
SKILL m_temp {}
SKILL tempskill {}
SKILL remember_sword {VAL FALSE;}
SKILL sw_carry {VAL FALSE;}
SKILL touched_it {}
SKILL mouse_object {VAL -1;}#TYPE PLAYER
ACTION admouse_toggle
{
MOUSE_MODE += 2; // switches the mouse on and off
CALL mouse_handler;
}
ACTION admouse_on
{
MOUSE_MODE = 2; // switches the mouse on
CALL mouse_handler;
}
ACTION mouse_of
{
MOUSE_MODE = 0; // switches the mouse off
CALL mouse_handler;
}
ACTION mouse_handler //mouse movement and check wether mouse_object has changed
{
MOUSE_RANGE = 400;
IF (MOUSE_MODE > 2)// switch off
{
CALL clear_mouse; //don't loose the mouse content
mouse_object = M_WALK;
MOUSE_MODE = 0;
CALL touch_off;
CALL hide_inventory;
# CALL close_all;
IF (remember_sword == TRUE)
{
CALL show_sword;
}
RETURN;
}
IF (sw_carry == TRUE)
{
sw_carry = FALSE;
remember_sword = TRUE;
}
SET TMP_LEFT_ACTION, NULL;
SET MOUSE_MAP, maus_l_map;
MOUSE_POS.X = 256;
MOUSE_POS.Y = 190;
mouse_object = M_WALK;
m_temp = mouse_object; //save the current mouse_object temporary
WHILE (MOUSE_MODE > 0)
{
IFDEF ACKNEX_VERSION414;
MOUSE_POS.X = POINTER.X;
MOUSE_POS.Y = POINTER.Y;
IFELSE;
MOUSE_POS.X += MICKEY.X;
MOUSE_POS.Y += MICKEY.Y;
ENDIF;
IF (m_temp != mouse_object)// compare: has mouse_object changed?
{
CALL mouse_map_change; //change the mouse sprite!
}
IF (mouse_object > EMPTY && MOUSE_POS.X > 512 && inv_state == OFF)
{
CALL INV_SYN; //If the mousesprite is an item it will open the inventory itself
SET TMP_LEFT_ACTION, NULL;
tempskill = 1;
}
IF (mouse_object > EMPTY && ( (MOUSE_POS.X > 380 && inv_state == ON) || (MOUSE_POS.X > 512)))
{
SET TMP_LEFT_ACTION, NULL;
tempskill = 2;
}
IF (mouse_object > EMPTY && MOUSE_POS.X < 380 && inv_state == ON)
{
CALL INV_SYN;
tempskill = 3;
}
IF (mouse_object > EMPTY && MOUSE_POS.X < 380)
{
SET TMP_LEFT_ACTION, drop_entity;
tempskill = 4;
}
IF ((mouse_object > EMPTY) && (touch_text.VISIBLE == ON))
{
SET TMP_LEFT_ACTION, NULL;
}
IF (mouse_object <= EMPTY)
{
tempskill = 5;
SET TMP_LEFT_ACTION, NULL;
}
SET ON_MOUSE_LEFT, TMP_LEFT_ACTION;
WAIT 1;
}
}
ACTION mouse_map_change //mouse sprite change
{
IF (mouse_object > EMPTY)
{
MOUSE_SPOT.X = 35;
MOUSE_SPOT.Y = 35;
IF (mouse_object == M_KEY1)
{
SET MOUSE_MAP, key1_map;
}
IF (mouse_object == M_KEY2)
{
SET MOUSE_MAP, key2_map;
}
IF (mouse_object == M_GEM)
{
SET MOUSE_MAP, gem1_map;
}
IF (mouse_object == M_RUBY)
{
SET MOUSE_MAP, ruby_map;
}
IF (mouse_object == M_BLATT)
{
SET MOUSE_MAP, blatt_map;
}
IF (mouse_object == M_FISH)
{
SET MOUSE_MAP, fish_map;
}
IF (mouse_object == M_SWORD)
{
SET MOUSE_MAP, sword_map;
}
IF (mouse_object == M_WATEREMPTY)
{
SET MOUSE_MAP, waterempty_map;
}
IF (mouse_object == M_WATERFULL)
{
SET MOUSE_MAP, waterfull_map;
}
}
ELSE
{
SET MOUSE_MAP, maus_l_map;
MOUSE_SPOT.X = 0;
MOUSE_SPOT.Y = 0;
}
m_temp = mouse_object;
}