The animation of the Gate in my world
Code: Select all
EVENT("accessbuilding", "8")
{
if ( $gPlayerID != $gBuildingOwnerID )
{
$ret = Gateother()
}
Else if ( $gPlayerID = $gBuildingOwnerID )
{
$ret = Gateowner()
}
}
EVENT("OSDSELECT", "Statusgate:1")
{
EVENT("&command","Animation")
{
*changebuilding $gBuildingAccessNum,13
sleep(80)
*changebuilding $gBuildingAccessNum,12
}
}
EVENT("accessbuilding", "12")
{
if ( $gPlayerID != $gBuildingOwnerID )
{
$ret = Gateother()
}
Else if ( $gPlayerID = $gBuildingOwnerID )
{
$ret = Gateowner()
}
}
EVENT("OSDSELECT", "Statusgate:2")
{
EVENT("&command","Animation")
{
*changebuilding $gBuildingAccessNum,14
sleep(80)
*changebuilding $gBuildingAccessNum,8
}
}
____________________________________________________________________________
Function GateOwner()
{
osdcreate(OSDBUILDING, "Statusgate", "sysGetBuildingName")
osdadditem(OSDBIGTEXT, "", "Choose Here the Gate Status")
osdadditem(OSDBIGTEXT, " ", "")
osdadditem(OSDBIGTEXT, " ", "")
osdadditem(OSDEXITBUTTON,"1", "OPEN")
osdadditem(OSDEXITBUTTON,"2", "CLOSE")
osdactivate()
}
Function Gateother()
{
osdcreate(OSDBUILDING, "Statusgate", "sysGetBuildingName")
osdadditem(OSDBIGTEXT, " ", "You must be the owner to get access")
osdadditem(OSDBIGTEXT, " ", "")
osdadditem(OSDBIGTEXT, " ", "")
osdadditem(OSDEXITBUTTON, "exit", "OK")
osdactivate()
}